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

Collection of auth service with advanced controlling system.

example/lib/main.dart

import 'package:auth_management/core.dart';
import 'package:example/authentication_test.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import 'di.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  await diInit();
  runApp(const Application());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
        body: SafeArea(
          child: Center(
            child: BlocProvider(
              create: (context) => locator<AuthController>(),
              child: const AuthenticationTest(),
            ),
          ),
        ),
      ),
    );
  }
}