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