phone_auth_otp_ui 0.0.1 copy "phone_auth_otp_ui: ^0.0.1" to clipboard
phone_auth_otp_ui: ^0.0.1 copied to clipboard

outdated

Phone Auth OTP UI is a phone number authentication with OTP UI, that comes with super cool features like auto country code update as per user location, country selector screen with a search option, ot [...]

Phone Auth OTP UI #

pub package

Phone Auth OTP UI is a phone number authentication with OTP UI, that comes with super cool features like auto country code update as per user location, country selector screen with a search option, otp screen to verify user phone number and a super beautiful UI that will suit any flutter project.

Please contribute to the discussion with feedback.

Installation #

flutter pub add phone_auth_otp_ui

Getting Started #

Here's a quick example that shows how to implement the UI in your app

import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_ui_auth/firebase_ui_auth.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    const providers = [EmailAuthProvider()];

    return MaterialApp(
      initialRoute: FirebaseAuth.instance.currentUser == null ? '/sign-in' : '/profile',
      routes: {
        '/sign-in': (context) {
          return SignInScreen(
            providers: providers,
            actions: [
              AuthStateChangeAction<SignedIn>((context, state) {
                Navigator.pushReplacementNamed(context, '/profile');
              }),
            ],
          );
        },
        '/profile': (context) {
          return ProfileScreen(
            providers: providers,
            actions: [
              SignedOutAction((context) {
                Navigator.pushReplacementNamed(context, '/sign-in');
              }),
            ],
          );
        },
      },
    );
  }
}

Learn more here.

Roadmap / Features #

2
likes
40
points
22
downloads

Documentation

API reference

Publisher

verified publisherstaneze.com

Weekly Downloads

Phone Auth OTP UI is a phone number authentication with OTP UI, that comes with super cool features like auto country code update as per user location, country selector screen with a search option, otp screen to verify user phone number and a super beautiful UI that will suit any flutter project.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

firebase_auth, flutter, http

More

Packages that depend on phone_auth_otp_ui