Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import_wallet_screen #26

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/icons/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/person.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/seed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions lib/core/global/constants/app_texts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ class AppTexts {
static String invalidCode = "invalid otp code";
static String incompleteRegistration = "incomplete registration";
static String userNotVerified = "user not verified";
static String signup = "Sign up";
static String importWallet = "Import wallet with?";
static String importWalletDesc = "Choose how you'd like to import an existing wallet";
static String privateKeyButton = "Private Key";
static String seedPhrase = "Recovery or Seed phrase";

//! DASHBOARD
static String searchCampaign = "Search Campaign";
Expand Down
1 change: 1 addition & 0 deletions lib/core/global/themes/color_scheme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class AppColors {
static const Color grey100 = Color(0xFF5C5C5C);
static const Color grey200 = Color(0xFFE7E7E7);
static const Color grey300 = Color(0xFFAAAAAA);
static const Color grey400 = Color(0xFFF5F5F5);
static const Color textfieldColor = Color(0xFFF4F8FD);
static const Color errorColor = Color(0xFFE02020);
static const Color successColor = Color(0xFF00C853);
Expand Down
1 change: 1 addition & 0 deletions lib/core/routers/_routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import 'package:defifundr_mobile/features/profile/presentation/view/edit_profile
import 'package:defifundr_mobile/features/profile/presentation/view/security_screen.dart';
import 'package:defifundr_mobile/features/profile/presentation/view/select_avatar_screen.dart';
import 'package:defifundr_mobile/features/profile/presentation/view/view_private_key_screen.dart';
import 'package:defifundr_mobile/features/authentication/presentation/signup/view/import_wallet_screen.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

Expand Down
20 changes: 20 additions & 0 deletions lib/core/routers/routers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,26 @@ class AppRouter {
);
},
),
GoRoute(
path: 'import_wallet',
name: RouteConstants.importWallet,
pageBuilder: (context, state) {
return CustomTransitionPage(
key: state.pageKey,
child: ImportWalletScreen(),
transitionsBuilder:
(context, animation, secondaryAnimation, child) {
// Change the opacity of the screen using a Curve based on the the animation's
// value
return FadeTransition(
opacity: CurveTween(curve: Curves.easeInOutCirc)
.animate(animation),
child: child,
);
},
);
},
),
GoRoute(
path: 'verifyEmail',
name: RouteConstants.verifyEmail,
Expand Down
1 change: 1 addition & 0 deletions lib/core/routers/routes_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ class RouteConstants {
static String changePassword = 'changePassword';
static String security = 'security';
static String privateKey = 'privateKey';
static String importWallet = 'importWallet';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import 'package:defifundr_mobile/core/global/constants/app_texts.dart';
import 'package:defifundr_mobile/core/global/constants/size.dart';
import 'package:defifundr_mobile/core/global/themes/color_scheme.dart';
import 'package:defifundr_mobile/core/shared/button/buttons.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class ImportWalletScreen extends ConsumerStatefulWidget {
const ImportWalletScreen({Key? key}) : super(key: key);

@override
ConsumerState<ConsumerStatefulWidget> createState() =>
_ImportWalletScreenState();
}

class _ImportWalletScreenState extends ConsumerState<ImportWalletScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: PreferredSize(
preferredSize: const Size.fromHeight(kToolbarHeight),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: AppBar(
leading: IconButton(
onPressed: () => Navigator.pop(context),
icon: const Icon(
Icons.arrow_back_ios_new_rounded,
color: Colors.black,
),
),
title: Text(
AppTexts.signup,
style: Config.h2(context).copyWith(
fontSize: 24,
),
),
centerTitle: true,
backgroundColor: Colors.transparent,
elevation: 0,
actions: [
Image.asset(
'assets/icons/person.png',
width: 24,
height: 24,
),
],
),
),
),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(AppTexts.importWallet,
style: Config.h2(context).copyWith(
color: AppColors.primaryColor,
)),
const SizedBox(height: 8),
Text(AppTexts.importWalletDesc,
style: Config.b2(context).copyWith(
color: AppColors.grey100,
)),
const SizedBox(height: 40),
AppButton(
text: AppTexts.privateKeyButton,
onTap: () {},
textSize: 18.sp,
textColor: AppColors.primaryColor,
color: AppColors.grey400,
iconRtr: 'assets/icons/key.svg',
),
const SizedBox(height: 5),
AppButton(
text: AppTexts.seedPhrase,
onTap: () {},
textSize: 18.sp,
textColor: AppColors.primaryColor,
color: AppColors.grey400,
iconRtr: 'assets/icons/seed.svg',
),
const Spacer(),
GestureDetector(
onTap: () {},
child: RichText(
text: TextSpan(
text: 'Need assistance? ',
style: Config.b3(context).copyWith(
fontSize: 14.sp,
color: AppColors.grey100,
),
children: [
TextSpan(
text: 'Learn more',
style: Config.b3(context).copyWith(
fontSize: 14.sp,
color: AppColors.primaryColor,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
],
),
),
),
);
}
}
Loading