WT1.1.2f login fix
This commit is contained in:
parent
8f651ceb0d
commit
cffc397d70
@ -206,5 +206,6 @@
|
|||||||
"hu_with": " ",
|
"hu_with": " ",
|
||||||
"Are you sure to delete this exercise?": "Are you sure to delete this exercise?",
|
"Are you sure to delete this exercise?": "Are you sure to delete this exercise?",
|
||||||
|
|
||||||
"I forgot the password":"I forgot the password"
|
"I forgot the password":"I forgot the password",
|
||||||
|
"Exception: Instance of 'NotFoundException'": "Customer with the email not found. Please register or reset your password"
|
||||||
}
|
}
|
@ -208,5 +208,6 @@
|
|||||||
"Summary of your test":"A teszt összefoglalása:",
|
"Summary of your test":"A teszt összefoglalása:",
|
||||||
|
|
||||||
"Are you sure to delete this exercise?": "Biztos, hogy törlöd a gyakorlatot?",
|
"Are you sure to delete this exercise?": "Biztos, hogy törlöd a gyakorlatot?",
|
||||||
"I forgot the password":"Elfelejtett jelszó"
|
"I forgot the password":"Elfelejtett jelszó",
|
||||||
|
"Exception: Instance of 'NotFoundException'": "Ezzel az email címmel nem található felhasználó. Kérlek regisztálj vagy kérj jelszóemlékeztetőt"
|
||||||
}
|
}
|
@ -362,7 +362,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 28;
|
CURRENT_PROJECT_VERSION = 29;
|
||||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
@ -505,7 +505,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 28;
|
CURRENT_PROJECT_VERSION = 29;
|
||||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
@ -540,7 +540,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 28;
|
CURRENT_PROJECT_VERSION = 29;
|
||||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
@ -73,7 +73,13 @@ class FirebaseApi {
|
|||||||
} else if (e.code == 'email-already-in-use') {
|
} else if (e.code == 'email-already-in-use') {
|
||||||
print('The account already exists for that email.');
|
print('The account already exists for that email.');
|
||||||
rc = REGISTER_EMAIL_IN_USE;
|
rc = REGISTER_EMAIL_IN_USE;
|
||||||
throw Exception("Customer exists");
|
userCredential = await FirebaseAuth.instance.signInWithEmailAndPassword(
|
||||||
|
email: email,
|
||||||
|
password: password
|
||||||
|
);
|
||||||
|
if ( rc != null ) {
|
||||||
|
String rc = SIGN_IN_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
|
@ -62,7 +62,6 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans{
|
|||||||
exerciseBloc.exerciseRepository.exerciseType.nameTranslation;
|
exerciseBloc.exerciseRepository.exerciseType.nameTranslation;
|
||||||
|
|
||||||
return Form(
|
return Form(
|
||||||
autovalidate: true,
|
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
resizeToAvoidBottomInset: true,
|
resizeToAvoidBottomInset: true,
|
||||||
appBar: AppBarNav(depth: 1),
|
appBar: AppBarNav(depth: 1),
|
||||||
@ -168,7 +167,7 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans{
|
|||||||
},
|
},
|
||||||
listViewHeight: 80,
|
listViewHeight: 80,
|
||||||
textStyle: TextStyle(fontSize: 24),
|
textStyle: TextStyle(fontSize: 24),
|
||||||
textStyleHighlighted: TextStyle(fontSize: 40, color: Colors.orange, fontWeight: FontWeight.bold),
|
textStyleHighlighted: TextStyle(fontSize: 38, color: Colors.orange, fontWeight: FontWeight.bold),
|
||||||
//decoration: _decoration,
|
//decoration: _decoration,
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -197,7 +196,7 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans{
|
|||||||
},
|
},
|
||||||
listViewHeight: 80,
|
listViewHeight: 80,
|
||||||
textStyle: TextStyle(fontSize: 24),
|
textStyle: TextStyle(fontSize: 24),
|
||||||
textStyleHighlighted: TextStyle(fontSize: 40, color: Colors.orange, fontWeight: FontWeight.bold),
|
textStyleHighlighted: TextStyle(fontSize: 38, color: Colors.orange, fontWeight: FontWeight.bold),
|
||||||
//decoration: _decoration,
|
//decoration: _decoration,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import 'package:aitrainer_app/localization/app_localization.dart';
|
|||||||
import 'package:aitrainer_app/repository/user_repository.dart';
|
import 'package:aitrainer_app/repository/user_repository.dart';
|
||||||
import 'package:aitrainer_app/util/common.dart';
|
import 'package:aitrainer_app/util/common.dart';
|
||||||
import 'package:aitrainer_app/util/trans.dart';
|
import 'package:aitrainer_app/util/trans.dart';
|
||||||
|
import 'package:aitrainer_app/widgets/app_bar_min.dart';
|
||||||
import 'package:aitrainer_app/widgets/splash.dart';
|
import 'package:aitrainer_app/widgets/splash.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@ -43,6 +44,7 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
|||||||
final loginBloc = BlocProvider.of<LoginFormBloc>(context);
|
final loginBloc = BlocProvider.of<LoginFormBloc>(context);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
|
appBar: AppBarMin(),
|
||||||
body: FormBlocListener<LoginFormBloc, String, String>(
|
body: FormBlocListener<LoginFormBloc, String, String>(
|
||||||
onSubmitting: (context, state) {
|
onSubmitting: (context, state) {
|
||||||
LoadingDialog.show(context);
|
LoadingDialog.show(context);
|
||||||
@ -53,8 +55,11 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
|||||||
},
|
},
|
||||||
onFailure: (context, state) {
|
onFailure: (context, state) {
|
||||||
LoadingDialog.hide(context);
|
LoadingDialog.hide(context);
|
||||||
showInSnackBar(state.failureResponse);
|
showInSnackBar(t(state.failureResponse));
|
||||||
},
|
},
|
||||||
|
child: SafeArea(
|
||||||
|
top: false,
|
||||||
|
bottom: false,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@ -65,6 +70,7 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
|||||||
),
|
),
|
||||||
child: buildLoginForm(loginBloc, accountBloc),
|
child: buildLoginForm(loginBloc, accountBloc),
|
||||||
),
|
),
|
||||||
|
)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
|
@ -4,6 +4,7 @@ import 'package:aitrainer_app/localization/app_localization.dart';
|
|||||||
import 'package:aitrainer_app/util/common.dart';
|
import 'package:aitrainer_app/util/common.dart';
|
||||||
import 'package:aitrainer_app/repository/customer_repository.dart';
|
import 'package:aitrainer_app/repository/customer_repository.dart';
|
||||||
import 'package:aitrainer_app/repository/user_repository.dart';
|
import 'package:aitrainer_app/repository/user_repository.dart';
|
||||||
|
import 'package:aitrainer_app/widgets/app_bar_min.dart';
|
||||||
import 'package:aitrainer_app/widgets/splash.dart';
|
import 'package:aitrainer_app/widgets/splash.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@ -45,14 +46,15 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
|||||||
final accountBloc = BlocProvider.of<AccountBloc>(context);
|
final accountBloc = BlocProvider.of<AccountBloc>(context);
|
||||||
return BlocProvider(
|
return BlocProvider(
|
||||||
create: (context) => RegistrationFormBloc(
|
create: (context) => RegistrationFormBloc(
|
||||||
userRepository: UserRepository(),
|
userRepository: UserRepository(), accountBloc: accountBloc),
|
||||||
accountBloc: accountBloc),
|
|
||||||
child: Builder(builder: (context) {
|
child: Builder(builder: (context) {
|
||||||
// ignore: close_sinks
|
// ignore: close_sinks
|
||||||
final registrationBloc = BlocProvider.of<RegistrationFormBloc>(context);
|
final registrationBloc =
|
||||||
|
BlocProvider.of<RegistrationFormBloc>(context);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
|
appBar: AppBarMin(),
|
||||||
body: FormBlocListener<RegistrationFormBloc, String, String>(
|
body: FormBlocListener<RegistrationFormBloc, String, String>(
|
||||||
onSubmitting: (context, state) {
|
onSubmitting: (context, state) {
|
||||||
LoadingDialog.show(context);
|
LoadingDialog.show(context);
|
||||||
@ -65,6 +67,8 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
|||||||
LoadingDialog.hide(context);
|
LoadingDialog.hide(context);
|
||||||
showInSnackBar(state.failureResponse);
|
showInSnackBar(state.failureResponse);
|
||||||
},
|
},
|
||||||
|
child: SafeArea(
|
||||||
|
bottom: false,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@ -84,7 +88,9 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
|||||||
padding: EdgeInsets.only(top: 150.0),
|
padding: EdgeInsets.only(top: 150.0),
|
||||||
//mainAxisAlignment: MainAxisAlignment.spaceAround,
|
//mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Divider(color: Colors.transparent,),
|
Divider(
|
||||||
|
color: Colors.transparent,
|
||||||
|
),
|
||||||
//Spacer(flex:4),
|
//Spacer(flex:4),
|
||||||
|
|
||||||
/* FlatButton(
|
/* FlatButton(
|
||||||
@ -147,7 +153,8 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
|||||||
width: 100,
|
width: 100,
|
||||||
height: 100),
|
height: 100),
|
||||||
onPressed: () => {
|
onPressed: () => {
|
||||||
registrationBloc.add(SubmitFormBloc())
|
registrationBloc
|
||||||
|
.add(SubmitFormBloc())
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
Row(
|
Row(
|
||||||
@ -155,17 +162,19 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
|||||||
MainAxisAlignment.spaceAround,
|
MainAxisAlignment.spaceAround,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new InkWell(
|
new InkWell(
|
||||||
child: new Text(AppLocalizations.of(context)
|
child: new Text(
|
||||||
|
AppLocalizations.of(context)
|
||||||
.translate('Login')),
|
.translate('Login')),
|
||||||
onTap: () => Navigator.of(context)
|
onTap: () => Navigator.of(context)
|
||||||
.pushNamed('login'),
|
.pushNamed('login'),
|
||||||
),
|
),
|
||||||
Spacer(flex: 1),
|
Spacer(flex: 1),
|
||||||
new InkWell(
|
new InkWell(
|
||||||
child: new Text(AppLocalizations.of(context)
|
child: new Text(
|
||||||
|
AppLocalizations.of(context)
|
||||||
.translate('Privacy')),
|
.translate('Privacy')),
|
||||||
onTap: () =>
|
onTap: () => Navigator.of(context)
|
||||||
Navigator.of(context).pushNamed('gdpr'),
|
.pushNamed('gdpr'),
|
||||||
),
|
),
|
||||||
Spacer(flex: 2),
|
Spacer(flex: 2),
|
||||||
]),
|
]),
|
||||||
@ -174,6 +183,7 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import 'package:aitrainer_app/repository/user_repository.dart';
|
|||||||
import 'package:aitrainer_app/service/firebase_api.dart';
|
import 'package:aitrainer_app/service/firebase_api.dart';
|
||||||
import 'package:aitrainer_app/util/common.dart';
|
import 'package:aitrainer_app/util/common.dart';
|
||||||
import 'package:aitrainer_app/util/trans.dart';
|
import 'package:aitrainer_app/util/trans.dart';
|
||||||
|
import 'package:aitrainer_app/widgets/app_bar_min.dart';
|
||||||
import 'package:aitrainer_app/widgets/splash.dart';
|
import 'package:aitrainer_app/widgets/splash.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@ -30,6 +31,7 @@ class ResetPasswordPage extends StatelessWidget with Trans {
|
|||||||
final loginBloc = BlocProvider.of<ResetPasswordFormBloc>(context);
|
final loginBloc = BlocProvider.of<ResetPasswordFormBloc>(context);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
|
appBar: AppBarMin(),
|
||||||
body: FormBlocListener<ResetPasswordFormBloc, String, String>(
|
body: FormBlocListener<ResetPasswordFormBloc, String, String>(
|
||||||
onSubmitting: (context, state) {
|
onSubmitting: (context, state) {
|
||||||
LoadingDialog.show(context);
|
LoadingDialog.show(context);
|
||||||
@ -42,6 +44,8 @@ class ResetPasswordPage extends StatelessWidget with Trans {
|
|||||||
LoadingDialog.hide(context);
|
LoadingDialog.hide(context);
|
||||||
showInSnackBar(state.failureResponse);
|
showInSnackBar(state.failureResponse);
|
||||||
},
|
},
|
||||||
|
child: SafeArea(
|
||||||
|
bottom: false,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
@ -55,18 +59,19 @@ class ResetPasswordPage extends StatelessWidget with Trans {
|
|||||||
child: buildResetPasswordForm(loginBloc),
|
child: buildResetPasswordForm(loginBloc),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildResetPasswordForm(ResetPasswordFormBloc formBloc) {
|
Widget buildResetPasswordForm(ResetPasswordFormBloc formBloc) {
|
||||||
|
|
||||||
return Form(
|
return Form(
|
||||||
key: _formKey,
|
key: _formKey,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(left: 25, right: 100),
|
padding: const EdgeInsets.only(left: 25, right: 50),
|
||||||
child:
|
child: ListView(
|
||||||
ListView(shrinkWrap: false, padding: EdgeInsets.only(top: 120.0),
|
shrinkWrap: false,
|
||||||
|
padding: EdgeInsets.only(top: 150.0),
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Divider(),
|
Divider(),
|
||||||
Row(
|
Row(
|
||||||
@ -74,7 +79,8 @@ class ResetPasswordPage extends StatelessWidget with Trans {
|
|||||||
children: [
|
children: [
|
||||||
new InkWell(
|
new InkWell(
|
||||||
child: new Text(
|
child: new Text(
|
||||||
AppLocalizations.of(context).translate('I forgot the password'),
|
AppLocalizations.of(context)
|
||||||
|
.translate('I forgot the password'),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 24)),
|
fontWeight: FontWeight.bold, fontSize: 24)),
|
||||||
),
|
),
|
||||||
@ -103,9 +109,7 @@ class ResetPasswordPage extends StatelessWidget with Trans {
|
|||||||
key: LibraryKeys.loginOKButton,
|
key: LibraryKeys.loginOKButton,
|
||||||
child: Image.asset('asset/image/WT_OK.png',
|
child: Image.asset('asset/image/WT_OK.png',
|
||||||
width: 100, height: 100),
|
width: 100, height: 100),
|
||||||
onPressed: () => {
|
onPressed: () => {formBloc.add(SubmitFormBloc())}),
|
||||||
formBloc.add(SubmitFormBloc())
|
|
||||||
}),
|
|
||||||
]),
|
]),
|
||||||
Divider(
|
Divider(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
@ -116,8 +120,7 @@ class ResetPasswordPage extends StatelessWidget with Trans {
|
|||||||
new InkWell(
|
new InkWell(
|
||||||
child: new Text(
|
child: new Text(
|
||||||
AppLocalizations.of(context).translate('Login')),
|
AppLocalizations.of(context).translate('Login')),
|
||||||
onTap: () =>
|
onTap: () => Navigator.of(context).pushNamed('login'),
|
||||||
Navigator.of(context).pushNamed('login'),
|
|
||||||
),
|
),
|
||||||
Spacer(flex: 1),
|
Spacer(flex: 1),
|
||||||
]),
|
]),
|
||||||
@ -125,11 +128,9 @@ class ResetPasswordPage extends StatelessWidget with Trans {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void showInSnackBar(String error) {
|
void showInSnackBar(String error) {
|
||||||
_scaffoldKey.currentState.showSnackBar(SnackBar(
|
_scaffoldKey.currentState.showSnackBar(SnackBar(
|
||||||
backgroundColor: Colors.orange,
|
backgroundColor: Colors.orange,
|
||||||
content: Text(error, style: TextStyle(color: Colors.white))));
|
content: Text(error, style: TextStyle(color: Colors.white))));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ class _AppBarNav extends State<AppBarNav> with SingleTickerProviderStateMixin,
|
|||||||
int sizeExerciseList = Cache().getExercises() == null? 0 : Cache().getExercises().length;
|
int sizeExerciseList = Cache().getExercises() == null? 0 : Cache().getExercises().length;
|
||||||
if ( sizeExerciseList == 0 ) {
|
if ( sizeExerciseList == 0 ) {
|
||||||
String text = AppLocalizations.of(context).translate("Make your first test");
|
String text = AppLocalizations.of(context).translate("Make your first test");
|
||||||
double fontSize = text.length > 24 ? 10 : 16;
|
double fontSize = text.length > 24 ? 13 : 16;
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
overflow: Overflow.clip,
|
overflow: Overflow.clip,
|
||||||
|
61
lib/widgets/app_bar_min.dart
Normal file
61
lib/widgets/app_bar_min.dart
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:aitrainer_app/bloc/menu/menu_bloc.dart';
|
||||||
|
import 'package:aitrainer_app/localization/app_localization.dart';
|
||||||
|
import 'package:aitrainer_app/model/cache.dart';
|
||||||
|
import 'package:aitrainer_app/repository/exercise_repository.dart';
|
||||||
|
import 'package:aitrainer_app/util/common.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:percent_indicator/linear_percent_indicator.dart';
|
||||||
|
import 'package:rainbow_color/rainbow_color.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class AppBarMin extends StatefulWidget implements PreferredSizeWidget {
|
||||||
|
const AppBarMin();
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AppBarNav createState() => _AppBarNav();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Size get preferredSize => const Size.fromHeight(50);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AppBarNav extends State<AppBarMin> with Common {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
return AppBar(
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'asset/image/WT_long_logo.png',
|
||||||
|
//fit: BoxFit.cover,
|
||||||
|
height: 45.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
leading: IconButton(
|
||||||
|
icon: Icon(Icons.arrow_back, color: Colors.black),
|
||||||
|
onPressed: () =>
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:aitrainer_app/widgets/app_bar_min.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@ -12,6 +13,7 @@ class LoadingScreenMain extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
|
appBar: AppBarMin(),
|
||||||
body: new InkWell(
|
body: new InkWell(
|
||||||
child: new Stack(
|
child: new Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
@ -23,17 +25,20 @@ class LoadingScreenMain extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
/// Render the background image
|
/// Render the background image
|
||||||
new Container(
|
new Container(
|
||||||
|
child: SafeArea(
|
||||||
|
bottom: false,
|
||||||
child: _backgroundImage,
|
child: _backgroundImage,
|
||||||
|
)
|
||||||
),
|
),
|
||||||
/// Render the Title widget, loader and messages below each other
|
/// Render the Title widget, loader and messages below each other
|
||||||
new Column(
|
new Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Expanded(
|
new Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: new Container(
|
child: new Container(
|
||||||
child: new Column(
|
child: new Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Padding(
|
new Padding(
|
||||||
padding: const EdgeInsets.only(top: 30.0),
|
padding: const EdgeInsets.only(top: 30.0),
|
||||||
|
Loading…
Reference in New Issue
Block a user