hidden_drawer_menu icon indicating copy to clipboard operation
hidden_drawer_menu copied to clipboard

HiddenDrawer works on iPad, but has issues with iPhone and Gesture detector

Open cpuell opened this issue 1 year ago • 0 comments

Hi,.

When run app with hidden drawer on iPad it works fine, but on iPhone it shows laggy and takes much time to detect the gesture on leading action button in app bar. I don't see any error in my debug console.

iPhone 14 Pro Max iOS ver. 17.1.1
iPad Air (5. Gen) iOS ver. 17.1.1
Flutter 3.16.0

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.84.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Not sure why, but when i run it on iPad it flawlessly detect the open and close toggle on leading icon button.

I don't have such a complicated structure, just using the basic implementation.

class HiddenDrawer extends StatefulWidget {
  const HiddenDrawer({Key? key}) : super(key: key);

  static const routeName = '/hidden_drawer';

  @override
  State<HiddenDrawer> createState() => _HiddenDrawerState();
}

class _HiddenDrawerState extends State<HiddenDrawer> {
  List<ScreenHiddenDrawer> _pages = [];

  final menuItemTextStyle = TextStyle(
      fontWeight: FontWeight.bold, fontSize: 18, color: AppTheme.corporate500);

  final menuItemTextStyleSelected = TextStyle(
      fontWeight: FontWeight.bold, fontSize: 18, color: AppTheme.corporate500);

  @override
  void initState() {
    super.initState();
    _pages = [
      ScreenHiddenDrawer(
        ItemHiddenMenu(
          name: 'Profile',
          baseStyle: menuItemTextStyle,
          selectedStyle: menuItemTextStyleSelected,
          colorLineSelected: Colors.black,
        ),
        CustomerProfileDetail(),
      ),
      ScreenHiddenDrawer(
        ItemHiddenMenu(
          name: 'Settings',
          baseStyle: menuItemTextStyle,
          selectedStyle: menuItemTextStyleSelected,
          colorLineSelected: Colors.black,
        ),
        SettingsPage(),
      ),
    ];
  }

  @override
  Widget build(BuildContext context) {
    return HiddenDrawerMenu(
      // elevationAppBar: 10,
      disableAppBarDefault: false,
      backgroundColorMenu: Theme.of(context).scaffoldBackgroundColor,
      screens: _pages,
      initPositionSelected: 1,
      slidePercent: 60,
      contentCornerRadius: 24,
    );
  }
}

cpuell avatar Nov 17 '23 12:11 cpuell