pin code screen, forgot pin code screen

This commit is contained in:
jayesh
2024-06-03 19:11:07 +05:30
6 changed files with 416 additions and 201 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@@ -29,6 +29,9 @@ class RouteName {
//Portfolio details
static const String porfolioDetails = 'porfolioDetails';
//Portfolio details
static const String academyDetails = 'academyDetails';
//Biometric
static const String biometricScreen = 'biometricScreen';

View File

@@ -2,6 +2,7 @@
import 'package:go_router/go_router.dart';
import 'package:tanami_app/core/routes/route_name.dart';
import 'package:tanami_app/features/MainScreens/Academy/presentation/pages/detailsScreen.dart';
import 'package:tanami_app/features/MainScreens/MainScreen.dart';
import 'package:tanami_app/features/MainScreens/Portfolio/presentation/pages/detailsScreen.dart';
@@ -30,104 +31,104 @@ final goRouter = GoRouter(
//errorBuilder: (context, state) => ErrorScreen(state.error),
routes: [
GoRoute(
name: "splash",
path: RouteName.splashScreen,
builder: (context, state) {
return const SplashScreen();
},
routes: [
GoRoute(
name: RouteName.loginScreen,
path: "${RouteName.loginScreen}/:fromScreen",
builder: (context, state) {
return LoginScreen(
fromScreen: state.pathParameters["fromScreen"]!,
);
},
),
GoRoute(
name: RouteName.registerStepScreen,
path: "${RouteName.registerStepScreen}/:fromScreentype",
builder: (context, state) {
return RegisterStepScreen(
fromScreen: state.pathParameters["fromScreentype"]!,
);
},
),
GoRoute(
name: RouteName.welcomeScreen,
path: RouteName.welcomeScreen,
builder: (context, state) {
return const WelcomeScreen();
},
),
GoRoute(
name: RouteName.chooseCountryScreen,
path: RouteName.chooseCountryScreen,
builder: (context, state) {
return const ChooseCountryScreen();
},
),
GoRoute(
name: RouteName.mainScreen,
path: RouteName.mainScreen,
builder: (context, state) {
return const MainScreen();
},
),
GoRoute(
name: RouteName.biometricScreen,
path: RouteName.biometricScreen,
builder: (context, state) {
return const BiometricScreen();
},
),
GoRoute(
name: RouteName.registerScreen,
path: RouteName.registerScreen,
builder: (context, state) {
return const RegisterScreen();
},
),
GoRoute(
name: RouteName.otpScreen,
path: RouteName.otpScreen,
builder: (context, state) {
return const OtpScreen();
},
),
GoRoute(
name: RouteName.porfolioDetails,
path: RouteName.porfolioDetails,
builder: (context, state) {
return const DetailsScreen();
},
),
GoRoute(
name: RouteName.registerUserDetailsScreen,
path: RouteName.registerUserDetailsScreen,
builder: (context, state) {
return const RegisterUserDetailsScreen();
},
),
GoRoute(
name: RouteName.pinScreen,
path: "${RouteName.pinScreen}/:fromScreen",
builder: (context, state) {
return PinScreen(
fromScreen: state.pathParameters["fromScreen"]!,
);
},
),
GoRoute(
name: RouteName.confirmPinScreen,
path: RouteName.confirmPinScreen,
builder: (context, state) {
return const ConfirmPinScreen();
},
),
]),
name: "splash",
path: RouteName.splashScreen,
builder: (context, state) {
return const SplashScreen();
},
routes: [
GoRoute(
name: RouteName.loginScreen,
path: "${RouteName.loginScreen}/:fromScreen",
builder: (context, state) {
return LoginScreen(
fromScreen: state.pathParameters["fromScreen"]!,
);
},
),
GoRoute(
name: RouteName.registerStepScreen,
path: "${RouteName.registerStepScreen}/:fromScreentype",
builder: (context, state) {
return RegisterStepScreen(
fromScreen: state.pathParameters["fromScreentype"]!,
);
},
),
GoRoute(
name: RouteName.welcomeScreen,
path: RouteName.welcomeScreen,
builder: (context, state) {
return const WelcomeScreen();
},
),
GoRoute(
name: RouteName.chooseCountryScreen,
path: RouteName.chooseCountryScreen,
builder: (context, state) {
return const ChooseCountryScreen();
},
),
GoRoute(
name: RouteName.mainScreen,
path: RouteName.mainScreen,
builder: (context, state) {
return const MainScreen();
},
),
GoRoute(
name: RouteName.biometricScreen,
path: RouteName.biometricScreen,
builder: (context, state) {
return const BiometricScreen();
},
),
GoRoute(
name: RouteName.registerScreen,
path: RouteName.registerScreen,
builder: (context, state) {
return const RegisterScreen();
},
),
GoRoute(
name: RouteName.otpScreen,
path: RouteName.otpScreen,
builder: (context, state) {
return const OtpScreen();
},
),
GoRoute(
name: RouteName.porfolioDetails,
path: RouteName.porfolioDetails,
builder: (context, state) {
return const DetailsScreen();
},
),
GoRoute(
name: RouteName.academyDetails,
path: RouteName.academyDetails,
builder: (context, state) {
return const AcademyDetailsScreen();
},
),
GoRoute(
name: RouteName.pinScreen,
path: "${RouteName.pinScreen}/:fromScreen",
builder: (context, state) {
return PinScreen(
fromScreen: state.pathParameters["fromScreen"]!,
);
},
),
GoRoute(
name: RouteName.confirmPinScreen,
path: RouteName.confirmPinScreen,
builder: (context, state) {
return const ConfirmPinScreen();
},
),
],
),
// GoRoute(
// path: '/profile/:userId',
// builder: (context, state) {

View File

@@ -83,6 +83,10 @@ class AppText {
static const String disttodate = "Distributions to date";
static const String includeddocs = "Included Documents";
//Academy
static const String videosTitle = "Videos";
//Dialog
static const String exitText = "Exit";
static const String cancelText = "Cancel";

View File

@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:tanami_app/core/routes/route_name.dart';
import 'package:tanami_app/core/routes/routes.dart';
class AcademyScreen extends StatefulWidget {
const AcademyScreen({super.key});
@@ -101,128 +103,133 @@ class _AcademyScreenState extends State<AcademyScreen> {
return Padding(
padding:
const EdgeInsets.symmetric(vertical: 10.0, horizontal: 16.0),
child: Container(
height: 140.h,
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
spreadRadius: 2,
blurRadius: 10,
offset: const Offset(0, 3), // changes position of shadow
),
],
),
child: Row(
children: [
Container(
height: 140.h,
width: 164.w,
decoration: const BoxDecoration(
color: Color(0xFFF8F8F8),
borderRadius: BorderRadius.all(
Radius.circular(20.0),
),
child: GestureDetector(
onTap: () {
goRouter.goNamed(RouteName.academyDetails);
},
child: Container(
height: 140.h,
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.0)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
spreadRadius: 2,
blurRadius: 10,
offset: Offset(0, 3), // changes position of shadow
),
child: Stack(
children: [
ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20.0),
bottomLeft: Radius.circular(20.0),
),
child: Image.asset(
data[index]['img_path'],
fit: BoxFit.cover,
height: double.infinity,
alignment: Alignment.topCenter,
),
],
),
child: Row(
children: [
Container(
height: 140.h,
width: 164.w,
decoration: const BoxDecoration(
color: Color(0xFFF8F8F8),
borderRadius: BorderRadius.all(
Radius.circular(20.0),
),
Positioned(
bottom: 0.0,
child: ClipRRect(
),
child: Stack(
children: [
ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20.0),
bottomLeft: Radius.circular(20.0),
),
child: Image.asset(
'assets/images/academy_screen/dark_overlay.png',
data[index]['img_path'],
fit: BoxFit.cover,
height: double.infinity,
alignment: Alignment.topCenter,
),
),
),
Positioned(
bottom: 8.0, left: 12.0,
// alignment: Alignment.bottomLeft,
child: Row(
children: [
Image.asset(
'assets/images/academy_screen/video.png',
height: 15.sp,
Positioned(
bottom: 0.0,
child: ClipRRect(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(20.0),
),
SizedBox(
width: 5.w,
child: Image.asset(
'assets/images/academy_screen/dark_overlay.png',
),
Text(
'${data[index]['videos']} videos',
style: GoogleFonts.dmSans(
color: const Color(0xFFD8D8D8),
fontSize: 12.sp,
fontWeight: FontWeight.w700,
),
),
Positioned(
bottom: 8.0, left: 12.0,
// alignment: Alignment.bottomLeft,
child: Row(
children: [
Image.asset(
'assets/images/academy_screen/video.png',
height: 15.sp,
),
),
],
SizedBox(
width: 5.w,
),
Text(
'${data[index]['videos']} videos',
style: GoogleFonts.dmSans(
color: const Color(0xFFD8D8D8),
fontSize: 12.sp,
fontWeight: FontWeight.w700,
),
),
],
),
),
),
],
],
),
),
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 20.0, horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
data[index]['date'],
style: GoogleFonts.dmSans(
color: const Color(0xFF8D8D8D),
fontSize: 11.sp,
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 4.h,
),
Text(
data[index]['title'],
style: GoogleFonts.dmSans(
color: Colors.black,
fontSize: 17.sp,
fontWeight: FontWeight.w700,
),
),
SizedBox(
height: 12.h,
),
SizedBox(
width: 158.w,
child: Text(
data[index]['desc'],
maxLines: 2,
overflow: TextOverflow.ellipsis,
Padding(
padding: const EdgeInsets.symmetric(
vertical: 20.0, horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
data[index]['date'],
style: GoogleFonts.dmSans(
color: const Color(0xFF8D8D8D),
fontSize: 11.sp,
fontWeight: FontWeight.w500,
),
),
),
],
),
)
],
SizedBox(
height: 4.h,
),
Text(
data[index]['title'],
style: GoogleFonts.dmSans(
color: Colors.black,
fontSize: 17.sp,
fontWeight: FontWeight.w700,
),
),
SizedBox(
height: 12.h,
),
SizedBox(
width: 158.w,
child: Text(
data[index]['desc'],
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: GoogleFonts.dmSans(
color: const Color(0xFF8D8D8D),
fontSize: 11.sp,
fontWeight: FontWeight.w500,
),
),
),
],
),
)
],
),
),
),
);

View File

@@ -0,0 +1,200 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:tanami_app/core/styles/app_text.dart';
class AcademyDetailsScreen extends StatefulWidget {
const AcademyDetailsScreen({super.key});
@override
State<AcademyDetailsScreen> createState() => _AcademyDetailsScreenState();
}
class _AcademyDetailsScreenState extends State<AcademyDetailsScreen> {
List videos = [
'assets/images/academy_screen/vd_bg.jpg',
'assets/images/academy_screen/vd_bg.jpg',
'assets/images/academy_screen/vd_bg.jpg'
];
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
elevation: 0,
scrolledUnderElevation: 0.0,
backgroundColor: Colors.white,
centerTitle: true,
title: Text(
'Article name',
style: GoogleFonts.dmSans(
color: const Color(0xFF272727), // Text color similar to your image
fontSize: 20.sp,
fontWeight: FontWeight.w700,
),
),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 20.0),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
spreadRadius: 2,
blurRadius: 10,
offset: const Offset(0, 3), // changes position of shadow
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20.0),
topRight: Radius.circular(20.0),
),
child: Image.asset(
'assets/images/academy_screen/bg2.jpg',
fit: BoxFit.cover,
width: double.infinity,
height: 190.h,
alignment: Alignment.center,
),
),
Positioned(
bottom: 0.0,
child: Image.asset(
'assets/images/academy_screen/dark_overlay.png',
),
),
Positioned(
bottom: 8.0,
left: 12.0,
child: Row(
children: [
Image.asset(
'assets/images/academy_screen/video.png',
height: 15.sp,
),
SizedBox(
width: 5.w,
),
Text(
'3 videos',
style: GoogleFonts.dmSans(
color: const Color(0xFFD8D8D8),
fontSize: 12.sp,
fontWeight: FontWeight.w700,
),
),
],
),
),
],
),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0, vertical: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Jul / 10 / 2025',
style: GoogleFonts.dmSans(
color: const Color(0xFF8D8D8D),
fontSize: 11.sp,
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 12.h,
),
Text(
'Forem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vulputate libero et velit interdum, ac aliquet odio mattis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur tempus urna at turpis condimentum lobortis.',
style: GoogleFonts.dmSans(
color: Colors.grey,
fontSize: 14.sp,
fontWeight: FontWeight.w400,
),
),
],
),
),
],
),
),
SizedBox(
height: 12.h,
),
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
spreadRadius: 2,
blurRadius: 10,
offset: const Offset(0, 3), // changes position of shadow
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 20.0, horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppText.videosTitle,
style: GoogleFonts.dmSans(
color: Colors.black,
fontSize: 15.sp,
fontWeight: FontWeight.w700,
),
),
SizedBox(
height: 12.h,
),
ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: videos.length,
itemBuilder: (context, index) {
return Padding(
padding: const EdgeInsets.only(bottom: 18.0),
child: ClipRRect(
borderRadius: const BorderRadius.all(
Radius.circular(18.0),
),
child: Image.asset(
videos[index],
fit: BoxFit.cover,
height: 160.h,
// alignment: Alignment.topCenter,
),
),
);
},
)
],
),
),
),
],
),
),
),
);
}
}