Code Monkey home page Code Monkey logo

flutter_animated_login's Introduction

Flutter Animated Login

Pub Version GitHub Repo stars GitHub Repo forks GitHub Repo issues GitHub Repo contributors

A Flutter package to create a beautiful animated login screen with phone/email otp, password, and social login options. It also includes a phone number with country code picker.

Screenshots

Email OTP

Phone OTP

Dark Theme

Video Demo

Installing

To use this package run this command:

flutter pub add flutter_animated_login

Or, add the following to your pubspec.yaml file:

dependencies:
  flutter_animated_login: ^<latest_version>

Sometimes you may want to use the latest version of the package, instead of a published version. To do that, use the git syntax:

dependencies:
  flutter_animated_login:
    git:
      url: git://github.com/rvndsngwn/flutter_animated_login.git
      ref: main

How to Use

Simply create a FlutterAnimatedLogin widget, and pass the required params:

FlutterAnimatedLogin(
    onLogin: (loginData) async {
        print(loginData);
        return "";
    },
)

See the example directory for a complete sample app.

Parameters of the FlutterAnimatedLogin

  /// The callback triggered your login logic
  final LoginCallback? onLogin;

  /// The callback triggered your signup logic
  final SignupCallback? onSignup;

  /// [VerifyCallback] triggered your OTP verification logic
  /// The result is an error message, callback successes if message is null
  final VerifyCallback? onVerify;

  /// [ResendOtpCallback] triggered your OTP resend logic
  final ResendOtpCallback? onResendOtp;

  /// The configuration for the login text field
  final LoginConfig loginConfig;

  /// The list of login providers for the oauth
  final List<LoginProvider>? providers;

  /// The login type, default is [LoginType.otp]
  final LoginType loginType;

  /// The configuration for the verify page
  final VerifyConfig verifyConfig;

  /// The terms and conditions for the login/signup page
  final TextSpan? termsAndConditions;

  /// [PageConfig] for the page widget to customize the page.
  final PageConfig config;

  /// The configuration for the reset password page
  final ResetConfig resetConfig;

  /// The configuration for the signup page
  final SignupConfig signupConfig;

  /// The callback triggered your reset password logic
  final ResetPasswordCallback? onResetPassword;

LICENSE

This project is licensed under the MIT license. See LICENSE for more information.

You can help me by Donating

BuyMeACoffee PayPal Ko-Fi

👨🏻‍💻 Contribute to the project

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

GitHub

👨🏻‍💻Contributors

Made with contrib.rocks.

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.