fix: add support for query schemes in example app (#279)
This commit is contained in:
parent
070ceb3e27
commit
f6584b9f48
4 changed files with 70 additions and 67 deletions
|
|
@ -31,4 +31,11 @@
|
|||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="https" />
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
|
|
|
|||
|
|
@ -47,5 +47,9 @@
|
|||
<true />
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true />
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -61,9 +61,15 @@ class _HomePageState extends State<HomePage> {
|
|||
void reassemble() {
|
||||
super.reassemble();
|
||||
|
||||
_widgetBuilder = (context) => SimpleEditor(
|
||||
jsonString: _jsonString,
|
||||
onEditorStateChange: (editorState) {
|
||||
_editorState = editorState;
|
||||
_jsonString = Future.value(
|
||||
jsonEncode(_editorState.document.toJson()),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -74,6 +80,7 @@ class _HomePageState extends State<HomePage> {
|
|||
drawer: _buildDrawer(context),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
title: const Text('AppFlowy Editor'),
|
||||
),
|
||||
body: SafeArea(child: _buildBody(context)),
|
||||
|
|
|
|||
|
|
@ -23,23 +23,8 @@ class MyApp extends StatelessWidget {
|
|||
],
|
||||
supportedLocales: const [Locale('en', 'US')],
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: const MyHomePage(title: 'AppFlowyEditor Example'),
|
||||
home: const HomePage(),
|
||||
theme: ThemeData.light(useMaterial3: true),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
return const HomePage();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue