1
This commit is contained in:
1 parent
2379b4476f
commit
8531403c33
21 files changed
+2498
-354
No files matched your search
+21
-9
@@ -1,6 +1,8 @@
|
||||
import 'package:code_editor/l10n/app_localizations.dart';
|
||||
import 'package:code_editor/providers/editor_provider.dart';
|
||||
import 'package:code_editor/views/main_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
@@ -11,16 +13,26 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
title: 'Flutter Demo',
|
||||
theme: ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
|
||||
return ChangeNotifierProvider(
|
||||
create: (_) => EditorProvider()..init(),
|
||||
child: MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
title: 'Flutter Demo',
|
||||
theme: ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
|
||||
fontFamilyFallback: const [
|
||||
'PingFang SC', // iOS / macOS
|
||||
'Noto Sans SC', // Android
|
||||
'Microsoft YaHei', // Windows
|
||||
'WenQuanYi Micro Hei', // Linux
|
||||
'sans-serif', // Web & generic fallback
|
||||
],
|
||||
),
|
||||
home: const MainView(),
|
||||
),
|
||||
home: const MainView(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user