Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
456 views
in Technique[技术] by (71.8m points)

how to change position of bottomappbar notch in flutter?

I try to use default position of notch FloatingActionButton but FloatingActionButton just have three position (startDocked, endDocked and centerDocked) but I need to add notch between center and left or center and right like below picture.

flutter FloatingActionButton notch position

how i can do it?

question from:https://stackoverflow.com/questions/65856999/how-to-change-position-of-bottomappbar-notch-in-flutter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try to wrap your FloatingActionButton with Padding to shift position:

floatingActionButton: Padding(
        padding: const EdgeInsets.only(left: 50.0),
        child: FloatingActionButton(
          child: Icon(Icons.remove),
          onPressed: () => null,
        ),
      ), 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...