mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
claim paynym view
This commit is contained in:
parent
7d8c2d1fda
commit
5c8f72afa6
3 changed files with 96 additions and 2 deletions
80
lib/pages/paynym/paynym_claim_view.dart
Normal file
80
lib/pages/paynym/paynym_claim_view.dart
Normal file
|
@ -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<PaynymClaimView> createState() => _PaynymClaimViewState();
|
||||
}
|
||||
|
||||
class _PaynymClaimViewState extends State<PaynymClaimView> {
|
||||
@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<StackColors>()!.textSubtitle1,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const Spacer(
|
||||
flex: 2,
|
||||
),
|
||||
PrimaryButton(
|
||||
label: "Claim",
|
||||
onPressed: () {
|
||||
// generate and submit paynym to api
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -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<WalletNavigationBar> {
|
|||
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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue