bottomNav
This commit is contained in:
@@ -590,7 +590,7 @@
|
||||
"languageVersion": "3.4"
|
||||
}
|
||||
],
|
||||
"generated": "2025-01-21T12:59:05.713152Z",
|
||||
"generated": "2025-01-21T13:28:23.681235Z",
|
||||
"generator": "pub",
|
||||
"generatorVersion": "3.4.4",
|
||||
"flutterRoot": "file:///Users/rajeevsingh/Documents/allSoftwares/flutter",
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/","native_build":true,"dependencies":[]}],"macos":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]}],"date_created":"2025-01-21 18:29:05.898857","version":"3.22.3"}
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/","native_build":true,"dependencies":[]}],"macos":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"connectivity_plus","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]}],"date_created":"2025-01-21 18:58:23.867638","version":"3.22.3"}
|
||||
@@ -2,169 +2,185 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:grocery_app/src/ui/bottomnavigation/bottom_bar_widget.dart';
|
||||
import 'package:grocery_app/src/ui/entername/enter_fullname_screen.dart';
|
||||
import 'package:grocery_app/src/ui/login/login_screen.dart';
|
||||
import 'package:grocery_app/src/ui/onboarding/on_boarding_screen.dart';
|
||||
import 'package:grocery_app/src/ui/otp/otp_screen.dart';
|
||||
import 'package:grocery_app/src/ui/splash/splash_screen.dart';
|
||||
import 'package:grocery_app/utils/constants/globle_variable.dart';
|
||||
|
||||
|
||||
|
||||
/// Route names as constants
|
||||
class MyRoutes {
|
||||
static GoRouter router = GoRouter(
|
||||
navigatorKey: GlobalVariable.globalScaffoldKey,
|
||||
initialLocation: SPLASH,
|
||||
routes: [
|
||||
animatedGoRoute(
|
||||
path: SPLASH,
|
||||
name: SPLASH,
|
||||
pageBuilder: (context, state) => const SplashScreen(),
|
||||
),
|
||||
navigatorKey: GlobalVariable.globalScaffoldKey,
|
||||
initialLocation: SPLASH,
|
||||
routes: [
|
||||
animatedGoRoute(
|
||||
path: SPLASH,
|
||||
name: SPLASH,
|
||||
pageBuilder: (context, state) => const SplashScreen(),
|
||||
),
|
||||
|
||||
animatedGoRoute(
|
||||
animatedGoRoute(
|
||||
path: ONBOARDING,
|
||||
name: ONBOARDING,
|
||||
pageBuilder: (context, state) => const OnBoardingScreen(),
|
||||
),
|
||||
|
||||
animatedGoRoute(
|
||||
path: LOGIN,
|
||||
name: LOGIN,
|
||||
pageBuilder: (context, state) => LoginScreen(),
|
||||
),
|
||||
|
||||
|
||||
// animatedGoRoute(
|
||||
// path: SELECTACCOUNT,
|
||||
// name: SELECTACCOUNT,
|
||||
// pageBuilder: (context, state) => const SelectAccount(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: TERMANDCONDITIONS,
|
||||
// name: TERMANDCONDITIONS,
|
||||
// pageBuilder: (context, state) => const TermsAndConditionsScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: SETUPBUSSINESS,
|
||||
// name: SETUPBUSSINESS,
|
||||
// pageBuilder: (context, state) {
|
||||
// final extra = state.extra as Map<String, dynamic>?;
|
||||
// final String status = extra?['status'] ?? '';
|
||||
// return SetupBussiness(status: status);
|
||||
// }),
|
||||
// animatedGoRoute(
|
||||
// path: CREATESTORE,
|
||||
// name: CREATESTORE,
|
||||
// pageBuilder: (context, state) => const CreateStore(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: UPDATESTORE,
|
||||
// name: UPDATESTORE,
|
||||
// pageBuilder: (context, state) {
|
||||
// final extra = state.extra as Map<String, dynamic>?;
|
||||
// final String status = extra?['storeId'] ?? '';
|
||||
// return UpdateStoreScreen(storeId: status);
|
||||
// }
|
||||
|
||||
// ),
|
||||
animatedGoRoute(
|
||||
path: LOGIN,
|
||||
name: LOGIN,
|
||||
pageBuilder: (context, state) => LoginScreen(),
|
||||
),
|
||||
|
||||
|
||||
// animatedGoRoute(
|
||||
// path: SUBMITSCREEN,
|
||||
// name: SUBMITSCREEN,
|
||||
// pageBuilder: (context, state) => const PinCreated(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: APPROVEDSTATUS,
|
||||
// name: APPROVEDSTATUS,
|
||||
// pageBuilder: (context, state) => const ApprovalScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: SIGNUP,
|
||||
// name: SIGNUP,
|
||||
// pageBuilder: (context, state) => LoginHostScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: DASHBOARDSCREEN,
|
||||
// name: DASHBOARDSCREEN,
|
||||
// pageBuilder: (context, state) => DashboardScree(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: CUSTOMERORDER,
|
||||
// name: CUSTOMERORDER,
|
||||
// pageBuilder: (context, state) {
|
||||
// // Extract data from `state.extra`
|
||||
// final Map<String, dynamic> orderDetails =
|
||||
// state.extra as Map<String, dynamic>;
|
||||
animatedGoRoute(
|
||||
path: OTPSCREEN,
|
||||
name: OTPSCREEN,
|
||||
pageBuilder: (context, state) => const OtpScreen(),
|
||||
),
|
||||
|
||||
// return CustomerOrder(
|
||||
// orderDetails:
|
||||
// orderDetails, // Pass the data to the destination widget
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: PRODUCTFORMSCREEN,
|
||||
// name: PRODUCTFORMSCREEN,
|
||||
// pageBuilder: (context, state) => ProductFormScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: PRODUCTDETAILS,
|
||||
// name: PRODUCTDETAILS,
|
||||
// pageBuilder: (context, state) {
|
||||
// final Product product = state.extra as Product;
|
||||
// return Productdetails(
|
||||
// product: product, // Pass the `Product` object directly
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: TRANSACTIONHISTORY,
|
||||
// name: TRANSACTIONHISTORY,
|
||||
// pageBuilder: (context, state) => TransactionHistory(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: INSIGHTSHISTORY,
|
||||
// name: INSIGHTSHISTORY,
|
||||
// pageBuilder: (context, state) => InsightsHistory(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: DETAILSBUSSINESS,
|
||||
// name: DETAILSBUSSINESS,
|
||||
// pageBuilder: (context, state) => DetailsBussiness(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: STOREMANAGEMENT,
|
||||
// name: STOREMANAGEMENT,
|
||||
// pageBuilder: (context, state) => StoreManagement(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: SETTING,
|
||||
// name: SETTING,
|
||||
// pageBuilder: (context, state) => Settings(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: FORGETPASSWORD,
|
||||
// name: FORGETPASSWORD,
|
||||
// pageBuilder: (context, state) => ForgetPassword(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: VERIFYPASSWORD,
|
||||
// name: VERIFYPASSWORD,
|
||||
// pageBuilder: (context, state) => VerifyOtpForgetPassword(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: FORGETNEWPASSWORD,
|
||||
// name: FORGETNEWPASSWORD,
|
||||
// pageBuilder: (context, state) => ForgetNewPassword(),
|
||||
// ),
|
||||
// ],
|
||||
]
|
||||
);
|
||||
animatedGoRoute(
|
||||
path: FULLNAME,
|
||||
name: FULLNAME,
|
||||
pageBuilder: (context, state) => const EnterFullNameScreen(),
|
||||
),
|
||||
|
||||
animatedGoRoute(
|
||||
path: BOTTOMNAV,
|
||||
name: BOTTOMNAV,
|
||||
pageBuilder: (context, state) => const BottomBarWidget(),
|
||||
),
|
||||
|
||||
// animatedGoRoute(
|
||||
// path: TERMANDCONDITIONS,
|
||||
// name: TERMANDCONDITIONS,
|
||||
// pageBuilder: (context, state) => const TermsAndConditionsScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: SETUPBUSSINESS,
|
||||
// name: SETUPBUSSINESS,
|
||||
// pageBuilder: (context, state) {
|
||||
// final extra = state.extra as Map<String, dynamic>?;
|
||||
// final String status = extra?['status'] ?? '';
|
||||
// return SetupBussiness(status: status);
|
||||
// }),
|
||||
// animatedGoRoute(
|
||||
// path: CREATESTORE,
|
||||
// name: CREATESTORE,
|
||||
// pageBuilder: (context, state) => const CreateStore(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: UPDATESTORE,
|
||||
// name: UPDATESTORE,
|
||||
// pageBuilder: (context, state) {
|
||||
// final extra = state.extra as Map<String, dynamic>?;
|
||||
// final String status = extra?['storeId'] ?? '';
|
||||
// return UpdateStoreScreen(storeId: status);
|
||||
// }
|
||||
|
||||
// ),
|
||||
|
||||
// animatedGoRoute(
|
||||
// path: SUBMITSCREEN,
|
||||
// name: SUBMITSCREEN,
|
||||
// pageBuilder: (context, state) => const PinCreated(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: APPROVEDSTATUS,
|
||||
// name: APPROVEDSTATUS,
|
||||
// pageBuilder: (context, state) => const ApprovalScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: SIGNUP,
|
||||
// name: SIGNUP,
|
||||
// pageBuilder: (context, state) => LoginHostScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: DASHBOARDSCREEN,
|
||||
// name: DASHBOARDSCREEN,
|
||||
// pageBuilder: (context, state) => DashboardScree(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: CUSTOMERORDER,
|
||||
// name: CUSTOMERORDER,
|
||||
// pageBuilder: (context, state) {
|
||||
// // Extract data from `state.extra`
|
||||
// final Map<String, dynamic> orderDetails =
|
||||
// state.extra as Map<String, dynamic>;
|
||||
|
||||
// return CustomerOrder(
|
||||
// orderDetails:
|
||||
// orderDetails, // Pass the data to the destination widget
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: PRODUCTFORMSCREEN,
|
||||
// name: PRODUCTFORMSCREEN,
|
||||
// pageBuilder: (context, state) => ProductFormScreen(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: PRODUCTDETAILS,
|
||||
// name: PRODUCTDETAILS,
|
||||
// pageBuilder: (context, state) {
|
||||
// final Product product = state.extra as Product;
|
||||
// return Productdetails(
|
||||
// product: product, // Pass the `Product` object directly
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: TRANSACTIONHISTORY,
|
||||
// name: TRANSACTIONHISTORY,
|
||||
// pageBuilder: (context, state) => TransactionHistory(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: INSIGHTSHISTORY,
|
||||
// name: INSIGHTSHISTORY,
|
||||
// pageBuilder: (context, state) => InsightsHistory(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: DETAILSBUSSINESS,
|
||||
// name: DETAILSBUSSINESS,
|
||||
// pageBuilder: (context, state) => DetailsBussiness(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: STOREMANAGEMENT,
|
||||
// name: STOREMANAGEMENT,
|
||||
// pageBuilder: (context, state) => StoreManagement(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: SETTING,
|
||||
// name: SETTING,
|
||||
// pageBuilder: (context, state) => Settings(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: FORGETPASSWORD,
|
||||
// name: FORGETPASSWORD,
|
||||
// pageBuilder: (context, state) => ForgetPassword(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: VERIFYPASSWORD,
|
||||
// name: VERIFYPASSWORD,
|
||||
// pageBuilder: (context, state) => VerifyOtpForgetPassword(),
|
||||
// ),
|
||||
// animatedGoRoute(
|
||||
// path: FORGETNEWPASSWORD,
|
||||
// name: FORGETNEWPASSWORD,
|
||||
// pageBuilder: (context, state) => ForgetNewPassword(),
|
||||
// ),
|
||||
// ],
|
||||
]);
|
||||
|
||||
/// Route constants
|
||||
static const SPLASH = "/";
|
||||
static const FULLNAME = "/fullname";
|
||||
|
||||
static const BOTTOMNAV = "/bottomnav";
|
||||
|
||||
static const HOME = "/home";
|
||||
|
||||
static const SELECTACCOUNT = "/selectAccount";
|
||||
static const DASHBOARD = "/dashboard";
|
||||
|
||||
@@ -198,8 +214,8 @@ class MyRoutes {
|
||||
|
||||
static const FORGETNEWPASSWORD = "/forgetnewpassword";
|
||||
|
||||
static const UPDATESTORE = "/updatestore";
|
||||
|
||||
static const UPDATESTORE = "/updatestore";
|
||||
static const OTPSCREEN = "/otpscreen";
|
||||
}
|
||||
|
||||
GoRoute animatedGoRoute({
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:grocery_app/src/common_widget/textfield_widget.dart';
|
||||
import 'package:grocery_app/src/core/routes/routes.dart';
|
||||
import 'package:grocery_app/src/ui/bottomnavigation/bottom_bar_widget.dart';
|
||||
import 'package:grocery_app/utils/constants/assets_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/string_constant.dart';
|
||||
import 'package:grocery_app/utils/extensions/extensions.dart';
|
||||
import 'package:grocery_app/utils/extensions/uicontext.dart';
|
||||
|
||||
class EnterFullNameScreen extends StatefulWidget {
|
||||
@@ -15,6 +18,9 @@ class EnterFullNameScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _EnterFullNameScreenState extends State<EnterFullNameScreen> {
|
||||
|
||||
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -42,10 +48,33 @@ class _EnterFullNameScreenState extends State<EnterFullNameScreen> {
|
||||
style: context.customMedium(APPCOLOR.black333333, 18),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
AppTextFieldWidget(
|
||||
controller: TextEditingController(),
|
||||
hintText: APPSTRING.fullNameHint,
|
||||
),
|
||||
Form(
|
||||
key: _formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
AppTextFieldWidget(
|
||||
controller: TextEditingController(),
|
||||
hintText: APPSTRING.firstNameHint,
|
||||
onValidate: (value){
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please Enter first Name';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
AppTextFieldWidget(
|
||||
controller: TextEditingController(),
|
||||
hintText: APPSTRING.lastNameHint,
|
||||
onValidate: (value){
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please Enter last Name';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -60,16 +89,25 @@ class _EnterFullNameScreenState extends State<EnterFullNameScreen> {
|
||||
child: Center(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return const BottomBarWidget();
|
||||
},
|
||||
));
|
||||
|
||||
if (_formKey.currentState?.validate() ?? false) {
|
||||
context.clearAndPush( routePath: MyRoutes.BOTTOMNAV);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Navigator.of(context).push(MaterialPageRoute(
|
||||
// builder: (context) {
|
||||
// return const BottomBarWidget();
|
||||
// },
|
||||
// ));
|
||||
},
|
||||
child: Container(
|
||||
height: 50,
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
decoration: BoxDecoration(color: APPCOLOR.appGreen, borderRadius: BorderRadius.circular(4)),
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.appGreen,
|
||||
borderRadius: BorderRadius.circular(4)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
APPSTRING.continueBtn,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:grocery_app/src/common_widget/textfield_widget.dart';
|
||||
import 'package:grocery_app/src/core/routes/routes.dart';
|
||||
import 'package:grocery_app/src/ui/otp/otp_screen.dart';
|
||||
import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/string_constant.dart';
|
||||
@@ -80,12 +82,16 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
print("djkhfjdgf ${_formKey.currentState?.validate()}");
|
||||
if (_formKey.currentState?.validate() ?? false) {
|
||||
Navigator.of(context).push(MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return const OtpScreen();
|
||||
},
|
||||
));
|
||||
if (_formKey.currentState?.validate() ?? false)
|
||||
{
|
||||
context.push(MyRoutes.OTPSCREEN);
|
||||
|
||||
// Navigator.of(context).push(MaterialPageRoute(
|
||||
// builder: (context)
|
||||
// {
|
||||
// return const OtpScreen();
|
||||
// },
|
||||
// ));
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:grocery_app/src/ui/entername/enter_fullname_screen.dart';
|
||||
import 'package:grocery_app/utils/constants/assets_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||
@@ -9,6 +10,8 @@ import 'package:grocery_app/utils/extensions/uicontext.dart';
|
||||
import 'package:otp_text_field/otp_text_field.dart';
|
||||
import 'package:otp_text_field/style.dart';
|
||||
|
||||
import '../../core/routes/routes.dart';
|
||||
|
||||
class OtpScreen extends StatefulWidget {
|
||||
const OtpScreen({super.key});
|
||||
|
||||
@@ -34,10 +37,9 @@ class _OtpScreenState extends State<OtpScreen> {
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
InkWell(
|
||||
onTap: ()
|
||||
{
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
},
|
||||
child: SvgPicture.asset(APPASSETS.back)),
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
@@ -54,15 +56,17 @@ class _OtpScreenState extends State<OtpScreen> {
|
||||
const SizedBox(height: 20),
|
||||
OTPTextField(
|
||||
length: 6,
|
||||
onChanged: (c)
|
||||
{
|
||||
if (c.length == 6)
|
||||
{
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return const EnterFullNameScreen();
|
||||
},
|
||||
));
|
||||
onChanged: (c) {
|
||||
if (c.length == 6)
|
||||
{
|
||||
context.push(MyRoutes.FULLNAME);
|
||||
|
||||
// Navigator.push(context, MaterialPageRoute(
|
||||
// builder: (context)
|
||||
// {
|
||||
// return const EnterFullNameScreen();
|
||||
// },
|
||||
// ));
|
||||
}
|
||||
},
|
||||
width: MediaQuery.of(context).size.width,
|
||||
@@ -79,12 +83,15 @@ class _OtpScreenState extends State<OtpScreen> {
|
||||
height: 10,
|
||||
),
|
||||
RichText(
|
||||
text: TextSpan(text: 'Didn’t get the code? ', style: context.customRegular(APPCOLOR.gery48514D, 14), children: [
|
||||
TextSpan(
|
||||
text: 'Resend',
|
||||
style: context.customRegular(APPCOLOR.appGreen, 14),
|
||||
)
|
||||
]))
|
||||
text: TextSpan(
|
||||
text: 'Didn’t get the code? ',
|
||||
style: context.customRegular(APPCOLOR.gery48514D, 14),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Resend',
|
||||
style: context.customRegular(APPCOLOR.appGreen, 14),
|
||||
)
|
||||
]))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -10,7 +10,8 @@ class APPSTRING {
|
||||
|
||||
//hint
|
||||
static const String phoneNumberHint = "Phone Number";
|
||||
static const String fullNameHint = "Full Name";
|
||||
static const String firstNameHint = "First Name";
|
||||
static const String lastNameHint = "last Name";
|
||||
|
||||
//button
|
||||
static const String verifyButton = "Verify";
|
||||
|
||||
Reference in New Issue
Block a user