2020-07-21 17:22:41 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2020-07-23 12:20:52 +00:00
|
|
|
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
2020-07-21 17:22:41 +00:00
|
|
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
|
|
|
|
|
|
|
class BalancePage extends StatelessWidget {
|
|
|
|
BalancePage({@required this.dashboardViewModel});
|
|
|
|
|
|
|
|
final DashboardViewModel dashboardViewModel;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
2020-07-22 10:04:11 +00:00
|
|
|
padding: EdgeInsets.all(24),
|
2020-09-28 15:47:43 +00:00
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Observer(builder: (_) {
|
|
|
|
return Text(
|
|
|
|
dashboardViewModel.balanceViewModel.currency.toString(),
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 40,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: Theme.of(context).indicatorColor,
|
|
|
|
height: 1),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
SizedBox(height: 10),
|
|
|
|
Observer(builder: (_) {
|
|
|
|
return Text(dashboardViewModel.balanceViewModel.cryptoBalance,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 54,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: Colors.white,
|
|
|
|
height: 1),
|
|
|
|
textAlign: TextAlign.center);
|
|
|
|
}),
|
|
|
|
SizedBox(height: 10),
|
|
|
|
Observer(builder: (_) {
|
|
|
|
return Text(dashboardViewModel.balanceViewModel.fiatBalance,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 18,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
color: Theme.of(context).indicatorColor,
|
|
|
|
height: 1),
|
|
|
|
textAlign: TextAlign.center);
|
|
|
|
}),
|
|
|
|
],
|
2020-07-21 17:22:41 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|