Skip to content

Commit

Permalink
Fixed: Android swipe gesture navigation cause half-way drag on player…
Browse files Browse the repository at this point in the history
… page #367
  • Loading branch information
anandnet committed Jan 5, 2025
1 parent 313dc5d commit f4f3de1
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,23 @@ class MyApp extends StatelessWidget {
Hive.box("AppPrefs").get('currentAppLanguageCode') ?? "en"),
fallbackLocale: const Locale("en"),
builder: (context, child) {
final scale = MediaQuery.of(context)
.textScaler
final mQuery = MediaQuery.of(context);
final scale = mQuery.textScaler
.clamp(minScaleFactor: 1.0, maxScaleFactor: 1.1);
return MediaQuery(
data: MediaQuery.of(context).copyWith(textScaler: scale),
child: child!,
return Stack(
children: [
MediaQuery(
data: mQuery.copyWith(textScaler: scale), child: child!),
GestureDetector(
child: Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
height: mQuery.padding.bottom,
width: mQuery.size.width,
),
),
)
],
);
});
});
Expand Down

0 comments on commit f4f3de1

Please sign in to comment.