2022-11-09 11:37:26 +08:00
|
|
|
import 'package:example/home_page.dart';
|
2022-08-17 17:23:20 +08:00
|
|
|
import 'package:flutter/material.dart';
|
2022-09-22 14:28:08 +08:00
|
|
|
|
2022-09-16 14:06:46 +08:00
|
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
2022-08-17 17:23:20 +08:00
|
|
|
|
|
|
|
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
2022-08-25 20:21:33 +08:00
|
|
|
|
2022-08-17 17:23:20 +08:00
|
|
|
void main() {
|
|
|
|
|
runApp(const MyApp());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
|
const MyApp({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
2022-10-27 14:08:54 +08:00
|
|
|
return const MaterialApp(
|
|
|
|
|
localizationsDelegates: [
|
2022-09-16 14:06:46 +08:00
|
|
|
GlobalMaterialLocalizations.delegate,
|
|
|
|
|
GlobalCupertinoLocalizations.delegate,
|
|
|
|
|
GlobalWidgetsLocalizations.delegate,
|
2022-09-15 21:27:49 +08:00
|
|
|
AppFlowyEditorLocalizations.delegate,
|
|
|
|
|
],
|
2022-10-27 14:08:54 +08:00
|
|
|
supportedLocales: [Locale('en', 'US')],
|
2022-08-26 10:53:20 +08:00
|
|
|
debugShowCheckedModeBanner: false,
|
2022-10-27 14:08:54 +08:00
|
|
|
home: MyHomePage(title: 'AppFlowyEditor Example'),
|
2022-08-17 17:23:20 +08:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MyHomePage extends StatefulWidget {
|
|
|
|
|
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
|
|
|
|
final String title;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<MyHomePage> createState() => _MyHomePageState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
2022-11-09 11:37:26 +08:00
|
|
|
return const HomePage();
|
2022-08-17 17:23:20 +08:00
|
|
|
}
|
|
|
|
|
}
|