appwrite_auth_ui 0.0.2 copy "appwrite_auth_ui: ^0.0.2" to clipboard
appwrite_auth_ui: ^0.0.2 copied to clipboard

UI library to implement auth forms using Appwrite and Flutter

example/lib/main.dart

import 'package:example/phone_sign_up.dart';
import 'package:flutter/material.dart';
import 'package:appwrite_auth_ui/appwrite_auth_ui.dart';

import './home.dart';
import './sign_in.dart';
import './magic_link.dart';
import './update_password.dart';
import 'phone_sign_in.dart';
import './verify_phone.dart';

late Client appwrite;

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  appwrite = Client().setEndpoint('https://cloud.appwrite.io/v1').setProject(
        const String.fromEnvironment('APPWRITE_PROJECT_ID'),
      );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Appwrite Auth UI Demo',
      theme: ThemeData(
        colorSchemeSeed:  const Color(0xfff02e65),
        inputDecorationTheme: const InputDecorationTheme(
          border: OutlineInputBorder(),
        ),
      ),
      initialRoute: '/',
      routes: {
        '/': (context) => const SignUp(),
        '/magic_link': (context) => const MagicLink(),
        '/update_password': (context) => const UpdatePassword(),
        '/phone_sign_in': (context) => const PhoneSignIn(),
        '/phone_sign_up': (context) => const PhoneSignUp(),
        '/verify_phone': (context) => const VerifyPhone(),
        '/home': (context) => const Home(),
      },
      onUnknownRoute: (RouteSettings settings) {
        return MaterialPageRoute<void>(
          settings: settings,
          builder: (BuildContext context) => const Scaffold(
            body: Center(
              child: Text(
                'Not Found',
                style: TextStyle(
                  fontSize: 42,
                  fontWeight: FontWeight.bold,
                ),
              ),
            ),
          ),
        );
      },
    );
  }
}
2
likes
130
points
62
downloads
screenshot

Publisher

verified publishercodeontherocks.dev

Weekly Downloads

UI library to implement auth forms using Appwrite and Flutter

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

appwrite, email_validator, flutter, font_awesome_flutter

More

Packages that depend on appwrite_auth_ui