Skip to content

Commit f4d35f6

Browse files
committed
import_wallet_screen
1 parent 3baf6b4 commit f4d35f6

File tree

9 files changed

+152
-0
lines changed

9 files changed

+152
-0
lines changed

assets/icons/key.svg

+4
Loading

assets/icons/person.png

2.85 KB
Loading

assets/icons/seed.svg

+5
Loading

lib/core/global/constants/app_texts.dart

+5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ class AppTexts {
5454
static String invalidCode = "invalid otp code";
5555
static String incompleteRegistration = "incomplete registration";
5656
static String userNotVerified = "user not verified";
57+
static String signup = "Sign up";
58+
static String importWallet = "Import wallet with?";
59+
static String importWalletDesc = "Choose how you'd like to import an existing wallet";
60+
static String privateKeyButton = "Private Key";
61+
static String seedPhrase = "Recovery or Seed phrase";
5762

5863
//! DASHBOARD
5964
static String searchCampaign = "Search Campaign";

lib/core/global/themes/color_scheme.dart

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class AppColors {
1111
static const Color grey100 = Color(0xFF5C5C5C);
1212
static const Color grey200 = Color(0xFFE7E7E7);
1313
static const Color grey300 = Color(0xFFAAAAAA);
14+
static const Color grey400 = Color(0xFFF5F5F5);
1415
static const Color textfieldColor = Color(0xFFF4F8FD);
1516
static const Color errorColor = Color(0xFFE02020);
1617
static const Color successColor = Color(0xFF00C853);

lib/core/routers/_routes.dart

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import 'package:defifundr_mobile/features/profile/presentation/view/edit_profile
2525
import 'package:defifundr_mobile/features/profile/presentation/view/security_screen.dart';
2626
import 'package:defifundr_mobile/features/profile/presentation/view/select_avatar_screen.dart';
2727
import 'package:defifundr_mobile/features/profile/presentation/view/view_private_key_screen.dart';
28+
import 'package:defifundr_mobile/features/authentication/presentation/signup/view/import_wallet_screen.dart';
2829
import 'package:flutter/material.dart';
2930
import 'package:go_router/go_router.dart';
3031

lib/core/routers/routers.dart

+20
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,26 @@ class AppRouter {
164164
);
165165
},
166166
),
167+
GoRoute(
168+
path: 'import_wallet',
169+
name: RouteConstants.importWallet,
170+
pageBuilder: (context, state) {
171+
return CustomTransitionPage(
172+
key: state.pageKey,
173+
child: ImportWalletScreen(),
174+
transitionsBuilder:
175+
(context, animation, secondaryAnimation, child) {
176+
// Change the opacity of the screen using a Curve based on the the animation's
177+
// value
178+
return FadeTransition(
179+
opacity: CurveTween(curve: Curves.easeInOutCirc)
180+
.animate(animation),
181+
child: child,
182+
);
183+
},
184+
);
185+
},
186+
),
167187
GoRoute(
168188
path: 'verifyEmail',
169189
name: RouteConstants.verifyEmail,

lib/core/routers/routes_constants.dart

+1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ class RouteConstants {
2525
static String changePassword = 'changePassword';
2626
static String security = 'security';
2727
static String privateKey = 'privateKey';
28+
static String importWallet = 'importWallet';
2829
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import 'package:defifundr_mobile/core/global/constants/app_texts.dart';
2+
import 'package:defifundr_mobile/core/global/constants/size.dart';
3+
import 'package:defifundr_mobile/core/global/themes/color_scheme.dart';
4+
import 'package:defifundr_mobile/core/shared/button/buttons.dart';
5+
import 'package:flutter/material.dart';
6+
import 'package:flutter_riverpod/flutter_riverpod.dart';
7+
import 'package:flutter_screenutil/flutter_screenutil.dart';
8+
9+
class ImportWalletScreen extends ConsumerStatefulWidget {
10+
const ImportWalletScreen({Key? key}) : super(key: key);
11+
12+
@override
13+
ConsumerState<ConsumerStatefulWidget> createState() =>
14+
_ImportWalletScreenState();
15+
}
16+
17+
class _ImportWalletScreenState extends ConsumerState<ImportWalletScreen> {
18+
@override
19+
Widget build(BuildContext context) {
20+
return Scaffold(
21+
backgroundColor: Colors.white,
22+
appBar: PreferredSize(
23+
preferredSize: const Size.fromHeight(kToolbarHeight),
24+
child: Padding(
25+
padding: const EdgeInsets.symmetric(horizontal: 20),
26+
child: AppBar(
27+
leading: IconButton(
28+
onPressed: () => Navigator.pop(context),
29+
icon: const Icon(
30+
Icons.arrow_back_ios_new_rounded,
31+
color: Colors.black,
32+
),
33+
),
34+
title: Text(
35+
AppTexts.signup,
36+
style: Config.h2(context).copyWith(
37+
fontSize: 24,
38+
),
39+
),
40+
centerTitle: true,
41+
backgroundColor: Colors.transparent,
42+
elevation: 0,
43+
actions: [
44+
Image.asset(
45+
'assets/icons/person.png',
46+
width: 24,
47+
height: 24,
48+
),
49+
],
50+
),
51+
),
52+
),
53+
body: SafeArea(
54+
child: Padding(
55+
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 20),
56+
child: Column(
57+
crossAxisAlignment: CrossAxisAlignment.center,
58+
children: [
59+
Text(AppTexts.importWallet,
60+
style: Config.h2(context).copyWith(
61+
color: AppColors.primaryColor,
62+
)),
63+
const SizedBox(height: 8),
64+
Text(AppTexts.importWalletDesc,
65+
style: Config.b2(context).copyWith(
66+
color: AppColors.grey100,
67+
)),
68+
const SizedBox(height: 40),
69+
AppButton(
70+
text: AppTexts.privateKeyButton,
71+
onTap: () {},
72+
textSize: 18.sp,
73+
textColor: AppColors.primaryColor,
74+
color: AppColors.grey400,
75+
iconRtr: 'assets/icons/key.svg',
76+
),
77+
const SizedBox(height: 5),
78+
AppButton(
79+
text: AppTexts.seedPhrase,
80+
onTap: () {},
81+
textSize: 18.sp,
82+
textColor: AppColors.primaryColor,
83+
color: AppColors.grey400,
84+
iconRtr: 'assets/icons/seed.svg',
85+
),
86+
const Spacer(),
87+
GestureDetector(
88+
onTap: () {},
89+
child: RichText(
90+
text: TextSpan(
91+
text: 'Need assistance? ',
92+
style: Config.b3(context).copyWith(
93+
fontSize: 14.sp,
94+
color: AppColors.grey100,
95+
),
96+
children: [
97+
TextSpan(
98+
text: 'Learn more',
99+
style: Config.b3(context).copyWith(
100+
fontSize: 14.sp,
101+
color: AppColors.primaryColor,
102+
fontWeight: FontWeight.w600,
103+
),
104+
),
105+
],
106+
),
107+
),
108+
),
109+
],
110+
),
111+
),
112+
),
113+
);
114+
}
115+
}

0 commit comments

Comments
 (0)