jamesblasco / modal_bottom_sheet

Flutter | Create advanced modal bottom sheets. Material, Cupertino or your own style
https://pub.dev/packages/modal_bottom_sheet
MIT License
1.83k stars 461 forks source link

The demo code version is not fit with README. #384

Closed magic3584 closed 3 months ago

magic3584 commented 5 months ago

Such as showCupertinoModalBottomSheet is deprecated in demo and I failed show modal using the function in 2.1.2

showModalBottomSheet(
      context: context,
      backgroundColor: Colors.transparent,
      builder: (context) => DetailPage(),
    );

Any help?

CyMathew commented 4 months ago

Deprecated in which demo?

You will need MaterialWithModalsPageRoute on the route you're navigating from.

magic3584 commented 3 months ago

The demo perhaps is in Example folder on master branch by then. I don't know whether it works by now.

jamesblasco commented 3 months ago

Please see the example Cupertino Modal fit: https://github.com/jamesblasco/modal_bottom_sheet/blob/e44458d2359565324e117bb3d41da04f5e60362e/modal_bottom_sheet/example/lib/main.dart#L166-L174