add predictive back gesture

This commit is contained in:
Michael 2025-04-27 18:26:48 +03:00
parent 0259f77fd2
commit fcdf02ed9b
2 changed files with 5 additions and 1 deletions

View file

@ -3,7 +3,8 @@
<application <application
android:label="OpenStore" android:label="OpenStore"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher"
android:enableOnBackInvokedCallback="true">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"

View file

@ -41,6 +41,9 @@ class MyApp extends StatelessWidget {
return MaterialApp.router( return MaterialApp.router(
title: 'OpenStore', title: 'OpenStore',
theme: ThemeData( theme: ThemeData(
pageTransitionsTheme: const PageTransitionsTheme(builders: {
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
}),
colorScheme: ColorScheme.fromSeed( colorScheme: ColorScheme.fromSeed(
seedColor: Colors.blue, seedColor: Colors.blue,
brightness: Brightness.dark, brightness: Brightness.dark,