0

question 1: how to add a notch to flutter bottom sheet around the floatingactionbutton, so that it looks like a bottomappbar (with shape of CircularNotchedRectangle()) but behave like bottomsheet (can drag to dismiss)

question 2: how to make a bottomsheet non-dismissible yet still draggable. (similiar to android's bottomsheet)

question 3: bottomsheet peek height, bottom sheet that dismissible, but also expandable (again, just like android bottomsheet)

is it possible to achieve what I've listed above? or i'm out of luck and have to use a 3rd party library? (if there's one?)

enter image description here

Derek Zhu
  • 173
  • 2
  • 11

2 Answers2

0

hope its help :)

Scaffold(
    floatingActionButtonLocation: FloatingActionButtonLocation.startDocked, //specify the location of the FAB
    floatingActionButton: FloatingActionButton(
      backgroundColor: Colors.blue,
      onPressed: () {
        print('OK');
      },
      tooltip: "start FAB",
      child: Container(
        margin: EdgeInsets.all(15.0),
        child: Icon(Icons.add),

      ),
      elevation: 4.0,
    ),
    bottomNavigationBar: BottomAppBar(
      child: Container(
        color: mycolor,
        height: 35,
      ),
    )
);
0

You can use this technique too

Scaffold(
  backgroundColor: myBackgroundColor,
    floatingActionButtonLocation: FloatingActionButtonLocation.startDocked, //specify the location of the FAB
    floatingActionButton: CircleAvatar(
      radius: 32,
      backgroundColor: myBackgroundColor,
      child: Padding(
        padding: EdgeInsets.all(1),
        child: FloatingActionButton(
          backgroundColor: MyColor.textColor,
          onPressed: () {
            print('OK');
          },
          child: Container(
            margin: EdgeInsets.all(15.0),
            child: Icon(Icons.add),
          ),
          elevation: 4.0,
        ),
      ),
    ),
    bottomNavigationBar: BottomAppBar(
      child: Container(
        color: MyColor.textColor,
        height: 35,
      ),
    )
);