Registration Page toggle position adjusted & pink background removed during scroll
This commit is contained in:
parent
0b0f7ca788
commit
99348f3d93
@ -336,8 +336,8 @@ final GoRouter router = GoRouter(
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/',
|
||||
//builder: (context, state) => LoginRoute(),
|
||||
builder: (context, state) => RegisterScreen(),
|
||||
builder: (context, state) => LoginRoute(),
|
||||
|
||||
),
|
||||
// GoRoute(
|
||||
// path: '/',
|
||||
|
||||
@ -336,12 +336,18 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
|
||||
body:
|
||||
|
||||
Column(
|
||||
children: [
|
||||
Consumer(
|
||||
builder: (context, ref, _) {
|
||||
final locale = ref.watch(localeProvider); // Current locale
|
||||
return MyToggle(
|
||||
return
|
||||
Align(
|
||||
alignment: AlignmentDirectional.topEnd,
|
||||
child: MyToggle(
|
||||
isOn: locale?.languageCode == 'en',
|
||||
knobTextWhenOn: 'ع',
|
||||
knobTextWhenOff: 'EN',
|
||||
@ -350,22 +356,17 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
onTap: () {
|
||||
ref.read(localeProvider.notifier).toggleLocale();
|
||||
},
|
||||
),
|
||||
);
|
||||
// IconButton(
|
||||
// icon: Icon(locale?.languageCode == 'en'
|
||||
// ? Icons.toggle_off_outlined
|
||||
// : Icons.toggle_on_outlined,),
|
||||
// onPressed: () {
|
||||
// ref.read(localeProvider.notifier).toggleLocale();
|
||||
// },
|
||||
// );
|
||||
},
|
||||
),
|
||||
],
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
body: registrationSuccess
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height/1.2,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children : [
|
||||
|
||||
registrationSuccess
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
@ -480,6 +481,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
: Form(
|
||||
key: _formKey,
|
||||
child: SingleChildScrollView(
|
||||
@ -1040,6 +1042,11 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -591,14 +591,16 @@ class LoginRoute extends HookConsumerWidget {
|
||||
height: 40,
|
||||
);
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
|
||||
final listViewHorizontalPadding =
|
||||
screenWidth < 700 ? 30 : 30 + (screenWidth - 700) / 2;
|
||||
final scaffoldBody = ListView(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: listViewHorizontalPadding.toDouble(),
|
||||
),
|
||||
// padding: EdgeInsets.symmetric(
|
||||
// horizontal: listViewHorizontalPadding.toDouble(),
|
||||
// ),
|
||||
children: [
|
||||
36.verticalSpace,
|
||||
10.verticalSpace,
|
||||
|
||||
Align(
|
||||
alignment: AlignmentDirectional.topEnd,
|
||||
child: MyToggle(
|
||||
@ -613,15 +615,35 @@ class LoginRoute extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
16.verticalSpace,
|
||||
helloAndPleaseLoginTexts,
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: listViewHorizontalPadding.toDouble(),
|
||||
),
|
||||
child: helloAndPleaseLoginTexts,
|
||||
),
|
||||
42.verticalSpace,
|
||||
form,
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: listViewHorizontalPadding.toDouble(),
|
||||
),
|
||||
child: form,
|
||||
),
|
||||
15.verticalSpace,
|
||||
dontHaveAnAccountRegisterBtn,
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: listViewHorizontalPadding.toDouble(),
|
||||
),
|
||||
child: dontHaveAnAccountRegisterBtn,
|
||||
),
|
||||
20.verticalSpace,
|
||||
// continueAsGuestBtn,
|
||||
95.verticalSpace,
|
||||
fcscBanner,
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: listViewHorizontalPadding.toDouble(),
|
||||
),
|
||||
child: fcscBanner,
|
||||
),
|
||||
],
|
||||
);
|
||||
// final bgScaffold = Scaffold(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user