diff --git a/vidaia/lib/pages/home/redeem/redeem_info_page.dart b/vidaia/lib/pages/home/redeem/redeem_info_page.dart index e2dac56..25f4b1b 100644 --- a/vidaia/lib/pages/home/redeem/redeem_info_page.dart +++ b/vidaia/lib/pages/home/redeem/redeem_info_page.dart @@ -35,115 +35,125 @@ class _RedeemInfoPageState extends State { return Scaffold( backgroundColor: BACKGROUND, drawerEnableOpenDragGesture: false, - body: Stack( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ColorFiltered( - colorFilter: ColorFilter.mode( - BACKGROUND_SHADE, BlendMode.modulate), - child: Container( - width: MediaQuery.of(context).size.width * 0.66, - height: MediaQuery.of(context).size.height * 0.33, - decoration: BoxDecoration( - borderRadius: BorderRadius.only( - bottomRight: Radius.circular(50), - topRight: Radius.circular(50)), - color: Colors.white, - ), - child: Center( - child: Padding( - padding: EdgeInsets.all(50), - child: Image.network( - widget.reward.image, - fit: BoxFit.fill, - ))))), - Padding( - padding: EdgeInsets.only(left: 25, top: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - widget.reward.name, - style: TextStyle( - fontSize: 25, - fontWeight: FontWeight.w600), - overflow: TextOverflow.ellipsis, - ), - Padding( - padding: - EdgeInsets.only(right: 25, top: 20), - child: Text( - "Cost: " + widget.reward.cost.toString(), + body: SingleChildScrollView( + child: Stack( + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ColorFiltered( + colorFilter: ColorFilter.mode( + BACKGROUND_SHADE, BlendMode.modulate), + child: Container( + width: MediaQuery.of(context).size.width * 0.66, + height: MediaQuery.of(context).size.height * 0.33, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(50), + topRight: Radius.circular(50)), + color: Colors.white, + ), + child: Center( + child: Padding( + padding: EdgeInsets.all(40), + child: ClipRRect( + borderRadius: + BorderRadius.circular(20.0), + child: Image.network( + widget.reward.image, + fit: BoxFit.fill, + )))))), + Padding( + padding: EdgeInsets.only(left: 25, top: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Text( + widget.reward.name, style: TextStyle( - fontSize: 22, - fontWeight: FontWeight.w700, - color: PRIMARY_LIGHT), + fontSize: 25, + fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis, ), - ), - ]), - Text( - widget.reward.description, - style: TextStyle( - fontSize: 15, fontWeight: FontWeight.w500), - ), - Row(children: [ - RoundedButton( - colour: BUTTON, - width: 50, - child: Text( - "Buy now", - style: TextStyle( - fontSize: 15, - fontWeight: FontWeight.w600, - color: Colors.black, + Padding( + padding: + EdgeInsets.only(right: 25, top: 20), + child: Text( + "Cost: " + + widget.reward.cost.toString(), + style: TextStyle( + fontSize: 22, + fontWeight: FontWeight.w700, + color: PRIMARY_LIGHT), + overflow: TextOverflow.ellipsis, + ), ), - ), - onPressed: () async { - FocusScope.of(context) - .requestFocus(FocusNode()); - await fetchOffers(context); - /* - transferVidar( - widget.reward.cost, - '0x00bab3d8de4ebbefb07d53b1ff8c0f2434bd616d', - 'https://testnet.veblocks.net'); - */ - }), - SizedBox( - width: 20, + ]), + Container( + padding: EdgeInsets.only(right: 20), + child: Text( + widget.reward.description, + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w500), + ), ), - RoundedButton( - colour: PRIMARY, + Row(children: [ + RoundedButton( + colour: BUTTON, + width: 50, + child: Text( + "Buy now", + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w600, + color: Colors.black, + ), + ), + onPressed: () async { + FocusScope.of(context) + .requestFocus(FocusNode()); + await fetchOffers(context); + /* + transferVidar( + widget.reward.cost, + '0x00bab3d8de4ebbefb07d53b1ff8c0f2434bd616d', + 'https://testnet.veblocks.net'); + */ + }), + SizedBox( width: 20, - child: Icon( - Icons.info_outlined, - color: Colors.white, - ), - onPressed: () { - _launchInBrowser( - Uri.parse(widget.reward.url)); - }) - ]), - ])), - ])), - Padding( - padding: EdgeInsets.only(top: 25, left: 15), - child: IconButton( - icon: Center(child: Icon(Icons.arrow_back, color: PRIMARY)), - onPressed: () { - Navigator.pop(context); - }), - ), - ], + ), + RoundedButton( + colour: PRIMARY, + width: 20, + child: Icon( + Icons.info_outlined, + color: Colors.white, + ), + onPressed: () { + _launchInBrowser( + Uri.parse(widget.reward.url)); + }) + ]), + ])), + ])), + Padding( + padding: EdgeInsets.only(top: 25, left: 15), + child: IconButton( + icon: Center(child: Icon(Icons.arrow_back, color: PRIMARY)), + onPressed: () { + Navigator.pop(context); + }), + ), + ], + ), )); } diff --git a/vidaia/lib/pages/home/redeem/widgets/redeem_reward_tile.dart b/vidaia/lib/pages/home/redeem/widgets/redeem_reward_tile.dart index 1cd6946..de6ad60 100644 --- a/vidaia/lib/pages/home/redeem/widgets/redeem_reward_tile.dart +++ b/vidaia/lib/pages/home/redeem/widgets/redeem_reward_tile.dart @@ -19,30 +19,38 @@ class RedeemRewardTile extends StatelessWidget { borderRadius: BorderRadius.circular(15.0), color: Colors.white, ), - child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded( - flex: 7, - child: Container( - decoration: const BoxDecoration( - borderRadius: BorderRadius.only( - topRight: Radius.circular(15), - topLeft: Radius.circular(15), - ), - ), - child: ClipRRect( - borderRadius: BorderRadius.only( - topRight: Radius.circular(15), - topLeft: Radius.circular(15), + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => RedeemInfoPage(reward)), + ); + }, + child: + Column(mainAxisAlignment: MainAxisAlignment.center, children: [ + Expanded( + flex: 7, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.only( + topRight: Radius.circular(15), + topLeft: Radius.circular(15), + ), ), - child: Image.network( - reward.image, - fit: BoxFit.cover, + child: ClipRRect( + borderRadius: BorderRadius.only( + topRight: Radius.circular(15), + topLeft: Radius.circular(15), + ), + child: Image.network( + reward.image, + fit: BoxFit.cover, + ), ), - ), - )), - Expanded( - flex: 3, - child: Container( + )), + Expanded( + flex: 3, + child: Container( width: double.maxFinite, decoration: const BoxDecoration( borderRadius: BorderRadius.only( @@ -57,38 +65,15 @@ class RedeemRewardTile extends StatelessWidget { Radius.circular(15), ), ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 5, - child: Text( - reward.name, - style: Theme.of(context).textTheme.subtitle2, - overflow: TextOverflow.ellipsis, - ), - ), - Expanded( - flex: 2, - child: Center( - child: IconButton( - padding: EdgeInsets.all(1), - icon: Icon(Icons.arrow_forward, - color: Colors.black), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - RedeemInfoPage(reward)), - ); - }, - )), - ) - ]), - ))) - ]), + child: Text( + reward.name, + style: Theme.of(context).textTheme.subtitle2, + overflow: TextOverflow.ellipsis, + ), + ), + )) + ]), + ), )); } }