[0.2.0] ModalBottom sheet doesn't resize correctly on tablets
Encountered strange problem: when I run my app on tablet (iPad 10th gen) modal bottom sheet resizes incorrectly - it's has smaller width than screen. Problem occurres with version 0.2.0.
To reproduce just create a new app with scaffold and modal bottom sheet and this wrapper:
import 'package:flutter/material.dart';
import 'package:responsive_framework/responsive_wrapper.dart';
// coverage:ignore-file
/// Class for creating responsive view depending on screen size.
class MainResponsiveWrapper extends StatelessWidget {
/// Creates MainResponsiveWrapper.
const MainResponsiveWrapper({required this.child, super.key});
/// Widget, which will be wrapped in [ResponsiveWrapper].
final Widget child;
@override
Widget build(final BuildContext context) => ResponsiveWrapper(
minWidth: 320,
defaultScale: true,
mediaQueryData: MediaQuery.of(context).copyWith(textScaleFactor: 1),
alignment: Alignment.center,
defaultScaleLandscape: true,
breakpoints: const <ResponsiveBreakpoint>[
/// Examples: old Android phones.
ResponsiveBreakpoint.resize(320, name: PHONE, scaleFactor: 0.7),
/// Examples: iPhone SE 3
ResponsiveBreakpoint.resize(
360,
name: 'SMALL_MOBILE',
scaleFactor: 0.9,
),
/// Examples: iPhone 14 PRO, Xiaomi 12
ResponsiveBreakpoint.resize(
390,
name: MOBILE,
scaleFactor: 1,
),
/// Examples: iPhone 14 PRO MAX
ResponsiveBreakpoint.resize(
428,
name: 'BIG_MOBILE',
scaleFactor: 1.15,
),
/// Examples: foldable smartphones
ResponsiveBreakpoint.autoScale(
520,
name: 'HUGE_MOBILE',
scaleFactor: 0.9,
),
/// Examples: iPad mini
ResponsiveBreakpoint.autoScale(680, name: TABLET, scaleFactor: 1),
/// Examples: iPad Pro (12.9-inch)
ResponsiveBreakpoint.resize(
1000,
name: 'BIG_TABLET',
scaleFactor: 1.1,
),
],
child: child,
);
}
If I remove responsive wrapper^ everything is OK.
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.5, on macOS 13.4 22F66 darwin-arm64, locale ru-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.2)
[✓] IntelliJ IDEA Community Edition (version 2022.2)
[✓] VS Code (version 1.78.0)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
@rayliverified Are you still maintaining the package?
Yes, the package just recently received a complete rewrite.
@rayliverified Thank you for your answer and for the package! I love the package and was a little bit worried as there are enough issues without answers
Unfortunately, I've been very sick for the past year with Long Covid.
I'm also trying my best to launch Codelessly. Especially the past few months now that I've felt better.
The moment I started feeling better, I rewrote this package to address the underlying cause of these long standing issues. Hopefully that's proof of my dedication there.
Get well!!! And thank you very much for your efforts and for a wonderful package!
Any updates?