One UI in flutter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.0 KiB

2 years ago
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 '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,
);
}
}