Giter Site home page Giter Site logo

nearhuscarl / flutter_login Goto Github PK

View Code? Open in Web Editor NEW
1.5K 25.0 789.0 16.51 MB

Provides login screen with login/signup functionalities to help speed up development

License: MIT License

Swift 0.49% Objective-C 0.01% Dart 84.57% AutoHotkey 0.20% HTML 0.06% Ruby 0.84% Kotlin 0.04% CMake 6.05% C++ 7.31% C 0.44%
flutter login android material dart animation flutter-package flutter-widget

flutter_login's Introduction

Flutter Login

pub package Join the chat Workflow

FlutterLogin is a ready-made login/signup widget with many animation effects to demonstrate the capabilities of Flutter

Installation

Follow the install instructions here

Reference

Property Type Description
onSignup AuthCallback Called when the user hit the submit button when in sign up mode. It receives a SignupData object, with name, password and, if additionalSignUpFields is not null, the additional fields filled in by the user in a Map<String,String>
onConfirmSignup ConfirmSignupCallback Called when the user hits the submit button when confirming signup. If not specified, signup will not be confirmed by user.
confirmSignupRequired ConfirmSignupRequiredCallback Additional option to decide in runtime if confirmation is required. If not specified, signup will be confirmed by user if onConfirmSignup is specified.
confirmSignupKeyboardType TextInputType The keyboard type of the confirm signup field
onResendCode AuthCallback Called when the user hits the resend code button when confirming signup. Only required when onConfirmSignup is provided.
onLogin AuthCallback Called when the user hit the submit button when in login mode
onRecoverPassword RecoverCallback Called when the user hit the submit button when in recover password mode
onConfirmRecover ConfirmRecoverCallback Called when the user submits confirmation code and sets password in recover password mode. If not specified, a confirmation code will not be used to recover password.
title String The large text above the login [Card], usually the app or company name. Leave the string empty or null if you want no title.
logo ImageProvider or String The image provider or asset path string for the logo image to be displayed
messages LoginMessages Describes all of the labels, text hints, button texts and other auth descriptions
theme LoginTheme FlutterLogin's theme. If not specified, it will use the default theme as shown in the demo gifs and use the colorsheme in the closest Theme widget
userType LoginUserType FlutterLogin's user type. If not specified, it will use the default user type as email
userValidator FormFieldValidator<String> User field validating logic, add your custom validation here. The default is email validation logic. Expects to return an error message [String] to be display if validation fails or [null] if validation succeeds
validateUserImmediately bool Should email be validated after losing focus [true] or after form submissions [false]. Default: [false]
passwordValidator FormFieldValidator<String> Same as userValidator but for password
onSubmitAnimationCompleted Function Called after the submit animation's completed. Put your route transition logic here
logoTag String Hero tag for logo image. If not specified, it will simply fade out when changing route
titleTag String Hero tag for title text. Need to specify LoginTheme.beforeHeroFontSize and LoginTheme.afterHeroFontSize if you want different font size before and after hero animation
showDebugButtons bool Display the debug buttons to quickly forward/reverse login animations. In release mode, this will be overridden to false regardless of the value passed in
hideForgotPasswordButton bool Hides the Forgot Password button if set to true
hideProvidersTitle bool Hides the title above login providers if set to true. In case the providers List is empty this is uneffective, as the title is hidden anyways. The default is false
disableCustomPageTransformer bool Disables the custom transition which causes RenderBox was not laid out error. See #97 for more info.
additionalSignUpFields Map<String, UserFormField> Used to specify the additional form fields; the form is shown right after signin up. You can provide at most 6 additional fields.
onSwitchToAdditionalFields AdditionalFieldsCallback Called when the user switches to additional fields.
navigateBackAfterRecovery bool Navigate back to the login page after successful recovery.
savedEmail String Prefilled value for user field (ie. saved from previous session via other means, ie. via SharedPreferences)
savedPassword String Prefilled value for password field (ie. saved from previous session via other means, ie. via SharedPreferences). Will set also confirmation password in Auth class
termsOfService TermOfService List of terms of service to be listed during registration. On onSignup callback LoginData contains a list of TermOfServiceResult
children [Widget] List of widgets that can be added to the stack of the login screen. Can be used to show custom banners or logos.
scrollable bool When set to true, the login card becomes scrollable instead of resizing when needed.
headerWidget Widget A widget that can be placed on top of the loginCard.

NOTE: It is recommended that the child widget of the Hero widget should be the same in both places. For title's hero animation use the LoginThemeHelper.loginTextStyle in the next screen to get the style of the exact text widget in the login screen. LoginThemeHelper can be accessed by adding this line

import 'package:flutter_login/theme.dart';

LoginMessages

Property Type Description
userHint String Hint text of the user field [TextField] (Note: user field can be name, email or phone. For more info check: LoginUserType)
passwordHint String Hint text of the password [TextField]
confirmPasswordHint String Hint text of the confirm password [TextField]
forgotPasswordButton String Forgot password button's label
loginButton String Login button's label
signupButton String Signup button's label
recoverPasswordButton String Recover password button's label
recoverPasswordIntro String Intro in password recovery form
recoverPasswordDescription String Description in password recovery form, shown when the onConfirmRecover callback is not provided
recoverCodePasswordDescription String Description in password recovery form, shown when the onConfirmRecover callback is provided
goBackButton String Go back button's label. Go back button is used to go back to to login/signup form from the recover password form
confirmPasswordError String The error message to show when the confirm password not match with the original password
recoverPasswordSuccess String The success message to show after submitting recover password
confirmSignupIntro String The intro text for the confirm signup card
confirmationCodeHint String Hint text of the confirmation code [TextField]
confirmationCodeValidationError String The error message to show if confirmation code is empty
resendCodeButton String Resend code button's label
resendCodeSuccess String The success message to show after resending a confirmation code
confirmSignupButton String Confirm signup button's label
confirmSignupSuccess String The success message to show after confirming signup
confirmRecoverIntro String The intro text for the confirm recover password card
recoveryCodeHint String Hint text of the recovery code [TextField]
recoveryCodeValidationError String The error message to show if recovery code is empty
setPasswordButton String Set password button's label for password recovery
confirmRecoverSuccess String The success message to show after confirming recovered password
flushbarTitleError String The Flushbar title on errors
flushbarTitleSuccess String The Flushbar title on successes
providersTitle String A string shown above the login Providers, defaults to or login with

LoginTheme

Property Type Description
primaryColor Color The background color of major parts of the widget like the login screen and buttons
accentColor Color The secondary color, used for title text color, loading icon, etc. Should be contrast with the [primaryColor]
errorColor Color The color to use for [TextField] input validation errors
cardTheme CardTheme The colors and styles used to render auth [Card]
inputTheme InputDecorationTheme Defines the appearance of all [TextField]s
buttonTheme LoginButtonTheme A theme for customizing the shape, elevation, and color of the submit button
titleStyle TextStyle Text style for the big title
bodyStyle TextStyle Text style for small text like the recover password description
textFieldStyle TextStyle Text style for [TextField] input text
buttonStyle TextStyle Text style for button text
beforeHeroFontSize double Defines the font size of the title in the login screen (before the hero transition)
afterHeroFontSize double Defines the font size of the title in the screen after the login screen (after the hero transition)
pageColorLight Color The optional light background color of login screen; if provided, used for light gradient instead of primaryColor
pageColorDark Color The optional dark background color of login screen; if provided, used for dark gradient instead of primaryColor
footerBottomPadding double The footer bottom Padding; defaults to 0 if not provided.
switchAuthTextColor Color The optional color for the switch authentication text, if nothing is specified [primaryColor] is used.
logoWidth double Width of the logo where 1 is the full width of the login card. ; defaults to 0.75 if not provided.
primaryColorAsInputLabel bool Set to true if you want to use the primary color for input labels. Defaults to false.

LoginUserType

Enum Description
EMAIL The User Field will be set to be email
NAME The User Field will be set to be username
FIRSTNAME The User Field will be set to be first name
LASTNAME The User Field will be set to be last name
PHONE The User Field will be set to be phone
INTLPHONE The User Field will be set to be phone with country code selection
TEXT The User Field will be set to be text

[LoginUserType] will change how the user field [TextField] behaves. Autofills and Keyboard Type will be adjusted automatically for the type of user that you pass.

UserFormField

Property Type Description
keyName String The identifier of the fields, it will be the key in the returned map. Please ensure this is unique, otherwise an Error will be thrown
displayName String The name of the field displayed on the form. Defaults to keyName if not given
defaultValue String The default value of the field, if given the field will be pre-filled in with this
fieldValidator FormFieldValidator<String> A function to validate the field. It should return null on success, or a string with the explanation of the error
icon Icon? The icon shown on the left of the field. Defaults to the user icon when not provided
userType LoginUserType The LoginUserType of the form. The right keyboard and suggestions will be shown accordingly. Defaults to LoginUserType.user
tooltip InlineSpan Additional description for that field

LoginProvider

Property Type Description
button Widget Used for Buttons for [LoginProvider] - see example uses [SignInButton] package
icon IconData Icon that is used for a button for [LoginProvider]
label String The label shown under the provider
callback ProviderAuthCallback A Function called when the provider button is pressed. It must return null on success, or a String describing the error on failure.
providerNeedsSignUpCallback ProviderNeedsSignUpCallback? Optional. Requires that the additionalSignUpFields argument is passed to FlutterLogin. When given, this callback must return a Future<bool>. If it evaluates to true the card containing the additional signup fields is shown, right after the evaluation of callback. If not given the default behaviour is not to show the signup card.

NOTE: Both [button] and [icon] can be added to [LoginProvider], but [button] will take preference over [icon]

TermOfService

Property Type Description
id String Used only on Signup callback to identify a single Term Of service if it's optional.
mandatory bool If set true and term is not check when form is validate on submit, the validation error message will be shown
text String Name of Term to show.
linkUrl String Web url link to additional term of services info.
validationErrorMessage String Validation error message to show.
initialValue bool Specify if checkbox is initialized checked

TermOfServiceResult

Property Type Description
term TermOfService Contains a termOfServiceObject.
accepted bool Indicates whether or not the term of service was selected during registration

Examples

You can view the complete example in the example project which resulted in the gif above

Basic example

import 'package:flutter/material.dart';
import 'package:flutter_login/flutter_login.dart';
import 'dashboard_screen.dart';

const users =  {
  '[email protected]': '12345',
  '[email protected]': 'hunter',
};

class LoginScreen extends StatelessWidget {
  const LoginScreen({super.key});

  Duration get loginTime => const Duration(milliseconds: 2250);

  Future<String?> _authUser(LoginData data) {
    debugPrint('Name: ${data.name}, Password: ${data.password}');
    return Future.delayed(loginTime).then((_) {
      if (!users.containsKey(data.name)) {
        return 'User not exists';
      }
      if (users[data.name] != data.password) {
        return 'Password does not match';
      }
      return null;
    });
  }

  Future<String?> _signupUser(SignupData data) {
    debugPrint('Signup Name: ${data.name}, Password: ${data.password}');
    return Future.delayed(loginTime).then((_) {
      return null;
    });
  }

  Future<String> _recoverPassword(String name) {
    debugPrint('Name: $name');
    return Future.delayed(loginTime).then((_) {
      if (!users.containsKey(name)) {
        return 'User not exists';
      }
      return null;
    });
  }

  @override
  Widget build(BuildContext context) {
    return FlutterLogin(
      title: 'ECORP',
      logo: const AssetImage('assets/images/ecorp-lightblue.png'),
      onLogin: _authUser,
      onSignup: _signupUser,
      onSubmitAnimationCompleted: () {
        Navigator.of(context).pushReplacement(MaterialPageRoute(
          builder: (context) => const DashboardScreen(),
        ));
      },
      onRecoverPassword: _recoverPassword,
    );
  }
}

Basic example with sign in providers

import 'package:flutter/material.dart';
import 'package:flutter_login/flutter_login.dart';
import 'dashboard_screen.dart';

const users = {
  '[email protected]': '12345',
  '[email protected]': 'hunter',
};

class LoginScreen extends StatelessWidget {
  const LoginScreen({super.key});

  Duration get loginTime => const Duration(milliseconds: 2250);

  Future<String?> _authUser(LoginData data) {
    debugPrint('Name: ${data.name}, Password: ${data.password}');
    return Future.delayed(loginTime).then((_) {
      if (!users.containsKey(data.name)) {
        return 'User not exists';
      }
      if (users[data.name] != data.password) {
        return 'Password does not match';
      }
      return null;
    });
  }

  Future<String?> _signupUser(SignupData data) {
    debugPrint('Signup Name: ${data.name}, Password: ${data.password}');
    return Future.delayed(loginTime).then((_) {
      return null;
    });
  }

  Future<String> _recoverPassword(String name) {
    debugPrint('Name: $name');
    return Future.delayed(loginTime).then((_) {
      if (!users.containsKey(name)) {
        return 'User not exists';
      }
      return null;
    });
  }

  @override
  Widget build(BuildContext context) {
    return FlutterLogin(
      title: 'ECORP',
      logo: const AssetImage('assets/images/ecorp-lightblue.png'),
      onLogin: _authUser,
      onSignup: _signupUser,
      
        loginProviders: <LoginProvider>[
          LoginProvider(
            icon: FontAwesomeIcons.google,
            label: 'Google',
            callback: () async {
              debugPrint('start google sign in');
              await Future.delayed(loginTime);
              debugPrint('stop google sign in');              
              return null;
            },
          ),
          LoginProvider(
            icon: FontAwesomeIcons.facebookF,
            label: 'Facebook',
            callback: () async {            
              debugPrint('start facebook sign in');
              await Future.delayed(loginTime);
              debugPrint('stop facebook sign in');              
              return null;
            },
          ),
          LoginProvider(
            icon: FontAwesomeIcons.linkedinIn,
            callback: () async {         
              debugPrint('start linkdin sign in');
              await Future.delayed(loginTime);         
              debugPrint('stop linkdin sign in');              
              return null;
            },
          ),
          LoginProvider(
            icon: FontAwesomeIcons.githubAlt,
            callback: () async {
              debugPrint('start github sign in');
              await Future.delayed(loginTime);
              debugPrint('stop github sign in');              
              return null;
            },
          ),
        ],
      onSubmitAnimationCompleted: () {
        Navigator.of(context).pushReplacement(MaterialPageRoute(
          builder: (context) => const DashboardScreen(),
        ));
      },
      onRecoverPassword: _recoverPassword,
    );
  }
}

Theming via ThemeData

Login theme can be customized indectly by using ThemeData like this

// main.dart
import 'package:flutter/material.dart';
import 'login_screen.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Login Demo',
      theme: ThemeData(
        primarySwatch: Colors.deepPurple,
        accentColor: Colors.orange,
        cursorColor: Colors.orange,
        textTheme: const TextTheme(
          headline3: TextStyle(
            fontFamily: 'OpenSans',
            fontSize: 45.0,
            color: Colors.orange,
          ),
          button: TextStyle(
            fontFamily: 'OpenSans',
          ),
          subtitle1: TextStyle(fontFamily: 'NotoSans'),
          bodyText2: TextStyle(fontFamily: 'NotoSans'),
        ),
      ),
      home: LoginScreen(),
    );
  }
}

// login_screen.dart
import 'package:flutter/material.dart';
import 'package:flutter_login/flutter_login.dart';
import 'dashboard_screen.dart';

class LoginScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return FlutterLogin(
      title: 'ECORP',
      logo: const AssetImage('assets/images/ecorp.png'),
      onLogin: (_) => Future(null),
      onSignup: (_) => Future(null),
      onSubmitAnimationCompleted: () {
        Navigator.of(context).pushReplacement(MaterialPageRoute(
          builder: (context) => const DashboardScreen(),
        ));
      },
      onRecoverPassword: (_) => Future(null),
    );
  }
}

Custom labels

import 'package:flutter/material.dart';
import 'package:flutter_login/flutter_login.dart';
import 'dashboard_screen.dart';

class LoginScreen extends StatelessWidget {
  const LoginScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return FlutterLogin(
      title: 'ECORP',
      logo: const AssetImage('assets/images/ecorp.png'),
      onLogin: (_) => Future(null),
      onSignup: (_) => Future(null),
      onSubmitAnimationCompleted: () {
        Navigator.of(context).pushReplacement(MaterialPageRoute(
          builder: (context) => const DashboardScreen(),
        ));
      },
      onRecoverPassword: (_) => Future(null),
      messages: LoginMessages(
        userHint: 'User',
        passwordHint: 'Pass',
        confirmPasswordHint: 'Confirm',
        loginButton: 'LOG IN',
        signupButton: 'REGISTER',
        forgotPasswordButton: 'Forgot huh?',
        recoverPasswordButton: 'HELP ME',
        goBackButton: 'GO BACK',
        confirmPasswordError: 'Not match!',
        recoverPasswordDescription:
            'Lorem Ipsum is simply dummy text of the printing and typesetting industry',
        recoverPasswordSuccess: 'Password rescued successfully',
      ),
    );
  }
}
Login/Signup Password Recovery
Login/Signup Password Recovery

Theme customization

import 'package:flutter/material.dart';
import 'package:flutter_login/flutter_login.dart';
import 'dashboard_screen.dart';

class LoginScreen extends StatelessWidget {
  const LoginScreen({super.key});

  @override
  Widget build(BuildContext context) {
    const inputBorder = BorderRadius.vertical(
      bottom: Radius.circular(10.0),
      top: Radius.circular(20.0),
    );

    return FlutterLogin(
      title: 'ECORP',
      logo: const AssetImage('assets/images/ecorp-lightgreen.png'),
      onLogin: (_) => Future(null),
      onSignup: (_) => Future(null),
      onSubmitAnimationCompleted: () {
        Navigator.of(context).pushReplacement(MaterialPageRoute(
          builder: (context) => const DashboardScreen(),
        ));
      },
      onRecoverPassword: (_) => Future(null),
      theme: LoginTheme(
        primaryColor: Colors.teal,
        accentColor: Colors.yellow,
        errorColor: Colors.deepOrange,
        titleStyle: const TextStyle(
          color: Colors.greenAccent,
          fontFamily: 'Quicksand',
          letterSpacing: 4,
        ),
        bodyStyle: const TextStyle(
          fontStyle: FontStyle.italic,
          decoration: TextDecoration.underline,
        ),
        textFieldStyle: const TextStyle(
          color: Colors.orange,
          shadows: [Shadow(color: Colors.yellow, blurRadius: 2)],
        ),
        buttonStyle: const TextStyle(
          fontWeight: FontWeight.w800,
          color: Colors.yellow,
        ),
        cardTheme: CardTheme(
          color: Colors.yellow.shade100,
          elevation: 5,
          margin: const EdgeInsets.only(top: 15),
          shape: ContinuousRectangleBorder(
              borderRadius: BorderRadius.circular(100.0)),
        ),
        inputTheme: InputDecorationTheme(
          filled: true,
          fillColor: Colors.purple.withOpacity(.1),
          contentPadding: EdgeInsets.zero,
          errorStyle: const TextStyle(
            backgroundColor: Colors.orange,
            color: Colors.white,
          ),
          labelStyle: const TextStyle(fontSize: 12),
          enabledBorder: UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.blue.shade700, width: 4),
            borderRadius: inputBorder,
          ),
          focusedBorder: UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.blue.shade400, width: 5),
            borderRadius: inputBorder,
          ),
          errorBorder: UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.red.shade700, width: 7),
            borderRadius: inputBorder,
          ),
          focusedErrorBorder: UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.red.shade400, width: 8),
            borderRadius: inputBorder,
          ),
          disabledBorder: const UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.grey, width: 5),
            borderRadius: inputBorder,
          ),
        ),
        buttonTheme: LoginButtonTheme(
          splashColor: Colors.purple,
          backgroundColor: Colors.pinkAccent,
          highlightColor: Colors.lightGreen,
          elevation: 9.0,
          highlightElevation: 6.0,
          shape: BeveledRectangleBorder(
            borderRadius: BorderRadius.circular(10),
          ),
          // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
          // shape: CircleBorder(side: BorderSide(color: Colors.green)),
          // shape: ContinuousRectangleBorder(borderRadius: BorderRadius.circular(55.0)),
        ),
      ),
    );
  }
}

Inspiration

License

  • MIT License

flutter_login's People

Contributors

7iqc avatar adrianp25 avatar arbile26 avatar chmoore889 avatar dependabot[bot] avatar dg76 avatar doc-rj-celltrak avatar emmett-deen avatar everters avatar fedepell avatar fotidim avatar inoas avatar jaroslawdabrowski avatar jmagers avatar juliansteenbakker avatar kovacbb avatar lcsvcn avatar lucaloiacono avatar maeddin avatar malta895 avatar mojo1917 avatar nearhuscarl avatar otto-dev avatar poqeteer avatar rickypid avatar salahaddin avatar surister avatar tkreuder avatar vcadillog avatar xnio94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_login's Issues

Update Provider Dependency

I cannot use this package because it has an outdated version of provider as a dependency, Could you update the dependency please?
Because every version of flutter_login depends on provider ^3.1.0 and flygyfs depends on provider ^4.0.1, flutter_login is forbidden.

Signup doesn't work in Chrome for Android

(Please note, that this is using Flutter for Web)

When toggling signup mode on, the confirm field shows up correctly.
But when focusing any of the fields be it Email, Password, or Confirm password, it shows, and hides the keyboard instantly, while also disabling the Confirm Password field.
Even when I enable Desktop-mode, it still happens.

This does not happen in the browser. on my laptop.

Please let me know if you need more information on how to debug this.

firebase auth

Unable to auth with firebase

firebase auth.createUser doesnt work
firebase auth. get user.id etc....

Expected behavior
signup, login, forgot password

Screenshots
n/a

Information (please complete the following information):
na
Additional context
add description in pub to clarify that this login is stored locally

Enhancement: support addition of oauth signup/authentication loops

I love your code for flutter_login and am using it in my application along with Firebase for authentication. Firebase supports enabling other auth providers beyond user/pass, including Google, Twitter, Facebook, etc. I'd really love it if I could incorporate those into my login widget, perhaps triggering an alternate event (onOAuth as opposed to onLogin?)

What I'm envisioning is a bar either above or below the login/pass fields that has a Column() populated with Button(Icon())'s of the services, and upon hitting the button we'd get a triggered onOAuth with an argument that specifies which service?

Is this something worth adding?

Hide Buttons

Hey,

I have tried using the library. I wanted to know if I only want to use Sign In option and not SignUp option then how can I hide the SignUp button and forget password button

isInitialRoute deprecated

Thank you for the wonderful @NearHuscarl

Describe the bug
isInitialRoute is deprecated in newer versions of flutter and is resulting to the following error
The getter 'isInitialRoute' isn't defined for the class 'RouteSettings' clear and concise description of what the bug is.

Flutter Version
Flutter version 1.17.1

Is there a work around?

Can't get it working after installation

Hi guys,
this looks great. But have an issue juster after installation.
This is the output of the terminal:

`Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

Please check the following imports:

import 'package:flutter_login/flutter_login.dart'; from project|lib/pages/login/index.dart at 2:1
`

I'm using the beta Channel of Flutter and the plugin installation is done (no error from VSCode) and no error from flutter doctor.
Could you please help me ?

Improve readability for dark themes

Thanks for this beautiful plugin!

As you can see, in the dark theme the readability of some of the texts is not very good. I've tried changing the theme and almost every TextTheme attribute I could find, and the most I can do is change the primaryColor of the Theme, and it only changes the "Register" button.

Image 1

Image2

Disable password textfield to start with a capital letter

Hello,

I do not know, if it's a OS issue or a flutter one. So, if it's not a flutter one, let me know.

I'm facing the problem, that everytime I click into the password textfield to enter my password, my keyboard locks the shift for the capital letter for the first letter. So i have to manually disable it.

Is it a thing that can be set in flutter?

Thanks in advance! :)

Add padding to the image and modify standard messages for the errors field

I'm working with this awesome plugin since few days and I really enjoy it but I found out some issues that I don't know how to fix.

When the field are empty there are these error messages that unfortunately I'm not able to change or translate even if there is the class LoginMessages that somehow already implement this mechanism:

Screenshot_20191114_194936

The second question that I would like to ask is: is there any possibility to add a Padding to the image above the title of the widget so that is not to close to the top of the screen?

Screenshot_20191114_195447

Thanks a lot in advance!

Render Overflow Exceptions

Exceptions happen when using flutter_login on lower resolution screens. Here's an example on a Nexus 4 (768 x 1280 xhdpi):

Another exception was thrown: A RenderFlex overflowed by 17 pixels on the bottom.

Screenshot_1575527407

Add biometric authentication support

It would be cool if this plugin allowed login through biometric authentication. So after the first login the user password could be stored inside biometric_storage and reused for later logins.

It should be configurable wether or not that feature is enabled. If interested i could attempt doing a PR for this.

LoginScreen disappears once loaded.

Describe the bug
LoginScreen disappears once loaded.

To Reproduce
Steps to reproduce the behavior:

  1. Clone master branch.
  2. Open flutter_login/example/lib/login_screen.dart
  3. Set showDebugButtons: false at line 172.
  4. Run and Debug (F5).
  5. See error...

Expected behavior
Not disappear...

Screenshots
error_login

Information (please complete the following information):

  • IDE: Visual Studio Code
  • Device: Pixel 3A XL API 29 (Emulator on MacOS)
  • Platform: Mobile
  • Flutter version: 1.12.13+hotfix.7
  • Package version: 1.0.14

How to remove buttons and fields?

I want to use the plugin but, I don't really need the forgot password or the signup stuff

I sow the AuthCard class has some methods to build the buttons. Is there a way to remove those?

Thanks,

Crashes when released on a real ios device when a text field is tapped

Describe the bug
App crashes when a text field (user name or password) is tabbed. I guess when the keyboard should be shown.

To Reproduce
Steps to reproduce the behavior:

  1. Load the flutter_login widget
  2. Click on the field "email" or "password"
  3. App crashes

Expected behavior
Keyboard should pop up.

Information (please complete the following information):

  • Device: iPhone X
  • Platform ios
  • Flutter version: 1.12.13+hotfix.8 (channel stable)
  • Package version: 1.0.14

Additional context
Works fine in the simulator, bug happens when compiled in release mode an running on the real device (I distributed it via TestFlight).
Only the theme, logo and company name was changed, login data was taken locally (as in the example).

How add Facebook login button ?

Hello,

This is a Great login screen 👍.
I would like add, on bottom of screen, the Facebook login button.
Is is possible ?
I am new in Flutter Dev and I am not sure it is possible to add another widget or Flat button in the screen...

Thanks

Change fontAwesome icone

Hello !

I don't see the possibility to change the FontAwesome logos from "textInput" in the pkg? Thanks to you

AnimationController.forward() called after AnimationController.dispose()

So I have an FirebaseAuth onStatechanged at the beginnig of my Application. When I am logged in I see my HomePage otherwise I go to the LoginScreen wich is implemented with flutter_login. However when I am logged in, I still get an error wich looks like this and is from this package.

√ Built build\app\outputs\apk\debug\app-debug.apk.

[38;5;248m════════ Exception caught by widgets library ═══════════════════════════════════[39;49m
[38;5;244mThe following assertion was thrown while finalizing the widget tree:[39;49m
_FlutterLoginState#74227(tickers: tracking 3 tickers) was disposed with an active Ticker.

[38;5;244m_FlutterLoginState created a Ticker via its TickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active. All Tickers must be disposed before calling super.dispose().[39;49m

[38;5;248mTickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.[39;49m

The offending ticker was: _WidgetTicker(created by _FlutterLoginState#74227(lifecycle state: created, tickers: tracking 0 tickers))
The stack trace when the _WidgetTicker was actually created was:
[38;5;244m#0      new Ticker.<anonymous closure>[39;49m
[38;5;244m#1      new Ticker[39;49m
[38;5;244m#2      new _WidgetTicker[39;49m
[38;5;244m#3      TickerProviderStateMixin.createTicker[39;49m
[38;5;244m#4      new AnimationController[39;49m
[38;5;248m#5      _FlutterLoginState.initState[39;49m
[38;5;244m#6      StatefulElement._firstBuild[39;49m
[38;5;244m#7      ComponentElement.mount[39;49m
[38;5;244m#8      Element.inflateWidget[39;49m
[38;5;244m#9      Element.updateChild[39;49m
[38;5;244m#10     ComponentElement.performRebuild[39;49m
[38;5;244m#11     Element.rebuild[39;49m
[38;5;244m#12     ComponentElement._firstBuild[39;49m
[38;5;244m#13     StatefulElement._firstBuild[39;49m
[38;5;244m#14     ComponentElement.mount[39;49m
[38;5;244m#15     Element.inflateWidget[39;49m
[38;5;244m#16     Element.updateChild[39;49m
[38;5;244m#17     ComponentElement.performRebuild[39;49m
[38;5;244m#18     Element.rebuild[39;49m
[38;5;244m#19     ComponentElement._firstBuild[39;49m
[38;5;244m#20     StatefulElement._firstBuild[39;49m
[38;5;244m#21     ComponentElement.mount[39;49m
[38;5;244m#22     Element.inflateWidget[39;49m
[38;5;244m#23     Element.updateChild[39;49m
[38;5;244m#24     ComponentElement.performRebuild[39;49m
[38;5;244m#25     Element.rebuild[39;49m
[38;5;244m#26     ComponentElement._firstBuild[39;49m
[38;5;244m#27     StatefulElement._firstBuild[39;49m
[38;5;244m#28     ComponentElement.mount[39;49m
[38;5;244m#29     Element.inflateWidget[39;49m
[38;5;244m#30     Element.updateChild[39;49m
[38;5;244m#31     SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#32     Element.inflateWidget[39;49m
[38;5;244m#33     Element.updateChild[39;49m
[38;5;244m#34     ComponentElement.performRebuild[39;49m
[38;5;244m#35     Element.rebuild[39;49m
[38;5;244m#36     ComponentElement._firstBuild[39;49m
[38;5;244m#37     ComponentElement.mount[39;49m
[38;5;244m#38     Element.inflateWidget[39;49m
[38;5;244m#39     Element.updateChild[39;49m
[38;5;244m#40     SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#41     Element.inflateWidget[39;49m
[38;5;244m#42     Element.updateChild[39;49m
[38;5;244m#43     SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#44     Element.inflateWidget[39;49m
[38;5;244m#45     Element.updateChild[39;49m
[38;5;244m#46     ComponentElement.performRebuild[39;49m
[38;5;244m#47     Element.rebuild[39;49m
[38;5;244m#48     ComponentElement._firstBuild[39;49m
[38;5;244m#49     StatefulElement._firstBuild[39;49m
[38;5;244m#50     ComponentElement.mount[39;49m
[38;5;244m#51     Element.inflateWidget[39;49m
[38;5;244m#52     Element.updateChild[39;49m
[38;5;244m#53     SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#54     Element.inflateWidget[39;49m
[38;5;244m#55     Element.updateChild[39;49m
[38;5;244m#56     SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#57     Element.inflateWidget[39;49m
[38;5;244m#58     Element.updateChild[39;49m
[38;5;244m#59     ComponentElement.performRebuild[39;49m
[38;5;244m#60     Element.rebuild[39;49m
[38;5;244m#61     ComponentElement._firstBuild[39;49m
[38;5;244m#62     StatefulElement._firstBuild[39;49m
[38;5;244m#63     ComponentElement.mount[39;49m
[38;5;244m#64     Element.inflateWidget[39;49m
[38;5;244m#65     Element.updateChild[39;49m
[38;5;244m#66     ComponentElement.performRebuild[39;49m
[38;5;244m#67     Element.rebuild[39;49m
[38;5;244m#68     ComponentElement._firstBuild[39;49m
[38;5;244m#69     ComponentElement.mount[39;49m
[38;5;244m#70     Element.inflateWidget[39;49m
[38;5;244m#71     Element.updateChild[39;49m
[38;5;244m#72     ComponentElement.performRebuild[39;49m
[38;5;244m#73     Element.rebuild[39;49m
[38;5;244m#74     ComponentElement._firstBuild[39;49m
[38;5;244m#75     StatefulElement._firstBuild[39;49m
[38;5;244m#76     ComponentElement.mount[39;49m
[38;5;244m#77     Element.inflateWidget[39;49m
[38;5;244m#78     Element.updateChild[39;49m
[38;5;244m#79     SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#80     Element.inflateWidget[39;49m
[38;5;244m#81     Element.updateChild[39;49m
[38;5;244m#82     ComponentElement.performRebuild[39;49m
[38;5;244m#83     Element.rebuild[39;49m
[38;5;244m#84     ComponentElement._firstBuild[39;49m
[38;5;244m#85     ComponentElement.mount[39;49m
[38;5;244m#86     Element.inflateWidget[39;49m
[38;5;244m#87     Element.updateChild[39;49m
[38;5;244m#88     SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#89     Element.inflateWidget[39;49m
[38;5;244m#90     Element.updateChild[39;49m
[38;5;244m#91     ComponentElement.performRebuild[39;49m
[38;5;244m#92     Element.rebuild[39;49m
[38;5;244m#93     ComponentElement._firstBuild[39;49m
[38;5;244m#94     StatefulElement._firstBuild[39;49m
[38;5;244m#95     ComponentElement.mount[39;49m
[38;5;244m#96     Element.inflateWidget[39;49m
[38;5;244m#97     Element.updateChild[39;49m
[38;5;244m#98     ComponentElement.performRebuild[39;49m
[38;5;244m#99     Element.rebuild[39;49m
[38;5;244m#100    ComponentElement._firstBuild[39;49m
[38;5;244m#101    ComponentElement.mount[39;49m
[38;5;244m#102    Element.inflateWidget[39;49m
[38;5;244m#103    Element.updateChild[39;49m
[38;5;244m#104    SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#105    Element.inflateWidget[39;49m
[38;5;244m#106    Element.updateChild[39;49m
[38;5;244m#107    ComponentElement.performRebuild[39;49m
[38;5;244m#108    Element.rebuild[39;49m
[38;5;244m#109    ComponentElement._firstBuild[39;49m
[38;5;244m#110    ComponentElement.mount[39;49m
[38;5;244m#111    Element.inflateWidget[39;49m
[38;5;244m#112    Element.updateChild[39;49m
[38;5;244m#113    ComponentElement.performRebuild[39;49m
[38;5;244m#114    Element.rebuild[39;49m
[38;5;244m#115    ComponentElement._firstBuild[39;49m
[38;5;244m#116    StatefulElement._firstBuild[39;49m
[38;5;244m#117    ComponentElement.mount[39;49m
[38;5;244m#118    Element.inflateWidget[39;49m
[38;5;244m#119    Element.updateChild[39;49m
[38;5;244m#120    ComponentElement.performRebuild[39;49m
[38;5;244m#121    Element.rebuild[39;49m
[38;5;244m#122    ComponentElement._firstBuild[39;49m
[38;5;244m#123    StatefulElement._firstBuild[39;49m
[38;5;244m#124    ComponentElement.mount[39;49m
[38;5;244m#125    Element.inflateWidget[39;49m
[38;5;244m#126    MultiChildRenderObjectElement.mount[39;49m
[38;5;244m#127    Element.inflateWidget[39;49m
[38;5;244m#128    Element.updateChild[39;49m
[38;5;244m#129    _TheatreElement.mount[39;49m
[38;5;244m#130    Element.inflateWidget[39;49m
[38;5;244m#131    Element.updateChild[39;49m
[38;5;244m#132    ComponentElement.performRebuild[39;49m
[38;5;244m#133    Element.rebuild[39;49m
[38;5;244m#134    ComponentElement._firstBuild[39;49m
[38;5;244m#135    StatefulElement._firstBuild[39;49m
[38;5;244m#136    ComponentElement.mount[39;49m
[38;5;244m#137    Element.inflateWidget[39;49m
[38;5;244m#138    Element.updateChild[39;49m
[38;5;244m#139    ComponentElement.performRebuild[39;49m
[38;5;244m#140    Element.rebuild[39;49m
[38;5;244m#141    ComponentElement._firstBuild[39;49m
[38;5;244m#142    ComponentElement.mount[39;49m
[38;5;244m#143    Element.inflateWidget[39;49m
[38;5;244m#144    Element.updateChild[39;49m
[38;5;244m#145    SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#146    Element.inflateWidget[39;49m
[38;5;244m#147    Element.updateChild[39;49m
[38;5;244m#148    ComponentElement.performRebuild[39;49m
[38;5;244m#149    Element.rebuild[39;49m
[38;5;244m#150    ComponentElement._firstBuild[39;49m
[38;5;244m#151    StatefulElement._firstBuild[39;49m
[38;5;244m#152    ComponentElement.mount[39;49m
[38;5;244m#153    Element.inflateWidget[39;49m
[38;5;244m#154    Element.updateChild[39;49m
[38;5;244m#155    SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#156    Element.inflateWidget[39;49m
[38;5;244m#157    Element.updateChild[39;49m
[38;5;244m#158    SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#159    Element.inflateWidget[39;49m
[38;5;244m#160    Element.updateChild[39;49m
[38;5;244m#161    ComponentElement.performRebuild[39;49m
[38;5;244m#162    Element.rebuild[39;49m
[38;5;244m#163    ComponentElement._firstBuild[39;49m
[38;5;244m#164    ComponentElement.mount[39;49m
[38;5;244m#165    Element.inflateWidget[39;49m
[38;5;244m#166    Element.updateChild[39;49m
[38;5;244m#167    ComponentElement.performRebuild[39;49m
[38;5;244m#168    Element.rebuild[39;49m
[38;5;244m#169    ComponentElement._firstBuild[39;49m
[38;5;244m#170    StatefulElement._firstBuild[39;49m
[38;5;244m#171    ComponentElement.mount[39;49m
[38;5;244m#172    Element.inflateWidget[39;49m
[38;5;244m#173    Element.updateChild[39;49m
[38;5;244m#174    ComponentElement.performRebuild[39;49m
[38;5;244m#175    Element.rebuild[39;49m
[38;5;244m#176    ComponentElement._firstBuild[39;49m
[38;5;244m#177    ComponentElement.mount[39;49m
[38;5;244m#178    Element.inflateWidget[39;49m
[38;5;244m#179    Element.updateChild[39;49m
[38;5;244m#180    ComponentElement.performRebuild[39;49m
[38;5;244m#181    Element.rebuild[39;49m
[38;5;244m#182    ComponentElement._firstBuild[39;49m
[38;5;244m#183    ComponentElement.mount[39;49m
[38;5;244m#184    Element.inflateWidget[39;49m
[38;5;244m#185    Element.updateChild[39;49m
[38;5;244m#186    ComponentElement.performRebuild[39;49m
[38;5;244m#187    Element.rebuild[39;49m
[38;5;244m#188    ComponentElement._firstBuild[39;49m
[38;5;244m#189    ComponentElement.mount[39;49m
[38;5;244m#190    Element.inflateWidget[39;49m
[38;5;244m#191    Element.updateChild[39;49m
[38;5;244m#192    ComponentElement.performRebuild[39;49m
[38;5;244m#193    Element.rebuild[39;49m
[38;5;244m#194    ComponentElement._firstBuild[39;49m
[38;5;244m#195    ComponentElement.mount[39;49m
[38;5;244m#196    Element.inflateWidget[39;49m
[38;5;244m#197    Element.updateChild[39;49m
[38;5;244m#198    ComponentElement.performRebuild[39;49m
[38;5;244m#199    Element.rebuild[39;49m
[38;5;244m#200    ComponentElement._firstBuild[39;49m
[38;5;244m#201    ComponentElement.mount[39;49m
[38;5;244m#202    Element.inflateWidget[39;49m
[38;5;244m#203    Element.updateChild[39;49m
[38;5;244m#204    ComponentElement.performRebuild[39;49m
[38;5;244m#205    Element.rebuild[39;49m
[38;5;244m#206    ComponentElement._firstBuild[39;49m
[38;5;244m#207    ComponentElement.mount[39;49m
[38;5;244m#208    Element.inflateWidget[39;49m
[38;5;244m#209    Element.updateChild[39;49m
[38;5;244m#210    ComponentElement.performRebuild[39;49m
[38;5;244m#211    Element.rebuild[39;49m
[38;5;244m#212    ComponentElement._firstBuild[39;49m
[38;5;244m#213    StatefulElement._firstBuild[39;49m
[38;5;244m#214    ComponentElement.mount[39;49m
[38;5;244m#215    Element.inflateWidget[39;49m
[38;5;244m#216    Element.updateChild[39;49m
[38;5;244m#217    ComponentElement.performRebuild[39;49m
[38;5;244m#218    Element.rebuild[39;49m
[38;5;244m#219    ComponentElement._firstBuild[39;49m
[38;5;244m#220    ComponentElement.mount[39;49m
[38;5;244m#221    Element.inflateWidget[39;49m
[38;5;244m#222    Element.updateChild[39;49m
[38;5;244m#223    ComponentElement.performRebuild[39;49m
[38;5;244m#224    Element.rebuild[39;49m
[38;5;244m#225    ComponentElement._firstBuild[39;49m
[38;5;244m#226    ComponentElement.mount[39;49m
[38;5;244m#227    Element.inflateWidget[39;49m
[38;5;244m#228    Element.updateChild[39;49m
[38;5;244m#229    ComponentElement.performRebuild[39;49m
[38;5;244m#230    Element.rebuild[39;49m
[38;5;244m#231    ComponentElement._firstBuild[39;49m
[38;5;244m#232    ComponentElement.mount[39;49m
[38;5;244m#233    Element.inflateWidget[39;49m
[38;5;244m#234    Element.updateChild[39;49m
[38;5;244m#235    ComponentElement.performRebuild[39;49m
[38;5;244m#236    Element.rebuild[39;49m
[38;5;244m#237    ComponentElement._firstBuild[39;49m
[38;5;244m#238    ComponentElement.mount[39;49m
[38;5;244m#239    Element.inflateWidget[39;49m
[38;5;244m#240    Element.updateChild[39;49m
[38;5;244m#241    ComponentElement.performRebuild[39;49m
[38;5;244m#242    Element.rebuild[39;49m
[38;5;244m#243    ComponentElement._firstBuild[39;49m
[38;5;244m#244    ComponentElement.mount[39;49m
[38;5;244m#245    Element.inflateWidget[39;49m
[38;5;244m#246    Element.updateChild[39;49m
[38;5;244m#247    SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#248    Element.inflateWidget[39;49m
[38;5;244m#249    Element.updateChild[39;49m
[38;5;244m#250    ComponentElement.performRebuild[39;49m
[38;5;244m#251    Element.rebuild[39;49m
[38;5;244m#252    ComponentElement._firstBuild[39;49m
[38;5;244m#253    StatefulElement._firstBuild[39;49m
[38;5;244m#254    ComponentElement.mount[39;49m
[38;5;244m#255    Element.inflateWidget[39;49m
[38;5;244m#256    Element.updateChild[39;49m
[38;5;244m#257    ComponentElement.performRebuild[39;49m
[38;5;244m#258    Element.rebuild[39;49m
[38;5;244m#259    ComponentElement._firstBuild[39;49m
[38;5;244m#260    ComponentElement.mount[39;49m
[38;5;244m#261    Element.inflateWidget[39;49m
[38;5;244m#262    Element.updateChild[39;49m
[38;5;244m#263    ComponentElement.performRebuild[39;49m
[38;5;244m#264    Element.rebuild[39;49m
[38;5;244m#265    ComponentElement._firstBuild[39;49m
[38;5;244m#266    StatefulElement._firstBuild[39;49m
[38;5;244m#267    ComponentElement.mount[39;49m
[38;5;244m#268    Element.inflateWidget[39;49m
[38;5;244m#269    Element.updateChild[39;49m
[38;5;244m#270    ComponentElement.performRebuild[39;49m
[38;5;244m#271    Element.rebuild[39;49m
[38;5;244m#272    ComponentElement._firstBuild[39;49m
[38;5;244m#273    ComponentElement.mount[39;49m
[38;5;244m#274    Element.inflateWidget[39;49m
[38;5;244m#275    Element.updateChild[39;49m
[38;5;244m#276    ComponentElement.performRebuild[39;49m
[38;5;244m#277    Element.rebuild[39;49m
[38;5;244m#278    ComponentElement._firstBuild[39;49m
[38;5;244m#279    ComponentElement.mount[39;49m
[38;5;244m#280    Element.inflateWidget[39;49m
[38;5;244m#281    Element.updateChild[39;49m
[38;5;244m#282    ComponentElement.performRebuild[39;49m
[38;5;244m#283    Element.rebuild[39;49m
[38;5;244m#284    ComponentElement._firstBuild[39;49m
[38;5;244m#285    ComponentElement.mount[39;49m
[38;5;244m#286    Element.inflateWidget[39;49m
[38;5;244m#287    Element.updateChild[39;49m
[38;5;244m#288    SingleChildRenderObjectElement.mount[39;49m
[38;5;244m#289    Element.inflateWidget[39;49m
[38;5;244m#290    Element.updateChild[39;49m
[38;5;244m#291    ComponentElement.performRebuild[39;49m
[38;5;244m#292    Element.rebuild[39;49m
[38;5;244m#293    ComponentElement._firstBuild[39;49m
[38;5;244m#294    ComponentElement.mount[39;49m
[38;5;244m#295    Element.inflateWidget[39;49m
[38;5;244m#296    Element.updateChild[39;49m
[38;5;244m#297    ComponentElement.performRebuild[39;49m
[38;5;244m#298    Element.rebuild[39;49m
[38;5;244m#299    ComponentElement._firstBuild[39;49m
[38;5;244m#300    StatefulElement._firstBuild[39;49m
[38;5;244m#301    ComponentElement.mount[39;49m
[38;5;244m#302    Element.inflateWidget[39;49m
[38;5;244m#303    Element.updateChild[39;49m
[38;5;244m#304    ComponentElement.performRebuild[39;49m
[38;5;244m#305    Element.rebuild[39;49m
[38;5;244m#306    ComponentElement._firstBuild[39;49m
[38;5;244m#307    StatefulElement._firstBuild[39;49m
[38;5;244m#308    ComponentElement.mount[39;49m
[38;5;244m#309    Element.inflateWidget[39;49m
[38;5;244m#310    Element.updateChild[39;49m
[38;5;244m#311    ComponentElement.performRebuild[39;49m
[38;5;244m#312    Element.rebuild[39;49m
[38;5;244m#313    ComponentElement._firstBuild[39;49m
[38;5;244m#314    StatefulElement._firstBuild[39;49m
[38;5;244m#315    ComponentElement.mount[39;49m
[38;5;244m#316    Element.inflateWidget[39;49m
[38;5;244m#317    Element.updateChild[39;49m
[38;5;244m#318    ComponentElement.performRebuild[39;49m
[38;5;244m#319    Element.rebuild[39;49m
[38;5;244m#320    ComponentElement._firstBuild[39;49m
[38;5;244m#321    ComponentElement.mount[39;49m
[38;5;244m#322    Element.inflateWidget[39;49m
[38;5;244m#323    Element.updateChild[39;49m
[38;5;244m#324    ComponentElement.performRebuild[39;49m
[38;5;244m#325    Element.rebuild[39;49m
[38;5;244m#326    ComponentElement._firstBuild[39;49m
[38;5;244m#327    StatefulElement._firstBuild[39;49m
[38;5;244m#328    ComponentElement.mount[39;49m
[38;5;244m#329    Element.inflateWidget[39;49m
[38;5;244m#330    Element.updateChild[39;49m
[38;5;244m#331    RenderObjectToWidgetElement._rebuild[39;49m
[38;5;244m#332    RenderObjectToWidgetElement.mount[39;49m
[38;5;244m#333    RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure>[39;49m
[38;5;244m#334    BuildOwner.buildScope[39;49m
[38;5;244m#335    RenderObjectToWidgetAdapter.attachToRenderTree[39;49m
[38;5;244m#336    WidgetsBinding.attachRootWidget[39;49m
[38;5;244m#337    WidgetsBinding.scheduleAttachRootWidget.<anonymous closure>[39;49m
[38;5;244m#346    _Timer._runTimers  (dart:isolate-patch/timer_impl.dart:384:19)[39;49m
[38;5;244m#347    _Timer._handleMessage  (dart:isolate-patch/timer_impl.dart:418:5)[39;49m
[38;5;244m#348    _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:174:12)[39;49m
(elided 8 frames from package dart:async and package dart:async-patch)

[38;5;244mWhen the exception was thrown, this was the stack[39;49m
[38;5;244m#0      TickerProviderStateMixin.dispose.<anonymous closure>[39;49m
[38;5;244m#1      TickerProviderStateMixin.dispose[39;49m
[38;5;248m#2      _FlutterLoginState.dispose[39;49m
[38;5;244m#3      StatefulElement.unmount[39;49m
[38;5;244m#4      _InactiveElements._unmount[39;49m
[38;5;244m...[39;49m
[38;5;248m════════════════════════════════════════════════════════════════════════════════[39;49m

[38;5;248m════════ Exception caught by animation library ═════════════════════════════════[39;49m
AnimationController.forward() called after AnimationController.dispose()
AnimationController methods should not be used after calling dispose.
'package:flutter/src/animation/animation_controller.dart':
Failed assertion: line 451 pos 7: '_ticker != null'
[38;5;248m════════════════════════════════════════════════════════════════════════════════[39;49m

Tabulation add a space in the email field

Hello,

Very good work !

I'm trying to implement it in my project.
Often I test my forms with physical keyboard and I'm facing a bug
Test Login on Android Emulator :

  1. Clic on email field
  2. Fill the email field
  3. Press "TAB" Key
    => A space is added at the end of the mail

Cannot mix 2014 and 2018 terms in call to TextTheme.copyWith().

The following assertion was thrown building FlutterLogin(dirty, dependencies: [_InheritedTheme, _EffectiveTickerMode, _LocalizationsScope-[GlobalKey#86d68]], state: _FlutterLoginState#77e04(tickers: tracking 3 tickers)):
Cannot mix 2014 and 2018 terms in call to TextTheme.copyWith().
'package:flutter/src/material/text_theme.dart':
Failed assertion: line 453 pos 7: '(headline1 == null && headline2 == null && headline3 == null && headline4 == null && headline5 == null && headline6 == null &&
subtitle1 == null && subtitle2 == null &&
bodyText1 == null && bodyText2 == null) ||
(display4 == null && display3 == null && display2 == null && display1 == null && headline == null && title == null &&
subhead == null && subtitle == null &&
body2 == null && body1 == null)'

Need to trigger the login buttun twice - Firebase Auth

I need to trigger the button to login twice in order to go to my next screen. First an animation is triggered and my logo disapear. Then after the second hit, the onSubmitAnimationCompleted is called and I am going to my Routing behavior.

Here are some screenshots : The first one if before the first click, and the second one just after it. I need to click again on the button to log-in.

Screenshot_20200128-133949
Screenshot_20200128-134004

-Expected behavior :
Only one click needed to go the the onSubmitAnimationCompleted.

Information (please complete the following information):

  • Device: OnePlus 7 pro
  • Platform: Android
  • Flutter version: 1.13.5
  • Package version: 1.0.13

Here is the sourceCode of my LoginPage :

class LoginScreen extends StatefulWidget {
  @override
  _LoginScreenState createState() => _LoginScreenState();
}

class _LoginScreenState extends State<LoginScreen> {
  @override
  void initState() {
    super.initState();
    _handleStartScreen();
  }

  // Si le user est deja logué, on redirige vers la page de dashboard
  Future<void> _handleStartScreen() async {
    final authentService = Provider.of<AuthentService>(context, listen: false);
    if (await authentService.isLoggedIn()) {
      Navigator.pushReplacementNamed(context, Router.dashboardRoute);
    }
  }

  @override
  Widget build(BuildContext context) {
    final authentService = Provider.of<AuthentService>(context);
    final compteUtilisateurService = Provider.of<CompteUtilisateurService>(context);

    return FlutterLogin(
      title: 'Nounou gestion',
      logo: 'assets/images/logo-sans-texte.png',
      onLogin: authentService.signIn,
      onSignup: authentService.signUp,
      onRecoverPassword: authentService.recoverPassword,
      showDebugButtons: false,
      onSubmitAnimationCompleted: () async {
        CompteUtilisateur infos = await compteUtilisateurService.getCompteUtilisateur(authentService.getIdUtilisateur());
        // Pas encore renseigné les infos personelles, on le redirige donc le bon écran.
        if (infos.id.isEmpty) {
          Navigator.pushReplacementNamed(context, Router.infosPersosRoute, arguments: CompteUtilisateur());
        } else {
          Navigator.pushReplacementNamed(context, Router.dashboardRoute);
        }
      },
      messages: LoginMessages(
        usernameHint: 'Mail utilisateur',
        passwordHint: 'Mot de passe',
        confirmPasswordHint: 'Confirmation mot de passe',
        loginButton: 'SE CONNECTER',
        signupButton: 'S\'INSCRIRE',
        forgotPasswordButton: 'Mot de passe oublié?',
        recoverPasswordButton: 'Aidez-moi',
        goBackButton: 'Retour',
        confirmPasswordError: 'Les deux mots de passe ne sont pas identiques!',
        recoverPasswordDescription: 'Un lien pour récupérer votre mot de passe va vous être envoyé par email.',
        recoverPasswordSuccess: 'Email de récupération du mot de passe envoyé.',
      ),
    );
  }
}

Is it because i don't have any Hero in my other screens after loggedIn ?

Thank you.

Flushbar problem

im getting this error:

flutter run error: Error: The method 'FlushbarRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'.

Pixel overflow on Screen rotation

Logo and title doesn't show up in landscape orientation and bottom overflows by 20 pixel. Also height and width of logo is not customizable

Idea for improvements

I think I have a idea about missing fields in loginMessages:

  • the same logic (recoverPasswordSuccess) after successful regerstration
  • posibility to extend register ( add new fields such as Name, Surname, etc)
  • posibility to off the forgotten password

Stripping whitespaces from email and password

Hello buddy!
First of all, thanks a lot for sharing your login screen ❤️ I really enjoy that and I am using it for my app.

I would like to suggest to strip the white spaces before putting them into LoginData object? Sometimes I accidently hit a whitespace and wonder why it does not work! :)

Thanks a lot!

Missing entries on LoginMessages and SVG support

  1. There are two untranslatable texts on widget_helper.dart: both shows success and errors toasts with hardcoded titles (Success and Error):

title: 'Success',

Those strings should be on LoginMessages class.


  1. The logo property is a String passed to an Image.asset(). It would be nice if we had a Widget logoWidget property, so we could use, for instance, SvgImage.asset() (or really anything else we want as the logo).

i need custom design how to remove unnecessary btns

Hello i need to make a custom design

i need to remove the title, the Register btn and password forget

the only think i need is the login for to work with firebase and how to do the logout

waiting for your suggestions

[Flutter web] Getting error when failed login

Getting the error when failed login.


�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
�[38;5;244mThe following assertion was thrown during a scheduler callback:�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/dom_canvas.dart:74:12
paint.shader == null
is not true

�[38;5;244mWhen the exception was thrown, this was the stack�[39;49m
�[38;5;248mthrow_ (package:build_web_compilers/src/dev_compiler/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:196:49)�[39;49m
�[38;5;248massertFailed (package:build_web_compilers/src/dev_compiler/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:26:3)�[39;49m
�[38;5;248m[_drawRect] (package:build_web_compilers/src/dev_compiler/C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/dom_canvas.dart:74:28)�[39;49m
�[38;5;248mdrawRRect (package:build_web_compilers/src/dev_compiler/C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/dom_canvas.dart:136:28)�[39;49m
�[38;5;248mapply (package:build_web_compilers/src/dev_compiler/C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/lib/_engine/engine/surface/recording_canvas.dart:865:11)�[39;49m
�[38;5;244m...�[39;49m
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/scene_builder.dart:267:12
retainedSurface.isActive || retainedSurface.isReleased
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by scheduler library ═════════════════════════════════�[39;49m
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/surface/surface.dart:986:12
oldSurface.isActive || oldSurface.isPendingUpdate
is not true
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

How to remove sign up button

Hello,

Super awesome login screen.

As on my application, there is no signup only login and forgot password things are there, so I want to remove the signup button, how can I hide or remove signup button.

Thanks

idea - confirm your account

This is really beautifully done, thanks! Here's an idea to make it even nicer. It would be great to support a full sign-up flow, including entry of a confirmation code to confirm the account.

It could be an optional feature. The "confirm account" card would be a child of the auth card page transformer. When user clicks on "sign up" button, it would switch to the "confirm account" card after calling back to client's AuthCallback onSignup (which triggers the email with confirmation code).

The content of the card would be similar to this screenshot, without the username field (but much slicker in your library, of course). One client callback would be tied to the "confirm" button. Another client callback would be tied to the "resend code" button. The "resend code" button could also trigger another page transform to visualize resending the code.

Screenshot_1573362773

Along these same lines, it would be great if the password recovery card supported a mode where you enter a verification code along with your password, similar to the screenshot below.

Screenshot_1573364591

The screenshots were taken from this AWS Cognito sample app: https://github.com/awslabs/aws-sdk-android-samples/tree/master/AmazonCognitoYourUserPoolsDemo

username field type

is possible change validation type for username field?. Now only allow a email address, but, if i need login with a user name, or number id user?

Maintainance status update

Sorry for the lack of responses in the issues lately. I am preparing for the finals and my time is currently very limited until January.

Happy learning Flutter.

Can we edit keyboard type ?

Very nice widget but my app needs the phone number to sign up so how can I change the keyboard type?

And It would be perfect if we could add a verification step before finishing the signUp.
Currently, I built another page before going to the app

Change the functionalities of onSignup property

Could be interesting that we be able to disable the functionality that this plugin does when the user tap on the button onSignup and then we could put a function in onSignup property with the onPressed property. (sorry for my english).

How do I add option to sign in with gmail?

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Information (please complete the following information):

  • Device: [e.g. iPhone6]
  • Platform [e.g. mobile, web]
  • Flutter version: [e.g. 1.12.13]
  • Package version [e.g. 1.0.0]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.