40 lines
1.2 KiB
Dart
40 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:notube/wrapper.dart';
|
|
import 'package:notube/constants.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await EasyLocalization.ensureInitialized();
|
|
|
|
runApp(
|
|
EasyLocalization(
|
|
supportedLocales: [Locale('en', 'US'), Locale('fr', 'FR')],
|
|
path: 'lib/translations',
|
|
fallbackLocale: Locale('en', 'US'),
|
|
child: NoTubeApp()),
|
|
);
|
|
}
|
|
|
|
class NoTubeApp extends StatelessWidget {
|
|
const NoTubeApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'NoTube',
|
|
theme: ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: colorMainRed, brightness: Brightness.dark),
|
|
appBarTheme:
|
|
const AppBarTheme(color: colorBackgroundBlack, elevation: 0),
|
|
scaffoldBackgroundColor: colorMainGrey),
|
|
localizationsDelegates: context.localizationDelegates,
|
|
supportedLocales: context.supportedLocales,
|
|
locale: context.locale,
|
|
home: const Wrapper(),
|
|
);
|
|
}
|
|
}
|