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