I have a page that can present in two ways, modally and push, based on where this page gets initiated.
I use toNamed
to present those pages, but the problem is I can't pass fullscreenDialog
flag at the call site. I expected something like this:
Get.toNamed('pageName', fullscreenDialog: false);
So, do I need to have two routes and two pages for this kind of job? Something like this:
GetPage(
name: 'pageNameDialog',
page: () => QuestionPage(),
fullscreenDialog: true,
binding: QuestionBinding(),
),
GetPage(
name: 'pageNamePush',
page: () => QuestionPage(),
fullscreenDialog: false,
binding: QuestionBinding(),
),
I think it should be a better way, but I'm really new to Flutter and getx and don't know what I should search for. Does anyone have a solution for this? Otherwise, I might have to double my route and page which is quite redundant.