Skip to content

Commit

Permalink
enable invoke callback
Browse files Browse the repository at this point in the history
  • Loading branch information
deathblade666 committed Aug 29, 2024
1 parent 1d61438 commit 5e77632
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:enableOnBackInvokedCallback="true">

<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
7 changes: 4 additions & 3 deletions lib/pages/menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class Menu extends StatefulWidget {
bool switchWCValue = false;
SharedPreferences prefs;
bool switchInputvalue = false;


void closeApp({bool? animated}) async {
prefs.reload();
Expand Down Expand Up @@ -115,12 +114,14 @@ class Menu extends StatefulWidget {
final outputfile = await FileSaver.instance.saveAs(
ext: "md",
name: "test",
//file: file,
bytes: bytes,
mimeType: MimeType.custom,
customMimeType: 'text/markdown',
);
//final file = File(outputfile!);
//file.writeAsString(OpenFile.text);
final file = File(outputfile!);
file.writeAsString(OpenFile.text);

showDialog(
context: context,
builder: (BuildContext context){
Expand Down

0 comments on commit 5e77632

Please sign in to comment.