bottomNav

This commit is contained in:
2025-01-21 18:58:52 +05:30
parent 9fee5eb24d
commit 26aaa8c4e8
7 changed files with 250 additions and 182 deletions

View File

@@ -590,7 +590,7 @@
"languageVersion": "3.4" "languageVersion": "3.4"
} }
], ],
"generated": "2025-01-21T12:59:05.713152Z", "generated": "2025-01-21T13:28:23.681235Z",
"generator": "pub", "generator": "pub",
"generatorVersion": "3.4.4", "generatorVersion": "3.4.4",
"flutterRoot": "file:///Users/rajeevsingh/Documents/allSoftwares/flutter", "flutterRoot": "file:///Users/rajeevsingh/Documents/allSoftwares/flutter",

View File

@@ -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"}

View File

@@ -2,169 +2,185 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.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/login/login_screen.dart';
import 'package:grocery_app/src/ui/onboarding/on_boarding_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/src/ui/splash/splash_screen.dart';
import 'package:grocery_app/utils/constants/globle_variable.dart'; import 'package:grocery_app/utils/constants/globle_variable.dart';
/// Route names as constants /// Route names as constants
class MyRoutes { class MyRoutes {
static GoRouter router = GoRouter( static GoRouter router = GoRouter(
navigatorKey: GlobalVariable.globalScaffoldKey, navigatorKey: GlobalVariable.globalScaffoldKey,
initialLocation: SPLASH, initialLocation: SPLASH,
routes: [ routes: [
animatedGoRoute( animatedGoRoute(
path: SPLASH, path: SPLASH,
name: SPLASH, name: SPLASH,
pageBuilder: (context, state) => const SplashScreen(), pageBuilder: (context, state) => const SplashScreen(),
), ),
animatedGoRoute( animatedGoRoute(
path: ONBOARDING, path: ONBOARDING,
name: ONBOARDING, name: ONBOARDING,
pageBuilder: (context, state) => const OnBoardingScreen(), pageBuilder: (context, state) => const OnBoardingScreen(),
), ),
animatedGoRoute( animatedGoRoute(
path: LOGIN, path: LOGIN,
name: LOGIN, name: LOGIN,
pageBuilder: (context, state) => LoginScreen(), pageBuilder: (context, state) => LoginScreen(),
), ),
animatedGoRoute(
path: OTPSCREEN,
name: OTPSCREEN,
pageBuilder: (context, state) => const OtpScreen(),
),
// animatedGoRoute( animatedGoRoute(
// path: SELECTACCOUNT, path: FULLNAME,
// name: SELECTACCOUNT, name: FULLNAME,
// pageBuilder: (context, state) => const SelectAccount(), pageBuilder: (context, state) => const EnterFullNameScreen(),
// ), ),
// 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: 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( // animatedGoRoute(
// orderDetails: // path: SUBMITSCREEN,
// orderDetails, // Pass the data to the destination widget // name: SUBMITSCREEN,
// ); // pageBuilder: (context, state) => const PinCreated(),
// }, // ),
// ), // animatedGoRoute(
// animatedGoRoute( // path: APPROVEDSTATUS,
// path: PRODUCTFORMSCREEN, // name: APPROVEDSTATUS,
// name: PRODUCTFORMSCREEN, // pageBuilder: (context, state) => const ApprovalScreen(),
// pageBuilder: (context, state) => ProductFormScreen(), // ),
// ), // animatedGoRoute(
// animatedGoRoute( // path: SIGNUP,
// path: PRODUCTDETAILS, // name: SIGNUP,
// name: PRODUCTDETAILS, // pageBuilder: (context, state) => LoginHostScreen(),
// pageBuilder: (context, state) { // ),
// final Product product = state.extra as Product; // animatedGoRoute(
// return Productdetails( // path: DASHBOARDSCREEN,
// product: product, // Pass the `Product` object directly // name: DASHBOARDSCREEN,
// ); // pageBuilder: (context, state) => DashboardScree(),
// }, // ),
// ), // animatedGoRoute(
// animatedGoRoute( // path: CUSTOMERORDER,
// path: TRANSACTIONHISTORY, // name: CUSTOMERORDER,
// name: TRANSACTIONHISTORY, // pageBuilder: (context, state) {
// pageBuilder: (context, state) => TransactionHistory(), // // Extract data from `state.extra`
// ), // final Map<String, dynamic> orderDetails =
// animatedGoRoute( // state.extra as Map<String, dynamic>;
// path: INSIGHTSHISTORY,
// name: INSIGHTSHISTORY, // return CustomerOrder(
// pageBuilder: (context, state) => InsightsHistory(), // orderDetails:
// ), // orderDetails, // Pass the data to the destination widget
// animatedGoRoute( // );
// path: DETAILSBUSSINESS, // },
// name: DETAILSBUSSINESS, // ),
// pageBuilder: (context, state) => DetailsBussiness(), // animatedGoRoute(
// ), // path: PRODUCTFORMSCREEN,
// animatedGoRoute( // name: PRODUCTFORMSCREEN,
// path: STOREMANAGEMENT, // pageBuilder: (context, state) => ProductFormScreen(),
// name: STOREMANAGEMENT, // ),
// pageBuilder: (context, state) => StoreManagement(), // animatedGoRoute(
// ), // path: PRODUCTDETAILS,
// animatedGoRoute( // name: PRODUCTDETAILS,
// path: SETTING, // pageBuilder: (context, state) {
// name: SETTING, // final Product product = state.extra as Product;
// pageBuilder: (context, state) => Settings(), // return Productdetails(
// ), // product: product, // Pass the `Product` object directly
// animatedGoRoute( // );
// path: FORGETPASSWORD, // },
// name: FORGETPASSWORD, // ),
// pageBuilder: (context, state) => ForgetPassword(), // animatedGoRoute(
// ), // path: TRANSACTIONHISTORY,
// animatedGoRoute( // name: TRANSACTIONHISTORY,
// path: VERIFYPASSWORD, // pageBuilder: (context, state) => TransactionHistory(),
// name: VERIFYPASSWORD, // ),
// pageBuilder: (context, state) => VerifyOtpForgetPassword(), // animatedGoRoute(
// ), // path: INSIGHTSHISTORY,
// animatedGoRoute( // name: INSIGHTSHISTORY,
// path: FORGETNEWPASSWORD, // pageBuilder: (context, state) => InsightsHistory(),
// name: FORGETNEWPASSWORD, // ),
// pageBuilder: (context, state) => ForgetNewPassword(), // 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 /// Route constants
static const SPLASH = "/"; static const SPLASH = "/";
static const FULLNAME = "/fullname";
static const BOTTOMNAV = "/bottomnav";
static const HOME = "/home"; static const HOME = "/home";
static const SELECTACCOUNT = "/selectAccount"; static const SELECTACCOUNT = "/selectAccount";
static const DASHBOARD = "/dashboard"; static const DASHBOARD = "/dashboard";
@@ -198,8 +214,8 @@ class MyRoutes {
static const FORGETNEWPASSWORD = "/forgetnewpassword"; static const FORGETNEWPASSWORD = "/forgetnewpassword";
static const UPDATESTORE = "/updatestore"; static const UPDATESTORE = "/updatestore";
static const OTPSCREEN = "/otpscreen";
} }
GoRoute animatedGoRoute({ GoRoute animatedGoRoute({

View File

@@ -1,10 +1,13 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.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/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/src/ui/bottomnavigation/bottom_bar_widget.dart';
import 'package:grocery_app/utils/constants/assets_constant.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/color_constant.dart';
import 'package:grocery_app/utils/constants/string_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'; import 'package:grocery_app/utils/extensions/uicontext.dart';
class EnterFullNameScreen extends StatefulWidget { class EnterFullNameScreen extends StatefulWidget {
@@ -15,6 +18,9 @@ class EnterFullNameScreen extends StatefulWidget {
} }
class _EnterFullNameScreenState extends State<EnterFullNameScreen> { class _EnterFullNameScreenState extends State<EnterFullNameScreen> {
final _formKey = GlobalKey<FormState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@@ -42,10 +48,33 @@ class _EnterFullNameScreenState extends State<EnterFullNameScreen> {
style: context.customMedium(APPCOLOR.black333333, 18), style: context.customMedium(APPCOLOR.black333333, 18),
), ),
const SizedBox(height: 30), const SizedBox(height: 30),
AppTextFieldWidget( Form(
controller: TextEditingController(), key: _formKey,
hintText: APPSTRING.fullNameHint, 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: Center(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) { if (_formKey.currentState?.validate() ?? false) {
return const BottomBarWidget(); context.clearAndPush( routePath: MyRoutes.BOTTOMNAV);
}, }
));
// Navigator.of(context).push(MaterialPageRoute(
// builder: (context) {
// return const BottomBarWidget();
// },
// ));
}, },
child: Container( child: Container(
height: 50, height: 50,
width: MediaQuery.sizeOf(context).width, 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: Center(
child: Text( child: Text(
APPSTRING.continueBtn, APPSTRING.continueBtn,

View File

@@ -1,5 +1,7 @@
import 'package:flutter/material.dart'; 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/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/src/ui/otp/otp_screen.dart';
import 'package:grocery_app/utils/constants/color_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/constants/string_constant.dart';
@@ -80,12 +82,16 @@ class _LoginScreenState extends State<LoginScreen> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("djkhfjdgf ${_formKey.currentState?.validate()}"); print("djkhfjdgf ${_formKey.currentState?.validate()}");
if (_formKey.currentState?.validate() ?? false) { if (_formKey.currentState?.validate() ?? false)
Navigator.of(context).push(MaterialPageRoute( {
builder: (context) { context.push(MyRoutes.OTPSCREEN);
return const OtpScreen();
}, // Navigator.of(context).push(MaterialPageRoute(
)); // builder: (context)
// {
// return const OtpScreen();
// },
// ));
} }
}, },
child: Container( child: Container(

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.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/src/ui/entername/enter_fullname_screen.dart';
import 'package:grocery_app/utils/constants/assets_constant.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/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/otp_text_field.dart';
import 'package:otp_text_field/style.dart'; import 'package:otp_text_field/style.dart';
import '../../core/routes/routes.dart';
class OtpScreen extends StatefulWidget { class OtpScreen extends StatefulWidget {
const OtpScreen({super.key}); const OtpScreen({super.key});
@@ -34,10 +37,9 @@ class _OtpScreenState extends State<OtpScreen> {
children: [ children: [
const SizedBox(height: 30), const SizedBox(height: 30),
InkWell( InkWell(
onTap: () onTap: () {
{
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: SvgPicture.asset(APPASSETS.back)), child: SvgPicture.asset(APPASSETS.back)),
const SizedBox(height: 30), const SizedBox(height: 30),
Text( Text(
@@ -54,15 +56,17 @@ class _OtpScreenState extends State<OtpScreen> {
const SizedBox(height: 20), const SizedBox(height: 20),
OTPTextField( OTPTextField(
length: 6, length: 6,
onChanged: (c) onChanged: (c) {
{
if (c.length == 6) if (c.length == 6)
{ {
Navigator.push(context, MaterialPageRoute( context.push(MyRoutes.FULLNAME);
builder: (context) {
return const EnterFullNameScreen(); // Navigator.push(context, MaterialPageRoute(
}, // builder: (context)
)); // {
// return const EnterFullNameScreen();
// },
// ));
} }
}, },
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
@@ -79,12 +83,15 @@ class _OtpScreenState extends State<OtpScreen> {
height: 10, height: 10,
), ),
RichText( RichText(
text: TextSpan(text: 'Didnt get the code? ', style: context.customRegular(APPCOLOR.gery48514D, 14), children: [ text: TextSpan(
TextSpan( text: 'Didnt get the code? ',
text: 'Resend', style: context.customRegular(APPCOLOR.gery48514D, 14),
style: context.customRegular(APPCOLOR.appGreen, 14), children: [
) TextSpan(
])) text: 'Resend',
style: context.customRegular(APPCOLOR.appGreen, 14),
)
]))
], ],
), ),
), ),

View File

@@ -10,7 +10,8 @@ class APPSTRING {
//hint //hint
static const String phoneNumberHint = "Phone Number"; 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 //button
static const String verifyButton = "Verify"; static const String verifyButton = "Verify";