Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SweetSheet improvement - 2/3 : Allow for a root navigator #3

Closed
MsXam opened this issue Apr 4, 2020 · 1 comment
Closed

SweetSheet improvement - 2/3 : Allow for a root navigator #3

MsXam opened this issue Apr 4, 2020 · 1 comment

Comments

@MsXam
Copy link

MsXam commented Apr 4, 2020

Hi ,

The show(...) method requires an additional argument to allow for root navigators.

Its advised to therefore extend the existing show :

show({
    @required BuildContext context,
    Text title,
    @required Text description,
    @required CustomSheetColor color,
    @required SweetSheetAction positive,
    SweetSheetAction negative,
    IconData icon,
  }) 

and change to :


  show({
    @required BuildContext context,
    Widget title,
    @required Widget description,
    @required CustomSheetColor color,
    @required SweetSheetAction positive,
    SweetSheetAction negative,
    bool useRootNavigator = false,
    IconData icon,
  }) {

Here you can see a rootNavigator has been added. You will then amend your showModalBottomSheet to make use of this boolean :


showModalBottomSheet(
      context: context,
      useRootNavigator: useRootNavigator,
@CorneilleEdi
Copy link
Owner

done. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants