diff --git a/lib/pages/paynym/paynym_claim_view.dart b/lib/pages/paynym/paynym_claim_view.dart new file mode 100644 index 000000000..389c66ce5 --- /dev/null +++ b/lib/pages/paynym/paynym_claim_view.dart @@ -0,0 +1,80 @@ +import 'package:flutter/material.dart'; +import 'package:stackwallet/utilities/assets.dart'; +import 'package:stackwallet/utilities/text_styles.dart'; +import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import 'package:stackwallet/utilities/util.dart'; +import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; +import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart'; +import 'package:stackwallet/widgets/desktop/primary_button.dart'; + +class PaynymClaimView extends StatefulWidget { + const PaynymClaimView({Key? key}) : super(key: key); + + static const String routeName = "/claimPaynym"; + + @override + State createState() => _PaynymClaimViewState(); +} + +class _PaynymClaimViewState extends State { + @override + Widget build(BuildContext context) { + debugPrint("BUILD: $runtimeType"); + final isDesktop = Util.isDesktop; + + return MasterScaffold( + isDesktop: isDesktop, + appBar: AppBar( + leading: AppBarBackButton( + onPressed: () { + Navigator.of(context).pop(); + }, + ), + titleSpacing: 0, + title: Text( + "PayNym", + style: STextStyles.navBarTitle(context), + overflow: TextOverflow.ellipsis, + ), + ), + body: SafeArea( + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + children: [ + const Spacer( + flex: 1, + ), + Image( + image: AssetImage( + Assets.png.stack, + ), + width: MediaQuery.of(context).size.width / 2, + ), + const SizedBox( + height: 20, + ), + Text( + "You do not have a PayNym yet.\nClaim yours now!", + style: STextStyles.baseXS(context).copyWith( + color: + Theme.of(context).extension()!.textSubtitle1, + ), + textAlign: TextAlign.center, + ), + const Spacer( + flex: 2, + ), + PrimaryButton( + label: "Claim", + onPressed: () { + // generate and submit paynym to api + }, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/wallet_view/sub_widgets/wallet_navigation_bar.dart b/lib/pages/wallet_view/sub_widgets/wallet_navigation_bar.dart index 50738d483..baefa8ebc 100644 --- a/lib/pages/wallet_view/sub_widgets/wallet_navigation_bar.dart +++ b/lib/pages/wallet_view/sub_widgets/wallet_navigation_bar.dart @@ -5,6 +5,8 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; +import '../../paynym/paynym_claim_view.dart'; + class WalletNavigationBar extends StatefulWidget { const WalletNavigationBar({ Key? key, @@ -86,7 +88,12 @@ class _WalletNavigationBarState extends State { opacity: scale, duration: duration, child: GestureDetector( - onTap: () {}, + onTap: () { + setState(() { + scale = 0; + }); + Navigator.of(context).pushNamed(PaynymClaimView.routeName); + }, child: Container( padding: const EdgeInsets.all(16), width: 146, diff --git a/lib/route_generator.dart b/lib/route_generator.dart index ed676c437..514c6614d 100644 --- a/lib/route_generator.dart +++ b/lib/route_generator.dart @@ -36,6 +36,7 @@ import 'package:stackwallet/pages/home_view/home_view.dart'; import 'package:stackwallet/pages/intro_view.dart'; import 'package:stackwallet/pages/manage_favorites_view/manage_favorites_view.dart'; import 'package:stackwallet/pages/notification_views/notifications_view.dart'; +import 'package:stackwallet/pages/paynym/paynym_claim_view.dart'; import 'package:stackwallet/pages/pinpad_views/create_pin_view.dart'; import 'package:stackwallet/pages/receive_view/generate_receiving_uri_qr_code_view.dart'; import 'package:stackwallet/pages/receive_view/receive_view.dart'; @@ -172,7 +173,7 @@ class RouteGenerator { } return getRoute( shouldUseMaterialRoute: useMaterialPageRoute, - builder: (_) => StackPrivacyCalls(isSettings: false), + builder: (_) => const StackPrivacyCalls(isSettings: false), settings: RouteSettings(name: settings.name)); case WalletsView.routeName: @@ -187,6 +188,12 @@ class RouteGenerator { builder: (_) => const AddWalletView(), settings: RouteSettings(name: settings.name)); + case PaynymClaimView.routeName: + return getRoute( + shouldUseMaterialRoute: useMaterialPageRoute, + builder: (_) => const PaynymClaimView(), + settings: RouteSettings(name: settings.name)); + case GlobalSettingsView.routeName: return getRoute( shouldUseMaterialRoute: useMaterialPageRoute,