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