1

I want this type of Cupertino modal bottom sheet?

Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F82 darwin-arm64, locale en-IN) Android toolchain - develop for Android devices (Android SDK version 34.0.0) Xcode - develop for iOS and macOS (Xcode 14.3.1) Chrome - develop for the web Android Studio (version 2022.2) VS Code (version 1.79.2) Connected device (4 available) Network resources

Ios Cupertino Modal Bottom Sheet

modal_bottom_sheet: ^2.1.2 this package is not working with flutter 3.10.5

https://pub.dev/packages/modal_bottom_sheet

1
  • You just use showModalBottomSheet in flutter package. See the officail document. Commented Jun 29, 2023 at 14:33

3 Answers 3

0

You can use this package which worked for me. https://pub.dev/packages/sliding_up_panel In the body, I am returning a Stack which contains two widgets: The one behind the panel (Container) and the panel itself as below.

 body: Stack(
      children:[
        Container(), // set the contents behind the panel
        Align(
          alignment: Alignment.bottomCenter,
          child: SlidingUpPanel(
             color: Colors.white, //set the panel color
             minHeight: MediaQuery.of(context).size.height / 2, //set min height
             maxHeight: 750, // set desired max height when expanded
             borderRadius: const BorderRadius.only( // border decorations
                 topLeft: Radius.circular(24.0),
                 topRight: Radius.circular(24.0),
               ),
             panel: Column(...), // contents of the panel
          ),
        ),
      ],
    )

Let me know if this helps :)

Sign up to request clarification or add additional context in comments.

Comments

0

you can call showModalBottomSheet from any stateful or stateless widget providing the context, this one comes in the material part of flutter, no need to use extra packages

 showModalBottomSheet(context: context, builder: builder)

Comments

0

Packages to get this done.

Demo:

modal_bottom_sheet cupertino_modal_sheet
modal_bottom_sheet cupertino_modal_sheet

1 Comment

Another package that I found recently: pub.dev/packages/flutter_cupernino_bottom_sheet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.