login screen temp fix
This commit is contained in:
parent
b9b43fe961
commit
ae17e9f8b7
@ -122,7 +122,7 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: showBack
|
child: showBack
|
||||||
? BackButton(
|
? BackButton(
|
||||||
color: AppColors.of(context).loginPrimary)
|
color: AppColors.of(context).text)
|
||||||
: const SizedBox(height: 48.0),
|
: const SizedBox(height: 48.0),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -130,280 +130,284 @@ class LoginScreenState extends State<LoginScreen> {
|
|||||||
Stack(
|
Stack(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
const SizedBox(height: 21),
|
|
||||||
CarouselSlider(
|
|
||||||
options: CarouselOptions(
|
|
||||||
height: MediaQuery.of(context).size.height,
|
|
||||||
viewportFraction: 1,
|
|
||||||
autoPlay: true,
|
|
||||||
autoPlayInterval: const Duration(seconds: 6),
|
|
||||||
pauseAutoPlayOnTouch: true),
|
|
||||||
items: [1, 2, 3, 4].map((i) {
|
|
||||||
return Builder(
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.only(left: 24),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"welcome_title_$i".i18n,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Color(0xFF050B15),
|
|
||||||
fontSize: 19,
|
|
||||||
fontFamily: 'Montserrat',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight.w700,
|
|
||||||
height: 1.3),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 14.375), //meth
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.only(
|
|
||||||
right: 20),
|
|
||||||
child: Text(
|
|
||||||
"welcome_text_$i".i18n,
|
|
||||||
style: const TextStyle(
|
|
||||||
color:
|
|
||||||
Color(0xFF050B15),
|
|
||||||
fontFamily: 'FigTree',
|
|
||||||
fontWeight:
|
|
||||||
FontWeight.w500,
|
|
||||||
fontSize: 17,
|
|
||||||
height: 1.3),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
const SizedBox(height: 15.625),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
left: 16, right: 16),
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/showcase$i.png'))
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 250,
|
|
||||||
width: double.infinity,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
colors: [Color(0x00DAE4F7), Color(0xFFDAE4F7)],
|
|
||||||
stops: [0, 0.1],
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 3),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 48,
|
|
||||||
width: double.infinity,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 16),
|
|
||||||
child: FilledButton(
|
|
||||||
style: ButtonStyle(
|
|
||||||
shape: MaterialStateProperty.all<
|
|
||||||
RoundedRectangleBorder>(
|
|
||||||
const RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(12)),
|
|
||||||
))),
|
|
||||||
onPressed: () {},
|
|
||||||
child: Text(
|
|
||||||
"login".i18n,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontFamily: 'Montserrat',
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.w700),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
// Column(
|
// Column(
|
||||||
// //login buttons and ui starts here
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
// mainAxisAlignment: MainAxisAlignment.end,
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
// children: [
|
// children: [
|
||||||
// Padding(
|
// const SizedBox(height: 21),
|
||||||
// padding: const EdgeInsets.only(
|
// CarouselSlider(
|
||||||
// left: 22.0,
|
// options: CarouselOptions(
|
||||||
// right: 22.0,
|
// height: MediaQuery.of(context).size.height,
|
||||||
// top: 0.0,
|
// viewportFraction: 1,
|
||||||
// ),
|
// autoPlay: true,
|
||||||
// child: AutofillGroup(
|
// autoPlayInterval: const Duration(seconds: 6),
|
||||||
// child: Column(
|
// pauseAutoPlayOnTouch: true),
|
||||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
// items: [1, 2, 3, 4].map((i) {
|
||||||
// children: [
|
// return Builder(
|
||||||
// // username
|
// builder: (BuildContext context) {
|
||||||
// Padding(
|
// return Column(
|
||||||
// padding:
|
// crossAxisAlignment:
|
||||||
// const EdgeInsets.only(bottom: 6.0),
|
// CrossAxisAlignment.start,
|
||||||
// child: Row(
|
// mainAxisAlignment:
|
||||||
// mainAxisAlignment:
|
// MainAxisAlignment.start,
|
||||||
// MainAxisAlignment.spaceBetween,
|
// children: [
|
||||||
// children: [
|
// Padding(
|
||||||
// Expanded(
|
// padding:
|
||||||
// child: Text(
|
// const EdgeInsets.only(left: 24),
|
||||||
// "username".i18n,
|
// child: Column(
|
||||||
// maxLines: 1,
|
// crossAxisAlignment:
|
||||||
// style: TextStyle(
|
// CrossAxisAlignment.start,
|
||||||
// color: AppColors.of(context)
|
// mainAxisAlignment:
|
||||||
// .loginPrimary,
|
// MainAxisAlignment.start,
|
||||||
// fontWeight: FontWeight.w500,
|
// children: [
|
||||||
// fontSize: 12.0,
|
// Text(
|
||||||
// ),
|
// "welcome_title_$i".i18n,
|
||||||
// ),
|
// style: const TextStyle(
|
||||||
// ),
|
// color: Color(0xFF050B15),
|
||||||
// Expanded(
|
// fontSize: 19,
|
||||||
// child: Text(
|
// fontFamily: 'Montserrat',
|
||||||
// "usernameHint".i18n,
|
// fontWeight:
|
||||||
// maxLines: 1,
|
// FontWeight.w700,
|
||||||
// textAlign: TextAlign.right,
|
// height: 1.3),
|
||||||
// style: TextStyle(
|
// ),
|
||||||
// color: AppColors.of(context)
|
// const SizedBox(
|
||||||
// .loginSecondary,
|
// height: 14.375), //meth
|
||||||
// fontWeight: FontWeight.w500,
|
// Padding(
|
||||||
// fontSize: 12.0,
|
// padding:
|
||||||
// ),
|
// const EdgeInsets.only(
|
||||||
// ),
|
// right: 20),
|
||||||
// ),
|
// child: Text(
|
||||||
// ],
|
// "welcome_text_$i".i18n,
|
||||||
// ),
|
// style: const TextStyle(
|
||||||
// ),
|
// color:
|
||||||
// Padding(
|
// Color(0xFF050B15),
|
||||||
// padding:
|
// fontFamily: 'FigTree',
|
||||||
// const EdgeInsets.only(bottom: 12.0),
|
// fontWeight:
|
||||||
// child: LoginInput(
|
// FontWeight.w500,
|
||||||
// style: LoginInputStyle.username,
|
// fontSize: 17,
|
||||||
// controller: usernameController,
|
// height: 1.3),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
|
// ],
|
||||||
// // password
|
// )),
|
||||||
// Padding(
|
// const SizedBox(height: 15.625),
|
||||||
// padding:
|
// Padding(
|
||||||
// const EdgeInsets.only(bottom: 6.0),
|
// padding: const EdgeInsets.only(
|
||||||
// child: Row(
|
// left: 16, right: 16),
|
||||||
// mainAxisAlignment:
|
// child: Image.asset(
|
||||||
// MainAxisAlignment.spaceBetween,
|
// 'assets/images/showcase$i.png'))
|
||||||
// children: [
|
// ],
|
||||||
// Expanded(
|
// );
|
||||||
// child: Text(
|
// },
|
||||||
// "password".i18n,
|
// );
|
||||||
// maxLines: 1,
|
// }).toList(),
|
||||||
// style: TextStyle(
|
|
||||||
// color: AppColors.of(context)
|
|
||||||
// .loginPrimary,
|
|
||||||
// fontWeight: FontWeight.w500,
|
|
||||||
// fontSize: 12.0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: Text(
|
|
||||||
// "passwordHint".i18n,
|
|
||||||
// maxLines: 1,
|
|
||||||
// textAlign: TextAlign.right,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: AppColors.of(context)
|
|
||||||
// .loginSecondary,
|
|
||||||
// fontWeight: FontWeight.w500,
|
|
||||||
// fontSize: 12.0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Padding(
|
|
||||||
// padding:
|
|
||||||
// const EdgeInsets.only(bottom: 12.0),
|
|
||||||
// child: LoginInput(
|
|
||||||
// style: LoginInputStyle.password,
|
|
||||||
// controller: passwordController,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
|
|
||||||
// // school
|
|
||||||
// Padding(
|
|
||||||
// padding:
|
|
||||||
// const EdgeInsets.only(bottom: 6.0),
|
|
||||||
// child: Text(
|
|
||||||
// "school".i18n,
|
|
||||||
// maxLines: 1,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: AppColors.of(context)
|
|
||||||
// .loginPrimary,
|
|
||||||
// fontWeight: FontWeight.w500,
|
|
||||||
// fontSize: 12.0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// SchoolInput(
|
|
||||||
// scroll: _scrollController,
|
|
||||||
// controller: schoolController,
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Padding(
|
|
||||||
// padding: const EdgeInsets.only(
|
|
||||||
// top: 35.0,
|
|
||||||
// left: 22.0,
|
|
||||||
// right: 22.0,
|
|
||||||
// ),
|
|
||||||
// child: Visibility(
|
|
||||||
// visible: _loginState != LoginState.inProgress,
|
|
||||||
// replacement: const Padding(
|
|
||||||
// padding: EdgeInsets.symmetric(vertical: 6.0),
|
|
||||||
// child: CircularProgressIndicator(
|
|
||||||
// valueColor: AlwaysStoppedAnimation<Color>(
|
|
||||||
// Colors.white),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// child: LoginButton(
|
|
||||||
// child: Text("login".i18n,
|
|
||||||
// maxLines: 1,
|
|
||||||
// style: const TextStyle(
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// fontSize: 20.0,
|
|
||||||
// )),
|
|
||||||
// onPressed: () => _loginAPI(context: context),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
// ),
|
||||||
// ],
|
// ],
|
||||||
// ),
|
// ),
|
||||||
|
// Container(
|
||||||
|
// height: 250,
|
||||||
|
// width: double.infinity,
|
||||||
|
// decoration: const BoxDecoration(
|
||||||
|
// gradient: LinearGradient(
|
||||||
|
// colors: [Color(0x00DAE4F7), Color(0xFFDAE4F7)],
|
||||||
|
// stops: [0, 0.1],
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.only(top: 3),
|
||||||
|
// child: Column(
|
||||||
|
// children: [
|
||||||
|
// SizedBox(
|
||||||
|
// height: 48,
|
||||||
|
// width: double.infinity,
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.symmetric(
|
||||||
|
// horizontal: 16),
|
||||||
|
// child: FilledButton(
|
||||||
|
// style: ButtonStyle(
|
||||||
|
// shape: MaterialStateProperty.all<
|
||||||
|
// RoundedRectangleBorder>(
|
||||||
|
// const RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.all(
|
||||||
|
// Radius.circular(12)),
|
||||||
|
// ))),
|
||||||
|
// onPressed: () {},
|
||||||
|
// child: Text(
|
||||||
|
// "login".i18n,
|
||||||
|
// style: const TextStyle(
|
||||||
|
// fontFamily: 'Montserrat',
|
||||||
|
// fontSize: 20,
|
||||||
|
// fontWeight: FontWeight.w700),
|
||||||
|
// )),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 8),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// TODO: OLD LOGIN FROM HERE
|
||||||
|
Column(
|
||||||
|
//login buttons and ui starts here
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 22.0,
|
||||||
|
right: 22.0,
|
||||||
|
top: 0.0,
|
||||||
|
),
|
||||||
|
child: AutofillGroup(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
// username
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(bottom: 6.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
"username".i18n,
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.of(context)
|
||||||
|
.loginPrimary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 12.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
"usernameHint".i18n,
|
||||||
|
maxLines: 1,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.of(context)
|
||||||
|
.loginSecondary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 12.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(bottom: 12.0),
|
||||||
|
child: LoginInput(
|
||||||
|
style: LoginInputStyle.username,
|
||||||
|
controller: usernameController,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// password
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(bottom: 6.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
"password".i18n,
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.of(context)
|
||||||
|
.loginPrimary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 12.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
"passwordHint".i18n,
|
||||||
|
maxLines: 1,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.of(context)
|
||||||
|
.loginSecondary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 12.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(bottom: 12.0),
|
||||||
|
child: LoginInput(
|
||||||
|
style: LoginInputStyle.password,
|
||||||
|
controller: passwordController,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// school
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(bottom: 6.0),
|
||||||
|
child: Text(
|
||||||
|
"school".i18n,
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.of(context)
|
||||||
|
.loginPrimary,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 12.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SchoolInput(
|
||||||
|
scroll: _scrollController,
|
||||||
|
controller: schoolController,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 35.0,
|
||||||
|
left: 22.0,
|
||||||
|
right: 22.0,
|
||||||
|
),
|
||||||
|
child: Visibility(
|
||||||
|
visible: _loginState != LoginState.inProgress,
|
||||||
|
replacement: const Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 6.0),
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
|
Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: LoginButton(
|
||||||
|
child: Text("login".i18n,
|
||||||
|
maxLines: 1,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 20.0,
|
||||||
|
)),
|
||||||
|
onPressed: () => _loginAPI(context: context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// TODO: OLD LOGIN FROM HERE
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user