diff --git a/packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart b/packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart index 380ed18b01..e9eae3fca3 100644 --- a/packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart +++ b/packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart @@ -49,23 +49,7 @@ class StateMachineBloc { StreamController.broadcast(); Stream get exceptions => _exceptionController.stream; - - void clearException() { - _exceptionController.add(null); - } - - Future resendSignUpCode(String username) async { - try { - await _authService.resendSignUpCode(username); - } on Exception catch (e) { - if (e is AmplifyException) { - print(e); - _exceptionController.add(AuthenticatorException(e.message)); - } else { - _exceptionController.add(AuthenticatorException(e.toString())); - } - } - } + Sink get exceptionsSink => _exceptionController.sink; Stream _eventTransformer(AuthEvent event) async* { if (event is AuthLoad) { @@ -299,6 +283,25 @@ class StateMachineBloc { yield AuthFlow(screen: screen); } + //Public Methods + + void clearException() { + _exceptionController.add(null); + } + + Future resendSignUpCode(String username) async { + try { + await _authService.resendSignUpCode(username); + } on Exception catch (e) { + if (e is AmplifyException) { + print(e); + _exceptionController.add(AuthenticatorException(e.message)); + } else { + _exceptionController.add(AuthenticatorException(e.toString())); + } + } + } + void dispose() { _authStateController.close(); _authEventController.close(); diff --git a/packages/amplify_authenticator/lib/src/constants/authenticator_constants.dart b/packages/amplify_authenticator/lib/src/constants/authenticator_constants.dart index dc3e5c3e47..653cccd7d9 100644 --- a/packages/amplify_authenticator/lib/src/constants/authenticator_constants.dart +++ b/packages/amplify_authenticator/lib/src/constants/authenticator_constants.dart @@ -39,4 +39,6 @@ class FormFieldConstants extends AuthenticatorConstants { class AuthenticatorButtonConstants extends AuthenticatorConstants { static const double fontSize = 16; + static const double textFontSize = 13; + static const Color textColor = Color.fromRGBO(130, 130, 130, 1); } diff --git a/packages/amplify_authenticator/lib/src/screens/confirm_signin_mfa_screen.dart b/packages/amplify_authenticator/lib/src/screens/confirm_signin_mfa_screen.dart index e4782d9d4e..2e4425700f 100644 --- a/packages/amplify_authenticator/lib/src/screens/confirm_signin_mfa_screen.dart +++ b/packages/amplify_authenticator/lib/src/screens/confirm_signin_mfa_screen.dart @@ -8,7 +8,7 @@ class ConfirmSignInMFAScreen extends StatelessWidget { @override Widget build(BuildContext context) { final _confirmSignInMFAForm = - InheritedForms.of(context)!.confirmSignInMFAForm; + InheritedForms.of(context).confirmSignInMFAForm; return AuthenticatorContainer( title: "Confirm Sign In", form: _confirmSignInMFAForm); diff --git a/packages/amplify_authenticator/lib/src/screens/confirm_signin_new_password.dart b/packages/amplify_authenticator/lib/src/screens/confirm_signin_new_password.dart index 3c1b595ce6..81ed6fcbc9 100644 --- a/packages/amplify_authenticator/lib/src/screens/confirm_signin_new_password.dart +++ b/packages/amplify_authenticator/lib/src/screens/confirm_signin_new_password.dart @@ -6,7 +6,7 @@ class ConfirmSignInNewPasswordScreen extends StatelessWidget { @override Widget build(BuildContext context) { final _confirmSignInNewPasswordForm = - InheritedForms.of(context)!.confirmSignInNewPasswordForm; + InheritedForms.of(context).confirmSignInNewPasswordForm; return AuthenticatorContainer( title: "Change Password", form: _confirmSignInNewPasswordForm); } diff --git a/packages/amplify_authenticator/lib/src/screens/confirm_signup_screen.dart b/packages/amplify_authenticator/lib/src/screens/confirm_signup_screen.dart index b3cd13a974..49b9becd72 100644 --- a/packages/amplify_authenticator/lib/src/screens/confirm_signup_screen.dart +++ b/packages/amplify_authenticator/lib/src/screens/confirm_signup_screen.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class ConfirmSignUpScreen extends StatelessWidget { @override Widget build(BuildContext context) { - final _confirmSignUpForm = InheritedForms.of(context)!.confirmSignUpForm; + final _confirmSignUpForm = InheritedForms.of(context).confirmSignUpForm; return AuthenticatorContainer( title: "Confirm Sign Up", form: _confirmSignUpForm); } diff --git a/packages/amplify_authenticator/lib/src/screens/reset_password_screen.dart b/packages/amplify_authenticator/lib/src/screens/reset_password_screen.dart index 343598594d..3ace276f8b 100644 --- a/packages/amplify_authenticator/lib/src/screens/reset_password_screen.dart +++ b/packages/amplify_authenticator/lib/src/screens/reset_password_screen.dart @@ -7,7 +7,7 @@ class ResetPasswordScreen extends StatelessWidget { @override Widget build(BuildContext context) { - final _resetPasswordForm = InheritedForms.of(context)!.resetPasswordForm; + final _resetPasswordForm = InheritedForms.of(context).resetPasswordForm; return AuthenticatorContainer( title: "Reset your password", form: _resetPasswordForm); } diff --git a/packages/amplify_authenticator/lib/src/screens/send_code_screen.dart b/packages/amplify_authenticator/lib/src/screens/send_code_screen.dart index be3de2d9bb..a50956e4c3 100644 --- a/packages/amplify_authenticator/lib/src/screens/send_code_screen.dart +++ b/packages/amplify_authenticator/lib/src/screens/send_code_screen.dart @@ -7,7 +7,7 @@ class SendCodeScreen extends StatelessWidget { @override Widget build(BuildContext context) { - final _sendCodeForm = InheritedForms.of(context)!.sendCodeForm; + final _sendCodeForm = InheritedForms.of(context).sendCodeForm; return AuthenticatorContainer( title: "Reset your password", form: _sendCodeForm); } diff --git a/packages/amplify_authenticator/lib/src/screens/signin_screen.dart b/packages/amplify_authenticator/lib/src/screens/signin_screen.dart index cb8774cb63..2cd992a7ee 100644 --- a/packages/amplify_authenticator/lib/src/screens/signin_screen.dart +++ b/packages/amplify_authenticator/lib/src/screens/signin_screen.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; class SignInScreen extends StatelessWidget { @override Widget build(BuildContext context) { - final _signInForm = InheritedForms.of(context)!.signInForm; + final _signInForm = InheritedForms.of(context).signInForm; return AuthenticatorContainer( title: "Sign in to your account", form: _signInForm); } diff --git a/packages/amplify_authenticator/lib/src/screens/signup_screen.dart b/packages/amplify_authenticator/lib/src/screens/signup_screen.dart index 59f9544fb6..0bca9431da 100644 --- a/packages/amplify_authenticator/lib/src/screens/signup_screen.dart +++ b/packages/amplify_authenticator/lib/src/screens/signup_screen.dart @@ -5,7 +5,7 @@ import 'package:amplify_authenticator/src/widgets/containers.dart'; class SignUpScreen extends StatelessWidget { @override Widget build(BuildContext context) { - final _signUpForm = InheritedForms.of(context)!.signUpForm; + final _signUpForm = InheritedForms.of(context).signUpForm; return AuthenticatorContainer( title: "Create a new account", form: _signUpForm); } diff --git a/packages/amplify_authenticator/lib/src/state/inherited_forms.dart b/packages/amplify_authenticator/lib/src/state/inherited_forms.dart index f95272fd3e..d5d37f05da 100644 --- a/packages/amplify_authenticator/lib/src/state/inherited_forms.dart +++ b/packages/amplify_authenticator/lib/src/state/inherited_forms.dart @@ -31,7 +31,7 @@ class InheritedForms extends InheritedWidget { //final ResetPasswordForm resetPasswordForm; // ignore: public_member_api_docs - static InheritedForms? of(BuildContext context) { + static InheritedForms of(BuildContext context) { final forms = context.dependOnInheritedWidgetOfExactType(); assert(() { diff --git a/packages/amplify_authenticator/lib/src/views/confirm_signin_viewmodel.dart b/packages/amplify_authenticator/lib/src/views/confirm_signin_viewmodel.dart index 02aad998e1..dc032f2171 100644 --- a/packages/amplify_authenticator/lib/src/views/confirm_signin_viewmodel.dart +++ b/packages/amplify_authenticator/lib/src/views/confirm_signin_viewmodel.dart @@ -154,7 +154,8 @@ class ConfirmSignInViewModel extends BaseViewModel { _authBloc.authEvent.add(AuthConfirmSignInNewPassword(confirm)); await Future.any([ _authBloc.exceptions.first, - _authBloc.stream.first, + _authBloc.stream + .firstWhere((state) => state is AuthFlow || state is Authenticated), ]); setBusy(false); } diff --git a/packages/amplify_authenticator/lib/src/views/confirm_signup_viewmodel.dart b/packages/amplify_authenticator/lib/src/views/confirm_signup_viewmodel.dart index 008092243a..50d04246f1 100644 --- a/packages/amplify_authenticator/lib/src/views/confirm_signup_viewmodel.dart +++ b/packages/amplify_authenticator/lib/src/views/confirm_signup_viewmodel.dart @@ -14,7 +14,7 @@ class ConfirmSignUpViewModel extends BaseViewModel { //This variable is public because is used to set a default hint text //in the confirm sign up username form field. - late String username; + String? username; String? _code; @@ -33,30 +33,28 @@ class ConfirmSignUpViewModel extends BaseViewModel { } Future confirm() async { - //Uncomment this code when finding the error: for any reason this condition always - //evaluates to true. - - // if (!_formKey.currentState!.validate()) { - // return; - // } + if (!_formKey.currentState!.validate()) { + return; + } setBusy(true); final confirmation = AuthConfirmSignUpData( code: _code!.trim(), - username: username.trim(), + username: username!.trim(), password: _password!.trim()); _authBloc.authEvent.add(AuthConfirmSignUp(confirmation)); await Future.any([ _authBloc.exceptions.first, - _authBloc.stream.first, + _authBloc.stream + .firstWhere((state) => state is AuthFlow || state is Authenticated), ]); setBusy(false); } void resendSignUpCode() { - _authBloc.resendSignUpCode(username); + _authBloc.resendSignUpCode(username!); } // Screens diff --git a/packages/amplify_authenticator/lib/src/views/signin_viewmodel.dart b/packages/amplify_authenticator/lib/src/views/signin_viewmodel.dart index 3959c6b443..b33d7b42e9 100644 --- a/packages/amplify_authenticator/lib/src/views/signin_viewmodel.dart +++ b/packages/amplify_authenticator/lib/src/views/signin_viewmodel.dart @@ -53,13 +53,20 @@ class SignInViewModel extends BaseViewModel { _authBloc.authEvent.add(AuthSignIn(singIn)); await Future.any([ _authBloc.exceptions.first, - _authBloc.stream.first, + _authBloc.stream + .firstWhere((state) => state is AuthFlow || state is Authenticated), ]); setBusy(false); } Future signOut() async { + setBusy(true); _authBloc.authEvent.add(const AuthSignOut()); + await Future.any([ + _authBloc.exceptions.first, + _authBloc.stream.firstWhere((state) => state is AuthFlow), + ]); + setBusy(false); } Future sendCode() async { diff --git a/packages/amplify_authenticator/lib/src/views/signup_viewmodel.dart b/packages/amplify_authenticator/lib/src/views/signup_viewmodel.dart index 35f723043c..1bc39f4a27 100644 --- a/packages/amplify_authenticator/lib/src/views/signup_viewmodel.dart +++ b/packages/amplify_authenticator/lib/src/views/signup_viewmodel.dart @@ -1,5 +1,6 @@ import 'package:amplify_authenticator/src/blocs/auth/auth_bloc.dart'; import 'package:amplify_authenticator/src/blocs/auth/auth_data.dart'; +import 'package:amplify_authenticator/src/models/authenticator_exceptions.dart'; import 'package:amplify_authenticator/src/utils/base_viewmodel.dart'; import 'package:flutter/material.dart'; @@ -141,6 +142,16 @@ class SignUpViewModel extends BaseViewModel { return; } setBusy(true); + if (username == null) { + _authBloc.exceptionsSink + .add(AuthenticatorException("No username form field found.")); + return; + } else if (_password == null) { + _authBloc.exceptionsSink + .add(AuthenticatorException("No password form field found.")); + return; + } + ; final signUp = AuthSignUpData( username: username!.trim(), password: _password!.trim(), @@ -149,7 +160,7 @@ class SignUpViewModel extends BaseViewModel { _authBloc.authEvent.add(AuthSignUp(signUp)); await Future.any([ _authBloc.exceptions.first, - _authBloc.stream.first, + _authBloc.stream.firstWhere((state) => state is AuthFlow), ]); setBusy(false); } diff --git a/packages/amplify_authenticator/lib/src/widgets/auth_exceptions.dart b/packages/amplify_authenticator/lib/src/widgets/auth_exceptions.dart index f53a242c7c..855cc517f4 100644 --- a/packages/amplify_authenticator/lib/src/widgets/auth_exceptions.dart +++ b/packages/amplify_authenticator/lib/src/widgets/auth_exceptions.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:amplify_authenticator/src/state/inherited_auth_bloc.dart'; import 'package:amplify_authenticator/src/blocs/auth/auth_bloc.dart'; +import 'package:flutter/rendering.dart'; class AuthExceptionsWidget extends StatelessWidget { const AuthExceptionsWidget({Key? key}) : super(key: key); @@ -28,25 +29,29 @@ class AuthExceptionsWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Row(children: [ - const Icon( - Icons.error, - size: 24, - color: Colors.white, - ), - const Padding(padding: EdgeInsets.only(left: 5)), - Text( - exception.toString(), - style: const TextStyle(color: Colors.white), - ) - ]), + Expanded( + child: Row(children: [ + const Icon( + Icons.error, + size: 24, + color: Colors.white, + ), + const Padding(padding: EdgeInsets.only(left: 5)), + Expanded( + child: Text( + exception.toString(), + style: const TextStyle(color: Colors.white), + ), + ), + ]), + ), IconButton( onPressed: _authenticatorExceptions.clearException, hoverColor: Colors.red, icon: const Icon( Icons.close, color: Colors.white, - )) + )), ], ), ); diff --git a/packages/amplify_authenticator/lib/src/widgets/buttons.dart b/packages/amplify_authenticator/lib/src/widgets/buttons.dart index 6ce5f14048..a276e9827e 100644 --- a/packages/amplify_authenticator/lib/src/widgets/buttons.dart +++ b/packages/amplify_authenticator/lib/src/widgets/buttons.dart @@ -102,23 +102,30 @@ class GoToSignUpButton extends StatelessWidget { Widget build(BuildContext context) { final SignInViewModel _authModelView = InheritedAuthViewModel.of(context)!.signInViewModel; - return Row( - children: [ - const Text("No account? ", - style: TextStyle( - fontSize: AuthenticatorButtonConstants.fontSize, - )), - TextButton( - key: const Key(keyGoToSignUpButton), - onPressed: _authModelView.goToSignUp, - child: Text("Create account", - style: TextStyle( + return Padding( + padding: const EdgeInsets.only(top: 4), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Expanded( + child: const Text("No account?", + style: TextStyle( + color: AuthenticatorButtonConstants.textColor, fontSize: AuthenticatorButtonConstants.fontSize, - color: Theme.of(context).primaryColor != Colors.blue - ? Theme.of(context).primaryColor - : AuthenticatorColors.primary)), - ) - ], + )), + ), + TextButton( + key: const Key(keyGoToSignUpButton), + onPressed: _authModelView.goToSignUp, + child: Text("Create account", + style: TextStyle( + fontSize: AuthenticatorButtonConstants.fontSize, + color: Theme.of(context).primaryColor != Colors.blue + ? Theme.of(context).primaryColor + : AuthenticatorColors.primary)), + ), + ], + ), ); } } @@ -128,25 +135,32 @@ class GoToSignInButton extends StatelessWidget { Widget build(BuildContext context) { final SignUpViewModel _authModelView = InheritedAuthViewModel.of(context)!.signUpViewModel; - return Row( - children: [ - const Text("Have an account? ", - style: TextStyle( - fontSize: AuthenticatorButtonConstants.fontSize, - )), - TextButton( - key: const Key(keyGoToSignInButton), - child: Text( - "Sign In", - style: TextStyle( - fontSize: AuthenticatorButtonConstants.fontSize, - color: Theme.of(context).primaryColor != Colors.blue - ? Theme.of(context).primaryColor - : AuthenticatorColors.primary), + return Padding( + padding: const EdgeInsets.only(top: 4.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Expanded( + child: Text("Have an account?", + style: TextStyle( + color: AuthenticatorButtonConstants.textColor, + fontSize: AuthenticatorButtonConstants.fontSize, + )), + ), + TextButton( + key: const Key(keyGoToSignInButton), + child: Text( + "Sign In", + style: TextStyle( + fontSize: AuthenticatorButtonConstants.fontSize, + color: Theme.of(context).primaryColor != Colors.blue + ? Theme.of(context).primaryColor + : AuthenticatorColors.primary), + ), + onPressed: _authModelView.goToSignIn, ), - onPressed: _authModelView.goToSignIn, - ), - ], + ], + ), ); } } @@ -158,26 +172,31 @@ class LostCodeButton extends StatelessWidget { Widget build(BuildContext context) { final ConfirmSignUpViewModel _authViewModel = InheritedAuthViewModel.of(context)!.confirmSignUpViewModel; - return Row( - children: [ - const Text("Lost your code?", - style: TextStyle( - color: Color.fromRGBO(130, 130, 130, 1), - fontSize: 13, - )), - TextButton( - key: const Key(keyGoToSignInButton), - child: Text( - "Resend Code", - style: TextStyle( - fontSize: 13, - color: Theme.of(context).primaryColor != Colors.blue - ? Theme.of(context).primaryColor - : AuthenticatorColors.primary), + return Padding( + padding: const EdgeInsets.only(top: 4.0), + child: Row( + children: [ + const Expanded( + child: Text("Lost your code?", + style: TextStyle( + color: AuthenticatorButtonConstants.textColor, + fontSize: 13, + )), + ), + TextButton( + key: const Key(keyGoToSignInButton), + child: Text( + "Resend Code", + style: TextStyle( + fontSize: AuthenticatorButtonConstants.textFontSize, + color: Theme.of(context).primaryColor != Colors.blue + ? Theme.of(context).primaryColor + : AuthenticatorColors.primary), + ), + onPressed: _authViewModel.resendSignUpCode, ), - onPressed: _authViewModel.resendSignUpCode, - ), - ], + ], + ), ); } } @@ -189,26 +208,31 @@ class ResetPasswordButton extends StatelessWidget { Widget build(BuildContext context) { final SignInViewModel _authViewModel = InheritedAuthViewModel.of(context)!.signInViewModel; - return Row( - children: [ - const Text("Forgot your Password?", - style: TextStyle( - color: Color.fromRGBO(130, 130, 130, 1), - fontSize: 12, - )), - TextButton( - key: const Key(keyGoToSignInButton), - child: Text( - "Reset password", - style: TextStyle( - fontSize: 12, - color: Theme.of(context).primaryColor != Colors.blue - ? Theme.of(context).primaryColor - : AuthenticatorColors.primary), + return Padding( + padding: const EdgeInsets.only(top: 4.0), + child: Row( + children: [ + const Expanded( + child: Text("Forgot your Password?", + style: TextStyle( + color: Color.fromRGBO(130, 130, 130, 1), + fontSize: 12, + )), ), - onPressed: _authViewModel.goToReset, - ), - ], + TextButton( + key: const Key(keyGoToSignInButton), + child: Text( + "Reset password", + style: TextStyle( + fontSize: 12, + color: Theme.of(context).primaryColor != Colors.blue + ? Theme.of(context).primaryColor + : AuthenticatorColors.primary), + ), + onPressed: _authViewModel.goToReset, + ), + ], + ), ); } } diff --git a/packages/amplify_authenticator/lib/src/widgets/containers.dart b/packages/amplify_authenticator/lib/src/widgets/containers.dart index d9b1857e9a..dfbb64c49a 100644 --- a/packages/amplify_authenticator/lib/src/widgets/containers.dart +++ b/packages/amplify_authenticator/lib/src/widgets/containers.dart @@ -14,13 +14,17 @@ class FormFieldContainer extends StatelessWidget { required this.title, required this.validator, required this.obscureText, + this.color, + this.initialValue, this.enable, this.resendCodeButton}) : super(key: key); + final String? initialValue; + final String title; - final String hintText; + final String? hintText; final String? Function(String?)? validator; @@ -34,6 +38,7 @@ class FormFieldContainer extends StatelessWidget { final Widget? resendCodeButton; final bool? enable; + final Color? color; @override Widget build(BuildContext context) { @@ -53,6 +58,8 @@ class FormFieldContainer extends StatelessWidget { Text(title), const Padding(padding: FormFieldConstants.gap), TextFormField( + style: TextStyle(color: color), + initialValue: initialValue, enabled: _enable, key: key, validator: validator, @@ -197,12 +204,12 @@ class AuthenticatorContainer extends StatelessWidget { } class FormContainer extends StatelessWidget { - const FormContainer( - {Key? key, - required this.formKey, - required this.formFields, - required this.buttonsContainer}) - : super(key: key); + const FormContainer({ + Key? key, + required this.formKey, + required this.formFields, + required this.buttonsContainer, + }) : super(key: key); final FormFields formFields; diff --git a/packages/amplify_authenticator/lib/src/widgets/form_fields.dart b/packages/amplify_authenticator/lib/src/widgets/form_fields.dart index 597cdbe99d..849487b523 100644 --- a/packages/amplify_authenticator/lib/src/widgets/form_fields.dart +++ b/packages/amplify_authenticator/lib/src/widgets/form_fields.dart @@ -341,7 +341,7 @@ class ConfirmSignUpFormField extends StatelessWidget { const ConfirmSignUpFormField( {Key? key, required this.title, - required this.hintText, + this.hintText, required this.type, this.validator}) : super(key: key); @@ -375,7 +375,8 @@ class ConfirmSignUpFormField extends StatelessWidget { final ConfirmSignUpType? _type = fromStringToConfirmSignUpType(type); Widget? _resendCodeButton; bool _enable = true; - String _hintText = hintText ?? _confirmSignUpViewModel.username; + String? _initialValue; + Color? _color; switch (_type) { case ConfirmSignUpType.username: @@ -384,24 +385,26 @@ class ConfirmSignUpFormField extends StatelessWidget { _validator = validator ?? validateUsername; _key = const Key(keyUsernameConfirmSignUpFormfield); _enable = false; - + _initialValue = _confirmSignUpViewModel.username; + _color = const Color.fromRGBO(130, 130, 130, 1); break; case ConfirmSignUpType.email: _callBack = _confirmSignUpViewModel.setUsername; _keyboardType = TextInputType.emailAddress; _validator = validator ?? validateEmail; _key = const Key(keyEmailConfirmSignUpFormfield); - _enable = false; + _initialValue = _confirmSignUpViewModel.username; + _color = const Color.fromRGBO(130, 130, 130, 1); break; case ConfirmSignUpType.phone_number: _callBack = _confirmSignUpViewModel.setUsername; _keyboardType = TextInputType.phone; _validator = validator ?? validatePhoneNumber; - ; _key = const Key(keyPhoneNumberConfirmSignUpFormfield); - _enable = false; + _initialValue = _confirmSignUpViewModel.username; + _color = const Color.fromRGBO(130, 130, 130, 1); break; case ConfirmSignUpType.code: _callBack = _confirmSignUpViewModel.setCode; @@ -417,12 +420,14 @@ class ConfirmSignUpFormField extends StatelessWidget { } return FormFieldContainer( + color: _color, + initialValue: _initialValue, enable: _enable, resendCodeButton: _resendCodeButton, key: _key, keyboardType: _keyboardType, callback: _callBack, - hintText: _hintText, + hintText: hintText, title: title, validator: _validator, obscureText: _obscureText); diff --git a/packages/amplify_authenticator/test/amplify_authenticator_test.dart b/packages/amplify_authenticator/test/amplify_authenticator_test.dart index 378100f3a5..c5ca345426 100644 --- a/packages/amplify_authenticator/test/amplify_authenticator_test.dart +++ b/packages/amplify_authenticator/test/amplify_authenticator_test.dart @@ -1,6 +1,5 @@ - +import 'package:flutter_test/flutter_test.dart'; void main() { - - } - + test('', () {}); +}