QOL: MIH Authentication Package performance improvements

This commit is contained in:
2025-11-28 13:43:51 +02:00
parent 9a75bcc810
commit ef4c3102a9
3 changed files with 32 additions and 10 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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() {