import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'app/constants.dart'; import 'app/route.dart'; import 'js/initial_route.dart'; import 'model/one_user_model.dart'; import 'provider/local_auth_provider.dart'; import 'provider/title_provider.dart'; void main() { runApp( const ProviderScope( child: MyApp(), ), ); } class MyApp extends HookConsumerWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context, WidgetRef ref) { String initialRoute = homeRoute; try { initialRoute = fxInitialRoute(); } catch (_) {} return MaterialApp( title: ref.watch(webTitleProvider), debugShowCheckedModeBanner: false, theme: ThemeData( primarySwatch: Colors.blue, scaffoldBackgroundColor: Colors.white, canvasColor: Colors.white, primaryColor: Colors.blue, splashColor: Constants.orange, brightness: Brightness.light, ), onGenerateRoute: AppRoute.generateRoute, initialRoute: initialRoute, ); } }