Added support for predictive back gesture
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
<application
|
||||
android:label="Linkdy"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:enableOnBackInvokedCallback="true">
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
|
||||
@@ -13,12 +13,15 @@ ThemeData lightTheme(ColorScheme? dynamicColorScheme) => ThemeData(
|
||||
brightness: Brightness.light,
|
||||
listTileTheme: ListTileThemeData(
|
||||
tileColor: Colors.transparent,
|
||||
textColor: dynamicColorScheme != null
|
||||
? dynamicColorScheme.onSurfaceVariant
|
||||
: const Color.fromRGBO(117, 117, 117, 1),
|
||||
iconColor: dynamicColorScheme != null
|
||||
? dynamicColorScheme.onSurfaceVariant
|
||||
: const Color.fromRGBO(117, 117, 117, 1),
|
||||
textColor:
|
||||
dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
|
||||
iconColor:
|
||||
dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
|
||||
),
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -35,12 +38,15 @@ ThemeData darkTheme(ColorScheme? dynamicColorScheme) => ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
listTileTheme: ListTileThemeData(
|
||||
tileColor: Colors.transparent,
|
||||
textColor: dynamicColorScheme != null
|
||||
? dynamicColorScheme.onSurfaceVariant
|
||||
: const Color.fromRGBO(187, 187, 187, 1),
|
||||
iconColor: dynamicColorScheme != null
|
||||
? dynamicColorScheme.onSurfaceVariant
|
||||
: const Color.fromRGBO(187, 187, 187, 1),
|
||||
textColor:
|
||||
dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
|
||||
iconColor:
|
||||
dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
|
||||
),
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -58,6 +64,11 @@ ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
||||
iconColor: Color.fromRGBO(117, 117, 117, 1),
|
||||
),
|
||||
brightness: Brightness.light,
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
||||
@@ -75,4 +86,9 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
|
||||
iconColor: Color.fromRGBO(187, 187, 187, 1),
|
||||
),
|
||||
brightness: Brightness.dark,
|
||||
pageTransitionsTheme: const PageTransitionsTheme(
|
||||
builders: {
|
||||
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user