From 07aaf7716711eecd1025b3a34ff1a09477caf582 Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Thu, 23 Apr 2020 21:36:52 +0300 Subject: [PATCH] CWA-201 | added wallet tiles to wallet list page; added colors and images to wallet menu --- assets/images/2.0x/load.png | Bin 0 -> 1722 bytes assets/images/2.0x/scanner.png | Bin 0 -> 1374 bytes assets/images/2.0x/trash.png | Bin 0 -> 913 bytes assets/images/3.0x/load.png | Bin 0 -> 2760 bytes assets/images/3.0x/scanner.png | Bin 0 -> 1950 bytes assets/images/3.0x/trash.png | Bin 0 -> 1278 bytes assets/images/load.png | Bin 0 -> 831 bytes assets/images/scanner.png | Bin 0 -> 771 bytes assets/images/trash.png | Bin 0 -> 506 bytes .../screens/wallet_list/wallet_list_page.dart | 334 +++++++++++++----- lib/src/screens/wallet_list/wallet_menu.dart | 36 ++ 11 files changed, 286 insertions(+), 84 deletions(-) create mode 100644 assets/images/2.0x/load.png create mode 100644 assets/images/2.0x/scanner.png create mode 100644 assets/images/2.0x/trash.png create mode 100644 assets/images/3.0x/load.png create mode 100644 assets/images/3.0x/scanner.png create mode 100644 assets/images/3.0x/trash.png create mode 100644 assets/images/load.png create mode 100644 assets/images/scanner.png create mode 100644 assets/images/trash.png diff --git a/assets/images/2.0x/load.png b/assets/images/2.0x/load.png new file mode 100644 index 0000000000000000000000000000000000000000..a7b64ee0447d60d623da8d669a6fd22eeb0aea50 GIT binary patch literal 1722 zcmV;r21WUaP)ItH^G$pBx|ul>v^B!{i9Lk(`f41C@G_JWTdk z1{kyqaFp!I!w4nh1S)eO#U9nBFSnFRrQ4Aq%E%Az#^jgkkpPC`nsJBu>+k(VKS z*a31cC#%nWt5D?vD{UJ=vkw^}l>w;y%M_0x`sT{&+G>ioXowAtqI<31<~Sd(J|=$; zGKBXKpn|VcJc`yIJlSJmAv$WZAwY<-F>@PyJ*9hm(FtdFM zr&$GT1C$V5&jTwj7F4dCqMZ+U1?7D5Y_gx+%4=zty%xKAC1;TTCY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V?d00001 diff --git a/assets/images/2.0x/scanner.png b/assets/images/2.0x/scanner.png new file mode 100644 index 0000000000000000000000000000000000000000..e32b970ae89138514128c8e85c4bb765da49d5d0 GIT binary patch literal 1374 zcmV-k1)=(hP)Cm>94y~7fb56M0&c4|m| z@9D+X$LYhT`;r2%;TZTYh-hl+F9w6b0(y+(IZ(qZ)L{ZW1&!@OIfrA}(4Zc_pr>ds zhq-I>37X>(`ipyLh|iJys|c~2_Rjx^ zGEj{fwY>o?ctAo3?u+s<>M^nOp1izF&^z_Y?kdJ1+g+j#-1ktlJrDKy!U1d=QYNbq z{$jlHw_=T|zPg05_5C)xMBlHIiTbgAz6EG&z;wP)@=e||Z(JuX^K}bYmeI1!qadEu z)Sp88SU}k*_P%k7vQ3*&}tPHI5Dk~d(Wu>76S=;ULth? zYC)5}g2Jl|m7Q6+X`oO~{f0GA=1K#^Kq9clE2Z~i)ZtFs=RjN0T2?z1RahqEtHccL z;?2FRvD`kk&bJCO&(x-$K^yype_L*vMCv$`^$vwO+Xb3%0JD{WG+fhHneybIaDo`j zE#EEe7b}k5@7=r4Nw%Dwps}K_oYJB1V66;n<_yKaa^%u`pIh3@6;D-rm+}v=8PtJW zts%7PS%8xbivUgbJRPfNH2Bc|{sPUQ9Un{5S_Khxedb9k3i5zz7F~+GV0$k|nrxhG4_-Mhy}xv7NsU>w}CQ<)DZ0 zo~4kLc#%aiJ}FO!Gx|}Rk?#{l)~SY8n|=D|EFNIxiBVJ?!GA<23xI{o`YwcNS3+DJc8y$?M01MxqBRlNJpF)eUw1<(h z%xaC1$RByy;R)9eNvZ`F0Zbmu9F>7mECMesI5M$$#!lKL6KI#LBAeU~$e`Xp`s1-5 zbB43?St!n+9!IeB3pj4TvP6dBGD>^U5>yLdSx%+asP3MP?fGn&!ji6y5&5m!4O%VG zq|>CpLdYv%wc*f>QdaHzX=zoE+o$YJ?q_*tGBGk7shbmY>%aure+fUUf`QzceatO|4g zx|@F&$!>|E(oQ&prD~NJLK;`;fXz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000000000000000..86a73d9314f7a76d935b457f19491a59db322769 GIT binary patch literal 1278 zcmV3r7nO1mqa3@D@Px`jQ~_SkfCZ0vDu4}*pu*Fc?Y!w(5@1V!vY5w3yki$Pw< z9>;rodyi1SJ1D_6{yFkDKKjr21SO~uz;cFiETM$=(9a#xSPq;sP=a~^Y+t=X0&e7m zVl;I@vqX~x+#HlbZm$(;RE3F?M|x}etmun6jg*cQ;bA2vbVP)HZFK!eLZw_u0> z_t>r|XuJ*C;}^GZ=onzIjRTrB4CB%gU+ow`Xfzs)Mx&t{(Z#uauoj#VoEW!~UXGXm zGn*#}&inh2Tp4$X`5-nY(v~L1Ar^>A3NWYTeq!HMQUJnyAPCVcAP$ul@F$?`8r!*r zLkzE8=5WcbI0)C1BaKuHMks1|?_51~GWQHCH$4GS=+ z4?zhv1n@zq&j&^sf*^CX05v}pX#rB)GeS9h0?fh-GN{k21@Ivj+%WLnr@=S`L29_6 z2K7;sPS#`rB^xEB3nB<2DgZN^XgueqB7j&X)RALV1R)MWIidxS-fgkUvJ{*4J(1G!5Yp7l0X1`8KJQC-BkoAhm8R#h0TzQB!~#`5;0(Vh`p$CyM~g!Bo?;VrHy>}r zRpu06O0mFLP`Hx<)EEQQrATUaL7D{MctKgHX#vJ_K8w586Dt5A6LT8_Vkct=naC-? znA?_O_OJ3tZmStgkeaI^eE&4T*$io@%sIwczC6+AftDln2vfr~E@R`PjXlo#@=lPe zj?cQU~5(20{7U8 oaD(k%VQGi3-AwkdzxS;C1x=A0?-@sFZU6uP07*qoM6N<$g8tMlSO5S3 literal 0 HcmV?d00001 diff --git a/assets/images/load.png b/assets/images/load.png new file mode 100644 index 0000000000000000000000000000000000000000..30281cf3ce0c8e48cd280b11a6f63249a8f225f8 GIT binary patch literal 831 zcmV-F1Hk-=P)C&sOs9@udAx7yG4prE|=Q}&tVu| z!6_-1Fl&M|44D8%;4_?;atNai7_&+5D6(J_8 z;Ve9Y7HG7phvfHiWIDoZ6|}({=!Un@0|%`(*I@uMW(mg3^nZuAL{QKS9D{20@zKoS z3r!o{@ja&8))~iflD->S2fLslz)NBQW$R&FCQqdXI$zwiPhj$b0e6!>0!ttRHz|J@ zFkZdsUrV1Z+N7rnARQ2Z7eudj!9Y3#CuM4Vf)y|VqyEaE04~8clOOl|;3}pWi75Kq zN{M@*dAy4;&FxIhGcM|^h8oOmDY5WM;nhlZ5%lW8 z=50bf=MRYcE+2+gD(}dQ{-s!!dHVSU%j7T02{GSJ(hPIN-H37&N*GF`x{sS<;Q;BA-NBbT#P94{a8RLQ7rXrw|9za!=xtGQzx@s&BP3!#) zg1!m+0?al27|>P&u99%+*Oe~wER!bv4GNZkDbl~3D`Xob|3TVKd7IBzUns|+l6*hu zE!sTsjdhng?OzLBaKFG$LPWofBuby(+|-|t{Ch-?ZvEanP1`Yvps-D-(I-d};az{d zQYV^=yJ>YfQW8Otf6XlQ%j6jx)U#e9YB~X2gmx2z8lRIQ^b<3>j1k26Dp~*l002ov JPDHLkV1l|GXaxWO literal 0 HcmV?d00001 diff --git a/assets/images/scanner.png b/assets/images/scanner.png new file mode 100644 index 0000000000000000000000000000000000000000..dda28983a1067b9f538d207eb88252aac15e5b5c GIT binary patch literal 771 zcmV+e1N{7nP)leK~#7F?N`xp z+b|4;dLBRH@x0;dz0ognE1EM5r45KPMIotpmS z-QgsHAOL{?NEO8J-k1CUMZ6Y8@k%3tZB%;9`kkIU_)|1A5?I%DLjN9f6Y&h>m|C^Y z(Rg@fTC4FT#fZZJ@n}UK1c~?o?_cOY0}gbOO(L?7UJ7AcGHsdel-xGvN@DI{b)+1a zAlrEod-79w6;myaflA>`nP9AD`KjMqe96Eo)3a_b8bgtrJ$MIQqv{h^bDj=CoxoT?Lii&|t`#jAu6^3=WJ{9QvQ zn&Q>M*R;1=FeLO56B-B~4xKHHj6Mf!m=MloM%HEcsF=6NQD|m4xiqAuR%To$cM(8;Fi-(r?n zcQ7(n37L}|;P=ZYi~oYRaLL!jBlU^QeSqm#!gt8kN@kak0sr32Ekysr=YN5Yz>Dwx z2h=nYWX}(Z{CfnXJ=#+X`{QXm*qgPZp;xqjjX&OO^L)jI0m1+P002ovPDHLkV1f>k BRw4iZ literal 0 HcmV?d00001 diff --git a/assets/images/trash.png b/assets/images/trash.png new file mode 100644 index 0000000000000000000000000000000000000000..990140214f7d09918510499d90a9982e6afc6d31 GIT binary patch literal 506 zcmVE#0w*0w5 z1vpZN$wn;T+1BIrm#AoP!=DrCvf)S!p%5>^Dxr_KlZErB^2q4{b$P*GqRCb8df4&j z66-)b?@uTc;1;97dIGkoim{V$i1LR-8@FaiVINS6+p}W--g{eo5xL8$P3?6zg=70a zFctwy{DPxwz+ol1r=zx0wn+i9lYySl?;>HFEg(S93ura{#sqXCZ=fe7U{(ZDbc!~s z2_TU-(6ibUkkY0R@QxV*BnEm?;qFl?!0qvbnV`oAUtO^P&k#FPKp7v41bmW-N)D6q zQ7V8!hR<`=)tm@7VS#{Ir=cx)9hC^!U>Z`|)B;H4!{ws6+fBwtu>d*Pt^Inmd>=4e wzK+7(`tmyeuKfT@xxo_b&x?2tk5m3X07#hDM*b*$yZ`_I07*qoM6N<$f(?h;7ytkO literal 0 HcmV?d00001 diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index da41eb8de..4d5f1f262 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -6,22 +6,15 @@ import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; -import 'package:cake_wallet/src/domain/common/wallet_description.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/src/stores/wallet_list/wallet_list_store.dart'; import 'package:cake_wallet/src/screens/wallet_list/wallet_menu.dart'; -import 'package:cake_wallet/src/widgets/picker.dart'; class WalletListPage extends BasePage { - @override - bool get isModalBackButton => true; @override - String get title => S.current.wallet_list_title; - - @override - AppBarStyle get appBarStyle => AppBarStyle.withShadow; + ObstructingPreferredSizeWidget appBar(BuildContext context) => null; @override Widget body(BuildContext context) => WalletListBody(); @@ -33,92 +26,265 @@ class WalletListBody extends StatefulWidget { } class WalletListBodyState extends State { + final moneroIcon = Image.asset('assets/images/monero.png', height: 24, width: 24); WalletListStore _walletListStore; - void presetMenuForWallet(WalletDescription wallet, bool isCurrentWallet, - BuildContext bodyContext) { - final walletMenu = WalletMenu(bodyContext); - final items = walletMenu.generateItemsForWalletMenu(isCurrentWallet); - - showDialog( - context: bodyContext, - builder: (_) => Picker( - items: items, - selectedAtIndex: -1, - title: S.of(context).wallet_menu, - onItemSelected: (String item) => walletMenu.action( - walletMenu.listItems.indexOf(item), wallet, isCurrentWallet)), - ); - } - @override Widget build(BuildContext context) { _walletListStore = Provider.of(context); - return ScrollableWithBottomSection( - content: Container( - padding: EdgeInsets.all(20), - child: Observer( - builder: (_) => ListView.separated( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - separatorBuilder: (_, index) => Divider( - color: Theme.of(context).dividerTheme.color, height: 1.0), - itemCount: _walletListStore.wallets.length, - itemBuilder: (__, index) { - final wallet = _walletListStore.wallets[index]; - final isCurrentWallet = + return SafeArea( + child: Container( + padding: EdgeInsets.only(top: 32), + color: PaletteDark.menuHeader, + child: ScrollableWithBottomSection( + contentPadding: EdgeInsets.only(bottom: 20), + content: Container( + child: Observer( + builder: (_) => ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + separatorBuilder: (_, index) => Divider( + color: PaletteDark.menuHeader, height: 16), + itemCount: _walletListStore.wallets.length, + itemBuilder: (__, index) { + final wallet = _walletListStore.wallets[index]; + final screenWidth = MediaQuery.of(context).size.width; + + final isCurrentWallet = _walletListStore.isCurrentWallet(wallet); - return InkWell( - onTap: () => - presetMenuForWallet(wallet, isCurrentWallet, context), - child: Container( - padding: EdgeInsets.only(left: 10.0, right: 10.0), - child: ListTile( - title: Text( - wallet.name, - style: TextStyle( - color: isCurrentWallet - ? Palette.cakeGreen - : Theme.of(context) - .primaryTextTheme - .headline - .color, - fontSize: 18.0, - fontWeight: FontWeight.w600), + final walletMenu = WalletMenu(context); + final items = walletMenu.generateItemsForWalletMenu(isCurrentWallet); + final colors = walletMenu.generateColorsForWalletMenu(isCurrentWallet); + final images = walletMenu.generateImagesForWalletMenu(isCurrentWallet); + + return Container( + height: 108, + width: double.infinity, + child: CustomScrollView( + scrollDirection: Axis.horizontal, + slivers: [ + SliverPersistentHeader( + pinned: false, + floating: true, + delegate: WalletTile( + min: screenWidth - 228, + max: screenWidth, + image: moneroIcon, + walletName: wallet.name, + walletAddress: '', + isCurrent: isCurrentWallet ), - trailing: isCurrentWallet - ? Icon( - Icons.check, - color: Palette.cakeGreen, - size: 20.0, - ) - : null))); - }), - ), - ), - bottomSection: Column(children: [ - PrimaryIconButton( - onPressed: () => Navigator.of(context).pushNamed(Routes.newWallet), - iconData: Icons.add, - color: Theme.of(context).primaryTextTheme.button.backgroundColor, - borderColor: + ), + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + + final item = items[index]; + final color = colors[index]; + final image = images[index]; + + final content = Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + image, + SizedBox(height: 5), + Text( + item, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12, + color: Colors.white + ), + ) + ], + ), + ); + + if (index == 0) { + return GestureDetector( + onTap: () => walletMenu.action( + walletMenu.listItems.indexOf(item), wallet, isCurrentWallet), + child: Container( + height: 108, + width: 108, + color: PaletteDark.menuHeader, + child: Container( + padding: EdgeInsets.only(left: 5, right: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(12), + bottomLeft: Radius.circular(12) + ), + color: color + ), + child: content, + ), + ), + ); + } + + return GestureDetector( + onTap: () => walletMenu.action( + walletMenu.listItems.indexOf(item), wallet, isCurrentWallet), + child: Container( + height: 108, + width: 108, + padding: EdgeInsets.only(left: 5, right: 5), + color: color, + child: content, + ), + ); + }, + childCount: items.length + ) + ) + ], + ), + ); + }), + ), + ), + bottomSection: Column(children: [ + PrimaryIconButton( + onPressed: () => Navigator.of(context).pushNamed(Routes.newWallet), + iconData: Icons.add, + color: Theme.of(context).primaryTextTheme.button.backgroundColor, + borderColor: Theme.of(context).primaryTextTheme.button.decorationColor, - iconColor: Palette.violet, - iconBackgroundColor: Theme.of(context).primaryIconTheme.color, - text: S.of(context).wallet_list_create_new_wallet), - SizedBox(height: 10.0), - PrimaryIconButton( - onPressed: () => - Navigator.of(context).pushNamed(Routes.restoreWalletOptions), - iconData: Icons.refresh, - text: S.of(context).wallet_list_restore_wallet, - color: Theme.of(context).accentTextTheme.button.backgroundColor, - borderColor: + iconColor: Palette.violet, + iconBackgroundColor: Theme.of(context).primaryIconTheme.color, + text: S.of(context).wallet_list_create_new_wallet), + SizedBox(height: 10.0), + PrimaryIconButton( + onPressed: () => + Navigator.of(context).pushNamed(Routes.restoreWalletOptions), + iconData: Icons.refresh, + text: S.of(context).wallet_list_restore_wallet, + color: Theme.of(context).accentTextTheme.button.backgroundColor, + borderColor: Theme.of(context).accentTextTheme.button.decorationColor, - iconColor: Theme.of(context).primaryTextTheme.caption.color, - iconBackgroundColor: Theme.of(context).accentIconTheme.color) - ])); + iconColor: Theme.of(context).primaryTextTheme.caption.color, + iconBackgroundColor: Theme.of(context).accentIconTheme.color) + ])), + ) + ); } } + +class WalletTile extends SliverPersistentHeaderDelegate { + WalletTile({ + @required this.min, + @required this.max, + @required this.image, + @required this.walletName, + @required this.walletAddress, + @required this.isCurrent + }); + + final double min; + final double max; + final Image image; + final String walletName; + final String walletAddress; + final bool isCurrent; + + @override + Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { + + double opacity = 1 - shrinkOffset / (max - min); + opacity = opacity >= 0 ? opacity : 0; + + double panelWidth = 12 * opacity; + panelWidth = panelWidth < 12 ? 0 : 12; + + final currentColor = isCurrent + ? Colors.white + : PaletteDark.menuHeader; + + return Stack( + fit: StackFit.expand, + overflow: Overflow.visible, + children: [ + Positioned( + top: 0, + right: max - 4, + child: Container( + height: 108, + width: 4, + decoration: BoxDecoration( + borderRadius: BorderRadius.only(topRight: Radius.circular(4), bottomRight: Radius.circular(4)), + color: currentColor + ), + ), + ), + Positioned( + top: 0, + right: 12, + child: Container( + height: 108, + width: max - 16, + padding: EdgeInsets.only(left: 20, right: 20), + color: PaletteDark.menuHeader, + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + image, + SizedBox(width: 10), + Text( + walletName, + style: TextStyle( + fontSize: 22, + fontWeight: FontWeight.bold, + color: Colors.white + ), + ) + ], + ) + ], + ), + ), + ), + Positioned( + top: 0, + right: 0, + child: Opacity( + opacity: opacity, + child: Container( + height: 108, + width: panelWidth, + decoration: BoxDecoration( + borderRadius: BorderRadius.only(topLeft: Radius.circular(12), bottomLeft: Radius.circular(12)), + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + PaletteDark.walletCardTopEndSync, + PaletteDark.walletCardBottomEndSync + ] + ) + ), + ), + ) + ), + ], + ); + } + + @override + double get maxExtent => max; + + @override + double get minExtent => min; + + @override + bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => true; + +} diff --git a/lib/src/screens/wallet_list/wallet_menu.dart b/lib/src/screens/wallet_list/wallet_menu.dart index 0cb278047..1dcf27921 100644 --- a/lib/src/screens/wallet_list/wallet_menu.dart +++ b/lib/src/screens/wallet_list/wallet_menu.dart @@ -18,6 +18,20 @@ class WalletMenu { S.current.rescan ]; + final List listColors = [ + Colors.blue, + Colors.orange, + Colors.red, + Colors.green + ]; + + final List listImages = [ + Image.asset('assets/images/load.png', height: 32, width: 32, color: Colors.white), + Image.asset('assets/images/eye.png', height: 32, width: 32, color: Colors.white), + Image.asset('assets/images/trash.png', height: 32, width: 32, color: Colors.white), + Image.asset('assets/images/scanner.png', height: 32, width: 32, color: Colors.white) + ]; + List generateItemsForWalletMenu(bool isCurrentWallet) { final items = List(); @@ -29,6 +43,28 @@ class WalletMenu { return items; } + List generateColorsForWalletMenu(bool isCurrentWallet) { + final colors = List(); + + if (!isCurrentWallet) colors.add(listColors[0]); + if (isCurrentWallet) colors.add(listColors[1]); + if (!isCurrentWallet) colors.add(listColors[2]); + if (isCurrentWallet) colors.add(listColors[3]); + + return colors; + } + + List generateImagesForWalletMenu(bool isCurrentWallet) { + final images = List(); + + if (!isCurrentWallet) images.add(listImages[0]); + if (isCurrentWallet) images.add(listImages[1]); + if (!isCurrentWallet) images.add(listImages[2]); + if (isCurrentWallet) images.add(listImages[3]); + + return images; + } + void action(int index, WalletDescription wallet, bool isCurrentWallet) { final _walletListStore = Provider.of(context);