43 lines
1.5 KiB
Dart
43 lines
1.5 KiB
Dart
import 'package:appflowy_editor/appflowy_editor.dart';
|
|
import 'package:appflowy_editor_sync_plugin/appflowy_editor_sync_utility_functions.dart'
|
|
if (dart.library.html) 'package:example/sync_plugin_stub.dart';
|
|
import 'package:example/home_page.dart';
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
if (defaultTargetPlatform == TargetPlatform.android) {
|
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge, overlays: []);
|
|
SystemChrome.setSystemUIOverlayStyle(
|
|
const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent),
|
|
);
|
|
}
|
|
// Important for Offline Collaboration
|
|
await AppflowyEditorSyncUtilityFunctions.initAppFlowyEditorSync();
|
|
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
localizationsDelegates: const [
|
|
GlobalMaterialLocalizations.delegate,
|
|
GlobalCupertinoLocalizations.delegate,
|
|
GlobalWidgetsLocalizations.delegate,
|
|
AppFlowyEditorLocalizations.delegate,
|
|
],
|
|
supportedLocales: AppFlowyEditorLocalizations.delegate.supportedLocales,
|
|
debugShowCheckedModeBanner: false,
|
|
home: const HomePage(),
|
|
theme: ThemeData.light(useMaterial3: true),
|
|
);
|
|
}
|
|
}
|