Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to PopScope from WillPopScope #125

Merged
merged 5 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.0.0

- Support Flutter 3.16
- `onWillPop` is deleted, and `canPop`/`onPopInvoked` is added instead
- Migrate to PopScope from WillPopScope
- https://docs.flutter.dev/release/breaking-changes/android-predictive-back

## 1.10.1

- Fix TextStyle of showConfirmationDialog/showModalActionSheet (#124)
Expand Down
13 changes: 7 additions & 6 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<application
android:label="example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:enableOnBackInvokedCallback="true">
<activity
android:name=".MainActivity"
android:exported="true"
Expand All @@ -16,12 +17,12 @@
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/alert_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class AlertPage extends StatelessWidget {
},
),
ListTile(
title: const Text('OK Dialog (onWillPop: false)'),
title: const Text('OK Dialog (canPop: false)'),
onTap: () async {
final result = await showOkAlertDialog(
context: context,
title: 'Title',
message: 'This is message.',
onWillPop: () => Future.value(false),
canPop: false,
);
assert(result == OkCancelResult.ok);
logger.info(result);
Expand Down
2 changes: 2 additions & 0 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import FlutterMacOS
import Foundation

import appkit_ui_element_colors
import dynamic_color
import file_selector_macos
import macos_ui
import macos_window_utils
import url_launcher_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AppkitUiElementColorsPlugin.register(with: registry.registrar(forPlugin: "AppkitUiElementColorsPlugin"))
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
MacOSUiPlugin.register(with: registry.registrar(forPlugin: "MacOSUiPlugin"))
Expand Down
Loading