Update auth packege with layout builder
This commit is contained in:
@@ -2,6 +2,10 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_action.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_body.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_header.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_layout_builder.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
||||||
@@ -221,21 +225,36 @@ class _ForgotPasswordState extends State<ForgotPassword> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHAction getActionButton() {
|
||||||
void dispose() {
|
return MIHAction(
|
||||||
emailController.dispose();
|
icon: const Icon(Icons.arrow_back),
|
||||||
_focusNode.dispose();
|
iconSize: 35,
|
||||||
super.dispose();
|
onTap: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHHeader getHeader() {
|
||||||
void initState() {
|
return const MIHHeader(
|
||||||
super.initState();
|
headerAlignment: MainAxisAlignment.center,
|
||||||
|
headerItems: [
|
||||||
|
Text(
|
||||||
|
"",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 25,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHBody getBody() {
|
||||||
Widget build(BuildContext context) {
|
return MIHBody(
|
||||||
return KeyboardListener(
|
borderOn: false,
|
||||||
|
bodyItems: [
|
||||||
|
KeyboardListener(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
onKeyEvent: (event) async {
|
onKeyEvent: (event) async {
|
||||||
@@ -244,11 +263,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
|
|||||||
validateInput();
|
validateInput();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: SafeArea(
|
||||||
//backgroundColor: Colors.white,
|
|
||||||
body: Stack(
|
|
||||||
children: [
|
|
||||||
SafeArea(
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
@@ -317,21 +332,29 @@ class _ForgotPasswordState extends State<ForgotPassword> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
|
||||||
top: 10,
|
|
||||||
left: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.of(context).pop();
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.arrow_back),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
),
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
emailController.dispose();
|
||||||
|
_focusNode.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MIHLayoutBuilder(
|
||||||
|
actionButton: getActionButton(),
|
||||||
|
header: getHeader(),
|
||||||
|
body: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_action.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_body.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_header.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_layout_builder.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_pass_input.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_pass_input.dart';
|
||||||
@@ -225,18 +229,39 @@ class _RegisterState extends State<Register> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHAction getActionButton() {
|
||||||
void dispose() {
|
return MIHAction(
|
||||||
emailController.dispose();
|
icon: Image.asset('images/logo_light.png'),
|
||||||
passwordController.dispose();
|
iconSize: 35,
|
||||||
officeID.dispose();
|
onTap: () {
|
||||||
_focusNode.dispose();
|
Navigator.of(context).pushNamed(
|
||||||
super.dispose();
|
'/about',
|
||||||
|
//arguments: widget.signedInUser,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHHeader getHeader() {
|
||||||
Widget build(BuildContext context) {
|
return const MIHHeader(
|
||||||
return KeyboardListener(
|
headerAlignment: MainAxisAlignment.center,
|
||||||
|
headerItems: [
|
||||||
|
Text(
|
||||||
|
"",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 25,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MIHBody getBody() {
|
||||||
|
return MIHBody(
|
||||||
|
borderOn: false,
|
||||||
|
bodyItems: [
|
||||||
|
KeyboardListener(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
onKeyEvent: (event) async {
|
onKeyEvent: (event) async {
|
||||||
@@ -245,12 +270,8 @@ class _RegisterState extends State<Register> {
|
|||||||
validateInput();
|
validateInput();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: SafeArea(
|
||||||
//backgroundColor: Colors.white,
|
child: Center(
|
||||||
body: SafeArea(
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Center(
|
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -344,8 +365,7 @@ class _RegisterState extends State<Register> {
|
|||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
'Already a User?',
|
'Already a User?',
|
||||||
style:
|
style: TextStyle(fontSize: 18, color: Colors.grey),
|
||||||
TextStyle(fontSize: 18, color: Colors.grey),
|
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 6,
|
width: 6,
|
||||||
@@ -370,27 +390,27 @@ class _RegisterState extends State<Register> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
)),
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
left: 5,
|
|
||||||
width: 75,
|
|
||||||
height: 75,
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.of(context).pushNamed(
|
|
||||||
'/about',
|
|
||||||
//arguments: widget.signedInUser,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child:
|
|
||||||
const Image(image: AssetImage('images/logo_light.png')),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
),
|
}
|
||||||
),
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
emailController.dispose();
|
||||||
|
passwordController.dispose();
|
||||||
|
officeID.dispose();
|
||||||
|
_focusNode.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MIHLayoutBuilder(
|
||||||
|
actionButton: getActionButton(),
|
||||||
|
header: getHeader(),
|
||||||
|
body: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import 'dart:convert';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_pass_input.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_pass_input.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_action.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_body.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_header.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_layout_builder.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
import 'package:patient_manager/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
@@ -252,22 +256,39 @@ class _ResetPasswordState extends State<ResetPassword> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHAction getActionButton() {
|
||||||
void dispose() {
|
return MIHAction(
|
||||||
passwordController.dispose();
|
icon: Image.asset('images/logo_light.png'),
|
||||||
confirmPasswordController.dispose();
|
iconSize: 35,
|
||||||
_focusNode.dispose();
|
onTap: () {
|
||||||
super.dispose();
|
// Navigator.of(context).pushNamed(
|
||||||
|
// '/about',
|
||||||
|
// //arguments: widget.signedInUser,
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHHeader getHeader() {
|
||||||
void initState() {
|
return const MIHHeader(
|
||||||
super.initState();
|
headerAlignment: MainAxisAlignment.center,
|
||||||
|
headerItems: [
|
||||||
|
Text(
|
||||||
|
"",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 25,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHBody getBody() {
|
||||||
Widget build(BuildContext context) {
|
return MIHBody(
|
||||||
return KeyboardListener(
|
borderOn: false,
|
||||||
|
bodyItems: [
|
||||||
|
KeyboardListener(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
onKeyEvent: (event) async {
|
onKeyEvent: (event) async {
|
||||||
@@ -276,11 +297,7 @@ class _ResetPasswordState extends State<ResetPassword> {
|
|||||||
validateInput();
|
validateInput();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: SafeArea(
|
||||||
//backgroundColor: Colors.white,
|
|
||||||
body: Stack(
|
|
||||||
children: [
|
|
||||||
SafeArea(
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
@@ -372,22 +389,30 @@ class _ResetPasswordState extends State<ResetPassword> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
|
||||||
top: 10,
|
|
||||||
left: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
//Navigator.of(context).pop();
|
|
||||||
Navigator.of(context).pushReplacementNamed('/');
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.login),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
),
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
passwordController.dispose();
|
||||||
|
confirmPasswordController.dispose();
|
||||||
|
_focusNode.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MIHLayoutBuilder(
|
||||||
|
actionButton: getActionButton(),
|
||||||
|
header: getHeader(),
|
||||||
|
body: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_action.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_body.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_header.dart';
|
||||||
|
import 'package:patient_manager/mih_components/mih_layout/mih_layout_builder.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_layout/mih_tile.dart';
|
import 'package:patient_manager/mih_components/mih_layout/mih_tile.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
import 'package:patient_manager/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||||
@@ -256,25 +260,39 @@ class _SignInState extends State<SignIn> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHAction getActionButton() {
|
||||||
void dispose() {
|
return MIHAction(
|
||||||
emailController.dispose();
|
icon: Image.asset('images/logo_light.png'),
|
||||||
passwordController.dispose();
|
iconSize: 35,
|
||||||
_focusNode.dispose();
|
onTap: () {
|
||||||
super.dispose();
|
Navigator.of(context).pushNamed(
|
||||||
|
'/about',
|
||||||
|
//arguments: widget.signedInUser,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHHeader getHeader() {
|
||||||
void initState() {
|
return const MIHHeader(
|
||||||
setState(() {
|
headerAlignment: MainAxisAlignment.center,
|
||||||
setSandboxProfiles(sandboxProfileList);
|
headerItems: [
|
||||||
});
|
Text(
|
||||||
super.initState();
|
"",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 25,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
MIHBody getBody() {
|
||||||
Widget build(BuildContext context) {
|
return MIHBody(
|
||||||
return KeyboardListener(
|
borderOn: false,
|
||||||
|
bodyItems: [
|
||||||
|
KeyboardListener(
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
onKeyEvent: (event) async {
|
onKeyEvent: (event) async {
|
||||||
@@ -283,12 +301,8 @@ class _SignInState extends State<SignIn> {
|
|||||||
validateInput();
|
validateInput();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: SafeArea(
|
||||||
//backgroundColor: Colors.white,
|
child: Center(
|
||||||
body: SafeArea(
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Center(
|
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -536,26 +550,34 @@ class _SignInState extends State<SignIn> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
left: 5,
|
|
||||||
width: 75,
|
|
||||||
height: 75,
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.of(context).pushNamed(
|
|
||||||
'/about',
|
|
||||||
//arguments: widget.signedInUser,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child:
|
|
||||||
const Image(image: AssetImage('images/logo_light.png')),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
),
|
}
|
||||||
),
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
emailController.dispose();
|
||||||
|
passwordController.dispose();
|
||||||
|
_focusNode.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
setState(() {
|
||||||
|
setSandboxProfiles(sandboxProfileList);
|
||||||
|
});
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MIHLayoutBuilder(
|
||||||
|
actionButton: getActionButton(),
|
||||||
|
header: getHeader(),
|
||||||
|
body: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user