2020-01-04 19:31:52 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:cake_wallet/palette.dart';
|
|
|
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
2020-04-14 18:15:47 +00:00
|
|
|
import 'package:cake_wallet/src/screens/dashboard/widgets/wallet_card.dart';
|
2020-04-16 18:41:04 +00:00
|
|
|
import 'package:cake_wallet/src/screens/dashboard/widgets/trade_history_panel.dart';
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
class DashboardPage extends BasePage {
|
|
|
|
final _bodyKey = GlobalKey();
|
|
|
|
|
2020-04-14 18:15:47 +00:00
|
|
|
@override
|
|
|
|
ObstructingPreferredSizeWidget appBar(BuildContext context) => null;
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget body(BuildContext context) => DashboardPageBody(key: _bodyKey);
|
|
|
|
}
|
|
|
|
|
|
|
|
class DashboardPageBody extends StatefulWidget {
|
|
|
|
DashboardPageBody({Key key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
DashboardPageBodyState createState() => DashboardPageBodyState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class DashboardPageBodyState extends State<DashboardPageBody> {
|
2020-04-16 18:41:04 +00:00
|
|
|
final menuButton = Image.asset('assets/images/menu_button.png');
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2020-04-14 18:15:47 +00:00
|
|
|
final List<Color> colors = [PaletteDark.backgroundStart, PaletteDark.backgroundEnd];
|
|
|
|
|
|
|
|
return SafeArea(
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
colors: colors
|
|
|
|
)
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
2020-04-16 18:41:04 +00:00
|
|
|
padding: EdgeInsets.only(top: 14),
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: SizedBox(
|
|
|
|
height: 37,
|
|
|
|
width: 37,
|
|
|
|
child: ButtonTheme(
|
|
|
|
minWidth: double.minPositive,
|
|
|
|
child: FlatButton(
|
|
|
|
highlightColor: Colors.transparent,
|
|
|
|
splashColor: Colors.transparent,
|
|
|
|
padding: EdgeInsets.all(0),
|
|
|
|
onPressed: () {},
|
|
|
|
child: menuButton),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: 20, top: 23),
|
2020-04-14 18:15:47 +00:00
|
|
|
child: WalletCard(),
|
2020-04-15 18:09:41 +00:00
|
|
|
),
|
|
|
|
Expanded(
|
2020-04-17 19:40:11 +00:00
|
|
|
child: Stack(
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
fit: StackFit.expand,
|
|
|
|
children: <Widget>[
|
|
|
|
Positioned(
|
|
|
|
top: 28,
|
|
|
|
left: 0,
|
|
|
|
child: TradeHistoryPanel()
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)
|
2020-04-14 18:15:47 +00:00
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
2020-01-04 19:31:52 +00:00
|
|
|
}
|
|
|
|
}
|