custom_auth 0.0.2
custom_auth: ^0.0.2 copied to clipboard
Sfera Auth custom package.
example/lib/main.dart
import 'package:custom_auth/custom_auth.dart';
import 'package:example/pages/main_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
void main() async {
await AuthMemoryStorage().initAuthStorage();
runApp(
const ProviderScope(child: CustomAuthTest()),
);
}
class CustomAuthTest extends StatelessWidget {
const CustomAuthTest({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
navigatorKey: navigatorKey,
initialRoute: MainPage.routeName,
routes: {
MainPage.routeName: (ctx) => const MainPage(),
},
);
}
}