flutter_animated_login 0.0.4 copy "flutter_animated_login: ^0.0.4" to clipboard
flutter_animated_login: ^0.0.4 copied to clipboard

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.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_animated_login/flutter_animated_login.dart';

void main() {
  runApp(const MyApp());
}

ValueNotifier<bool> isDark = ValueNotifier<bool>(true);

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

  @override
  Widget build(BuildContext context) {
    return ValueListenableBuilder(
      valueListenable: isDark,
      builder: (context, value, child) => MaterialApp(
        title: 'Flutter Animated Login',
        themeMode: value ? ThemeMode.dark : ThemeMode.light,
        theme: value ? ThemeData.dark() : ThemeData.light(),
        debugShowCheckedModeBanner: false,
        home: Scaffold(
          floatingActionButton: IconButton.filled(
            onPressed: () => isDark.value = !isDark.value,
            icon: value
                ? const Icon(Icons.dark_mode)
                : const Icon(Icons.light_mode),
          ),
          body: FlutterAnimatedLogin(
            loginType: LoginType.loginWithOTP,
            onLogin: (loginData) async {
              final result = await Future.delayed(
                const Duration(seconds: 2),
                () => '',
              );
              SystemChannels.textInput.invokeMethod('TextInput.hide');
              TextInput.finishAutofillContext();
              return result;
            },
            loginConfig: const LoginConfig(
              title: 'Mohesu Enterprise',
              subtitle: 'Let\'s Sign In',
            ),
            providers: [
              LoginProvider(
                icon: Icons.reddit,
                label: 'Reddit',
                callback: () async {
                  return "";
                },
              ),
              LoginProvider(
                icon: Icons.apple,
                label: 'Apple',
                callback: () async {
                  return "";
                },
              ),
              LoginProvider(
                icon: Icons.facebook,
                label: 'Facebook',
                callback: () async {
                  return "";
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
7
likes
0
pub points
74%
popularity

Publisher

verified publishermohesu.com

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.

Repository (GitHub)
View/report issues

Topics

#flutter-login #flutter-animated-login #flutter-login-screen #flutter-login-ui #animated-login

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, flutter_intl_phone_field, material_loading_buttons, pinput, toastification

More

Packages that depend on flutter_animated_login