QOL: MIH Authentication Package performance improvements
This commit is contained in:
@@ -14,6 +14,13 @@ class MihAuthForgotPassword extends StatefulWidget {
|
|||||||
|
|
||||||
class _MihAuthForgotPasswordState extends State<MihAuthForgotPassword> {
|
class _MihAuthForgotPasswordState extends State<MihAuthForgotPassword> {
|
||||||
int _selcetedIndex = 0;
|
int _selcetedIndex = 0;
|
||||||
|
late final MihForgotPassword _forgotPassword;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_forgotPassword = MihForgotPassword();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -59,9 +66,8 @@ class _MihAuthForgotPasswordState extends State<MihAuthForgotPassword> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> getToolBody() {
|
List<Widget> getToolBody() {
|
||||||
List<Widget> toolBodies = [
|
return [
|
||||||
MihForgotPassword(),
|
_forgotPassword,
|
||||||
];
|
];
|
||||||
return toolBodies;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ class MihAuthPasswordReset extends StatefulWidget {
|
|||||||
|
|
||||||
class _MihAuthPasswordResetState extends State<MihAuthPasswordReset> {
|
class _MihAuthPasswordResetState extends State<MihAuthPasswordReset> {
|
||||||
int _selcetedIndex = 0;
|
int _selcetedIndex = 0;
|
||||||
|
late final MihResetPassword _resetPassword;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_resetPassword = MihResetPassword(token: widget.token);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -67,11 +74,8 @@ class _MihAuthPasswordResetState extends State<MihAuthPasswordReset> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> getToolBody() {
|
List<Widget> getToolBody() {
|
||||||
List<Widget> toolBodies = [
|
return [
|
||||||
MihResetPassword(
|
_resetPassword,
|
||||||
token: widget.token,
|
|
||||||
),
|
|
||||||
];
|
];
|
||||||
return toolBodies;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,16 @@ class MihAuthentication extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MihAuthenticationState extends State<MihAuthentication> {
|
class _MihAuthenticationState extends State<MihAuthentication> {
|
||||||
|
late final MihSignIn _signIn;
|
||||||
|
late final MihRegister _register;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_signIn = MihSignIn();
|
||||||
|
_register = MihRegister();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackage(
|
return MihPackage(
|
||||||
@@ -32,8 +42,10 @@ class _MihAuthenticationState extends State<MihAuthentication> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> getToolBody() {
|
List<Widget> getToolBody() {
|
||||||
List<Widget> toolBodies = [MihSignIn(), MihRegister()];
|
return [
|
||||||
return toolBodies;
|
_signIn,
|
||||||
|
_register,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> getToolTitle() {
|
List<String> getToolTitle() {
|
||||||
|
|||||||
Reference in New Issue
Block a user