jonataslaw / getx

Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
MIT License
10.39k stars 1.63k forks source link

Expanding the Back Gesture Area for Transition.cupertino #3185

Closed synstin closed 2 months ago

synstin commented 2 months ago

Is it possible to expand the back gesture area for Transition.cupertino? Currently, you need to slide from the left edge to go back, but I would like to customize it so that you can go back by sliding anywhere on the screen, similar to Instagram or Threads.

It seems that customizing the _kBackGestureWidth value in get_transition_mixin.dart could achieve this behavior, but I don't see a way to modify this value directly.

Is there a solution for this? Thank you.

jonataslaw commented 2 months ago

Are you using named routes?

GetPage has a gesture width configuration.

synstin commented 2 months ago

@jonataslaw Yes, I am currently using named routes. Is it possible to customize them separately in named routes? Thank you.

fisforfaheem commented 2 months ago

I use like this, is this correct way Sizer( builder: (context, orientation, deviceType) { return GetMaterialApp( popGesture: false, defaultTransition: Transition.cupertino, debugShowCheckedModeBanner: false, theme: theme, translations: AppLocalization(), locale: Locale(widget.language), fallbackLocale: const Locale('en', 'US'), title: 'Inform Link', initialRoute: AppRoutes.initialRoute, getPages: AppRoutes.pages, ); }, )

synstin commented 2 months ago

@fisforfaheem Your response seems unrelated to the issue at hand. Does this address changing the _kBackGestureWidth value or expanding the back gesture area on iOS? The code you provided is merely boilerplate code for using the Sizer package.

synstin commented 2 months ago

@jonataslaw I resolved the issue by modifying the gestureWidth property of GetPage. Thank you.

fisforfaheem commented 2 months ago

@fisforfaheem Your response seems unrelated to the issue at hand. Does this address changing the _kBackGestureWidth value or expanding the back gesture area on iOS? The code you provided is merely boilerplate code for using the Sizer package.

Oh ok