feat:login page done
This commit is contained in:
@@ -13,6 +13,8 @@ import 'package:dio/dio.dart' as _i361;
|
|||||||
import 'package:get_it/get_it.dart' as _i174;
|
import 'package:get_it/get_it.dart' as _i174;
|
||||||
import 'package:injectable/injectable.dart' as _i526;
|
import 'package:injectable/injectable.dart' as _i526;
|
||||||
|
|
||||||
|
import '../../feature/auth/presentation/blocs/login_bloc/login_bloc.dart'
|
||||||
|
as _i1065;
|
||||||
import '../../feature/basket/presentation/blocs/basket_bloc.dart' as _i728;
|
import '../../feature/basket/presentation/blocs/basket_bloc.dart' as _i728;
|
||||||
import '../../feature/browse/presentation/blocs/browse_bloc/browse_bloc.dart'
|
import '../../feature/browse/presentation/blocs/browse_bloc/browse_bloc.dart'
|
||||||
as _i991;
|
as _i991;
|
||||||
@@ -40,6 +42,7 @@ extension GetItInjectableX on _i174.GetIt {
|
|||||||
final dioModule = _$DioModule();
|
final dioModule = _$DioModule();
|
||||||
gh.factory<_i1007.HomeBloc>(() => _i1007.HomeBloc());
|
gh.factory<_i1007.HomeBloc>(() => _i1007.HomeBloc());
|
||||||
gh.factory<_i728.BasketBloc>(() => _i728.BasketBloc());
|
gh.factory<_i728.BasketBloc>(() => _i728.BasketBloc());
|
||||||
|
gh.factory<_i1065.LoginBloc>(() => _i1065.LoginBloc());
|
||||||
gh.factory<_i991.BrowseBloc>(() => _i991.BrowseBloc());
|
gh.factory<_i991.BrowseBloc>(() => _i991.BrowseBloc());
|
||||||
gh.factory<_i580.MainBloc>(() => _i580.MainBloc());
|
gh.factory<_i580.MainBloc>(() => _i580.MainBloc());
|
||||||
gh.factory<_i311.SplashBloc>(() => _i311.SplashBloc());
|
gh.factory<_i311.SplashBloc>(() => _i311.SplashBloc());
|
||||||
|
|||||||
31
lib/core/helpers/formatters.dart
Normal file
31
lib/core/helpers/formatters.dart
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import 'package:mask_text_input_formatter/mask_text_input_formatter.dart';
|
||||||
|
|
||||||
|
abstract class Formatters {
|
||||||
|
static final phoneFormatter = MaskTextInputFormatter(
|
||||||
|
mask: '## ### ## ##',
|
||||||
|
filter: {"#": RegExp(r'[0-9]')},
|
||||||
|
type: MaskAutoCompletionType.lazy,
|
||||||
|
);
|
||||||
|
|
||||||
|
static final cardFormatter = MaskTextInputFormatter(
|
||||||
|
mask: '#### #### #### ####',
|
||||||
|
filter: {"#": RegExp(r'[0-9]')},
|
||||||
|
type: MaskAutoCompletionType.lazy,
|
||||||
|
);
|
||||||
|
static final cardNumberFormatter = MaskTextInputFormatter(
|
||||||
|
mask: '#### #### #### ####',
|
||||||
|
filter: {"#": RegExp(r'[0-9]')},
|
||||||
|
type: MaskAutoCompletionType.lazy,
|
||||||
|
);
|
||||||
|
|
||||||
|
static final cardExpirationDateFormatter = MaskTextInputFormatter(
|
||||||
|
mask: '##/##',
|
||||||
|
filter: {"#": RegExp(r'[0-9]')},
|
||||||
|
type: MaskAutoCompletionType.lazy,
|
||||||
|
);
|
||||||
|
static final moneyFormatter = MaskTextInputFormatter(
|
||||||
|
mask: '########',
|
||||||
|
filter: {"#": RegExp(r'[0-9]')},
|
||||||
|
type: MaskAutoCompletionType.lazy,
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/login_page/login_page.dart';
|
||||||
import 'package:food_delivery_client/feature/home/presentation/pages/restaurants_by_category_page/restaurants_by_category_page.dart';
|
import 'package:food_delivery_client/feature/home/presentation/pages/restaurants_by_category_page/restaurants_by_category_page.dart';
|
||||||
|
|
||||||
import '../../food_delivery_client.dart';
|
import '../../food_delivery_client.dart';
|
||||||
@@ -12,6 +13,11 @@ class AppRoutes {
|
|||||||
initialLocation: Routes.splash,
|
initialLocation: Routes.splash,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(path: Routes.splash, builder: (context, state) => SplashPage()),
|
GoRoute(path: Routes.splash, builder: (context, state) => SplashPage()),
|
||||||
|
GoRoute(
|
||||||
|
path: Routes.login,
|
||||||
|
pageBuilder: (context, state) => CupertinoPage(child: LoginPage()),
|
||||||
|
),
|
||||||
|
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: Routes.main,
|
path: Routes.main,
|
||||||
pageBuilder: (context, state) => CupertinoPage(child: MainPage()),
|
pageBuilder: (context, state) => CupertinoPage(child: MainPage()),
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:dartz/dartz.dart';
|
import 'package:dartz/dartz.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
|||||||
@@ -24,5 +24,6 @@ abstract class AppColors {
|
|||||||
static const Color c05A357 = Color(0xFF05A357);
|
static const Color c05A357 = Color(0xFF05A357);
|
||||||
static const Color cE8E8E8 = Color(0xFFE8E8E8);
|
static const Color cE8E8E8 = Color(0xFFE8E8E8);
|
||||||
static const Color c660000 = Color(0x66000000);
|
static const Color c660000 = Color(0x66000000);
|
||||||
|
static const Color c6A6E7F = Color(0xFF6A6E7F);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,18 @@ import '../../food_delivery_client.dart';
|
|||||||
abstract class AppTheme {
|
abstract class AppTheme {
|
||||||
static ThemeData get lightTheme => ThemeData.light().copyWith(
|
static ThemeData get lightTheme => ThemeData.light().copyWith(
|
||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
|
|
||||||
|
// colorScheme: ColorScheme(
|
||||||
|
// brightness: Brightness.light,
|
||||||
|
// primary: AppColors.cFFFFFF,
|
||||||
|
// onPrimary:AppColors.cFFFFFF,
|
||||||
|
// secondary: AppColors.cFFFFFF,
|
||||||
|
// onSecondary: AppColors.cFFFFFF,
|
||||||
|
// error:AppColors.cRed,
|
||||||
|
// onError: AppColors.cRed,
|
||||||
|
// surface: AppColors.cFFFFFF,
|
||||||
|
// onSurface: AppColors.cFFFFFF,
|
||||||
|
// ),
|
||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
backgroundColor: AppColors.cFFFFFF,
|
backgroundColor: AppColors.cFFFFFF,
|
||||||
@@ -10,14 +22,28 @@ abstract class AppTheme {
|
|||||||
surfaceTintColor: AppColors.cTransparent,
|
surfaceTintColor: AppColors.cTransparent,
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: AppColors.cFFFFFF,
|
scaffoldBackgroundColor: AppColors.cFFFFFF,
|
||||||
|
|
||||||
|
progressIndicatorTheme: ProgressIndicatorThemeData(
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
|
circularTrackColor: AppColors.cFFFFFF,
|
||||||
|
linearTrackColor: AppColors.cFFFFFF,
|
||||||
|
borderRadius: BorderRadiusGeometry.circular(30),
|
||||||
|
),
|
||||||
|
|
||||||
|
pageTransitionsTheme: PageTransitionsTheme(
|
||||||
|
builders: {
|
||||||
|
TargetPlatform.android: CupertinoPageTransitionsBuilder(),
|
||||||
|
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
|
||||||
|
},
|
||||||
|
),
|
||||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||||
elevation:0,
|
elevation: 0,
|
||||||
showSelectedLabels: true,
|
showSelectedLabels: true,
|
||||||
showUnselectedLabels: true,
|
showUnselectedLabels: true,
|
||||||
backgroundColor: AppColors.cFFFFFF,
|
backgroundColor: AppColors.cFFFFFF,
|
||||||
type: BottomNavigationBarType.fixed,
|
type: BottomNavigationBarType.fixed,
|
||||||
unselectedItemColor: AppColors.cB5B5B5,
|
unselectedItemColor: AppColors.cB5B5B5,
|
||||||
selectedItemColor:AppColors.c000000,
|
selectedItemColor: AppColors.c000000,
|
||||||
selectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
selectedLabelStyle: AppTextStyles.size10Regular.copyWith(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import 'package:food_delivery_client/food_delivery_client.dart';
|
||||||
|
|
||||||
|
part 'login_event.dart';
|
||||||
|
|
||||||
|
part 'login_state.dart';
|
||||||
|
|
||||||
|
part 'login_bloc.freezed.dart';
|
||||||
|
|
||||||
|
@injectable
|
||||||
|
class LoginBloc extends Bloc<LoginEvent, LoginState> {
|
||||||
|
LoginBloc() : super(const LoginState()) {
|
||||||
|
on<_Login>(_onLogin);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onLogin(_Login event, Emitter<LoginState> emit) async {
|
||||||
|
emit(state.copyWith(status: RequestStatus.loading));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'login_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
class LoginEvent with _$LoginEvent {
|
||||||
|
const factory LoginEvent.checked() = _Checked;
|
||||||
|
|
||||||
|
const factory LoginEvent.login() = _Login;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
part of 'login_bloc.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class LoginState with _$LoginState {
|
||||||
|
const factory LoginState({
|
||||||
|
@Default(RequestStatus.initial) RequestStatus status,
|
||||||
|
}) = _LoginState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import 'package:food_delivery_client/feature/auth/presentation/blocs/login_bloc/login_bloc.dart';
|
||||||
|
import 'package:food_delivery_client/feature/auth/presentation/pages/login_page/widgets/login_body.dart';
|
||||||
|
|
||||||
|
import '../../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
class LoginPage extends StatelessWidget {
|
||||||
|
const LoginPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocProvider(
|
||||||
|
create: (context) => sl<LoginBloc>(),
|
||||||
|
child: WLayout(
|
||||||
|
child: Scaffold(
|
||||||
|
body: WLoginBody(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:food_delivery_client/core/helpers/formatters.dart';
|
||||||
|
|
||||||
|
import '../../../../../../food_delivery_client.dart';
|
||||||
|
import '../../../blocs/login_bloc/login_bloc.dart';
|
||||||
|
|
||||||
|
class WLoginBody extends StatefulWidget {
|
||||||
|
const WLoginBody({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<WLoginBody> createState() => _WLoginBodyState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _WLoginBodyState extends State<WLoginBody> {
|
||||||
|
late final TextEditingController _phoneController;
|
||||||
|
late final TextEditingController _passwordController;
|
||||||
|
final GlobalKey _formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_phoneController = TextEditingController();
|
||||||
|
_passwordController = TextEditingController();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_phoneController.dispose();
|
||||||
|
_passwordController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocBuilder<LoginBloc, LoginState>(
|
||||||
|
builder: (context, state) {
|
||||||
|
return Form(
|
||||||
|
key: _formKey,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
45.verticalSpace,
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentGeometry.center,
|
||||||
|
child: Text("Let's go", style: AppTextStyles.size24Bold),
|
||||||
|
),
|
||||||
|
20.verticalSpace,
|
||||||
|
Text(
|
||||||
|
'Phone number',
|
||||||
|
style: AppTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.c6A6E7F,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
5.verticalSpace,
|
||||||
|
AppTextFormField(
|
||||||
|
height: 50,
|
||||||
|
hintText: "Enter phone number",
|
||||||
|
prefixIcon: Text(
|
||||||
|
"+ 998",
|
||||||
|
style: AppTextStyles.size16Regular.copyWith(fontSize: 16),
|
||||||
|
),
|
||||||
|
borderRadius: AppUtils.kBorderRadius8,
|
||||||
|
controller: _phoneController,
|
||||||
|
keyBoardType: TextInputType.number,
|
||||||
|
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
Formatters.phoneFormatter,
|
||||||
|
LengthLimitingTextInputFormatter(12),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
20.verticalSpace,
|
||||||
|
Text(
|
||||||
|
'Password',
|
||||||
|
style: AppTextStyles.size14Regular.copyWith(
|
||||||
|
color: AppColors.c6A6E7F,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
5.verticalSpace,
|
||||||
|
AppTextFormField(
|
||||||
|
height: 50,
|
||||||
|
hintText: "Enter password",
|
||||||
|
keyBoardType: TextInputType.text,
|
||||||
|
borderRadius: AppUtils.kBorderRadius8,
|
||||||
|
controller: _passwordController,
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentGeometry.centerRight,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text('Forgot password'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
const Spacer(),
|
||||||
|
AppButton(
|
||||||
|
name: "Continue",
|
||||||
|
isLoading: state.status.isLoading(),
|
||||||
|
onPressed: () {},
|
||||||
|
borderRadius: 15,
|
||||||
|
backgroundColor: AppColors.c34A853,
|
||||||
|
),
|
||||||
|
20.verticalSpace,
|
||||||
|
],
|
||||||
|
).paddingSymmetric(horizontal: 16),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
|
|
||||||
import '../../../../food_delivery_client.dart';
|
import '../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
|
|
||||||
class AppButton extends StatelessWidget {
|
class AppButton extends StatelessWidget {
|
||||||
const AppButton({
|
const AppButton({
|
||||||
super.key,
|
super.key,
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.onPressed,
|
this.onPressed,
|
||||||
this.margin,
|
this.margin,
|
||||||
this.backgroundColor,
|
this.backgroundColor,
|
||||||
this.borderRadius,
|
this.borderRadius,
|
||||||
@@ -16,10 +14,11 @@ class AppButton extends StatelessWidget {
|
|||||||
this.action,
|
this.action,
|
||||||
this.trailing,
|
this.trailing,
|
||||||
this.mainAxisAlignment,
|
this.mainAxisAlignment,
|
||||||
|
this.isLoading = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String name;
|
final String name;
|
||||||
final VoidCallback onPressed;
|
final VoidCallback? onPressed;
|
||||||
final EdgeInsets? margin;
|
final EdgeInsets? margin;
|
||||||
final Color? backgroundColor;
|
final Color? backgroundColor;
|
||||||
final Color? textColor;
|
final Color? textColor;
|
||||||
@@ -28,6 +27,7 @@ class AppButton extends StatelessWidget {
|
|||||||
final double? height;
|
final double? height;
|
||||||
final Widget? action;
|
final Widget? action;
|
||||||
final Widget? trailing;
|
final Widget? trailing;
|
||||||
|
final bool isLoading;
|
||||||
final MainAxisAlignment? mainAxisAlignment;
|
final MainAxisAlignment? mainAxisAlignment;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -45,13 +45,25 @@ class AppButton extends StatelessWidget {
|
|||||||
color: backgroundColor ?? AppColors.c000000,
|
color: backgroundColor ?? AppColors.c000000,
|
||||||
borderRadius: BorderRadius.circular(borderRadius ?? 0),
|
borderRadius: BorderRadius.circular(borderRadius ?? 0),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: isLoading
|
||||||
mainAxisAlignment: mainAxisAlignment ?? MainAxisAlignment.center,
|
? Center(
|
||||||
|
child: CircularProgressIndicator.adaptive(
|
||||||
|
padding: EdgeInsets.all(2),
|
||||||
|
valueColor: AlwaysStoppedAnimation(AppColors.cFFFFFF),
|
||||||
|
backgroundColor: AppColors.cFFFFFF,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
mainAxisAlignment ?? MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
action ?? AppUtils.kSizedBox,
|
action ?? AppUtils.kSizedBox,
|
||||||
Text(name, style: AppTextStyles.size16Bold.copyWith(
|
Text(
|
||||||
color: AppColors.cFFFFFF
|
name,
|
||||||
)),
|
style: AppTextStyles.size16Bold.copyWith(
|
||||||
|
color: AppColors.cFFFFFF,
|
||||||
|
),
|
||||||
|
),
|
||||||
trailing ?? AppUtils.kSizedBox,
|
trailing ?? AppUtils.kSizedBox,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ class AppTextFormField extends StatelessWidget {
|
|||||||
this.obscureText = false,
|
this.obscureText = false,
|
||||||
required this.controller,
|
required this.controller,
|
||||||
this.prefixIcon,
|
this.prefixIcon,
|
||||||
this.prefixSvgPath, this.focusNode,
|
this.prefixSvgPath,
|
||||||
|
this.focusNode,
|
||||||
|
this.borderRadius,
|
||||||
|
this.height,
|
||||||
});
|
});
|
||||||
|
|
||||||
final int? maxLines;
|
final int? maxLines;
|
||||||
@@ -37,10 +40,14 @@ class AppTextFormField extends StatelessWidget {
|
|||||||
late final Widget? prefixIcon;
|
late final Widget? prefixIcon;
|
||||||
final String? prefixSvgPath;
|
final String? prefixSvgPath;
|
||||||
final FocusNode? focusNode;
|
final FocusNode? focusNode;
|
||||||
|
final BorderRadius? borderRadius;
|
||||||
|
final double? height;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TextFormField(
|
return SizedBox(
|
||||||
|
height: height ?? 44,
|
||||||
|
child: TextFormField(
|
||||||
enabled: true,
|
enabled: true,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
maxLines: maxLines ?? 1,
|
maxLines: maxLines ?? 1,
|
||||||
@@ -61,35 +68,31 @@ class AppTextFormField extends StatelessWidget {
|
|||||||
fillColor: fillColor ?? AppColors.cEEEEEE,
|
fillColor: fillColor ?? AppColors.cEEEEEE,
|
||||||
hintText: hintText,
|
hintText: hintText,
|
||||||
hintStyle: hintTextStyle,
|
hintStyle: hintTextStyle,
|
||||||
prefixIconConstraints: BoxConstraints(
|
prefixIconConstraints: BoxConstraints(minHeight: 24, minWidth: 0),
|
||||||
minHeight: 0,
|
|
||||||
maxHeight: 24,
|
|
||||||
maxWidth: 34,
|
|
||||||
minWidth: 0,
|
|
||||||
),
|
|
||||||
prefixIcon: prefixIcon?.paddingOnly(left: 10).paddingAll(3),
|
prefixIcon: prefixIcon?.paddingOnly(left: 10).paddingAll(3),
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 12, horizontal: 12),
|
contentPadding: EdgeInsets.symmetric(vertical: 12, horizontal: 12),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: AppUtils.kBorderRadius40,
|
borderRadius: borderRadius ?? AppUtils.kBorderRadius40,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderRadius: AppUtils.kBorderRadius40,
|
borderRadius: borderRadius ?? AppUtils.kBorderRadius40,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderRadius: AppUtils.kBorderRadius40,
|
borderRadius: borderRadius ?? AppUtils.kBorderRadius40,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderRadius: AppUtils.kBorderRadius40,
|
borderRadius: borderRadius ?? AppUtils.kBorderRadius40,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
),
|
),
|
||||||
disabledBorder: OutlineInputBorder(
|
disabledBorder: OutlineInputBorder(
|
||||||
borderRadius: AppUtils.kBorderRadius40,
|
borderRadius: borderRadius ?? AppUtils.kBorderRadius40,
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter_svg/flutter_svg.dart';
|
|
||||||
import 'package:food_delivery_client/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart';
|
import 'package:food_delivery_client/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart';
|
||||||
|
|
||||||
import '../../../../../food_delivery_client.dart';
|
import '../../../../../food_delivery_client.dart';
|
||||||
@@ -13,7 +12,7 @@ class SplashPage extends StatelessWidget {
|
|||||||
child: BlocListener<SplashBloc, SplashState>(
|
child: BlocListener<SplashBloc, SplashState>(
|
||||||
listener: (context, state) {
|
listener: (context, state) {
|
||||||
if (state.status.isLoaded()) {
|
if (state.status.isLoaded()) {
|
||||||
context.go(Routes.main);
|
context.go(Routes.login);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
|||||||
@@ -477,6 +477,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
|
mask_text_input_formatter:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: mask_text_input_formatter
|
||||||
|
sha256: "978c58ec721c25621ceb468e633f4eef64b64d45424ac4540e0565d4f7c800cd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.9.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ dependencies:
|
|||||||
carousel_slider: ^5.1.1
|
carousel_slider: ^5.1.1
|
||||||
equatable: ^2.0.7
|
equatable: ^2.0.7
|
||||||
dartz: ^0.10.1
|
dartz: ^0.10.1
|
||||||
|
mask_text_input_formatter: ^2.9.0
|
||||||
|
|
||||||
|
|
||||||
#DI
|
#DI
|
||||||
get_it: ^8.2.0
|
get_it: ^8.2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user