• amirh's avatar
    Move the notch computation from the FAB to the BAB. (#18372) · c39f2f26
    amirh authored
    Move the notch computation from the FAB to the BAB.
    
    The notch in the BAB (bottom action bar) for the FAB (floating action button) was previously kept as part of the FAB's implementation. This was done to keep the shape of the FAB and the shape of the notch coupled.
    That approach resulted in a somewhat complex and 'non Fluttery' mechanism for propagating the notch computation from the FAB to the BAB.
    
    This CL uncouples the FAB and the notch computation.
    With the new API the BAB computes its overall shape including the notch using a NotchedShape delegate.
    
    This includes multiple breaking changes:
      * Scaffold.setFloatingActionButtonNotchFor is deleted.
      * The ComputeNotch type is deleted.
      * The hasNotch property of BottomAppBar is deleted.
      * The notchMargin property of FloatingActionButton is deleted.
    
    Quick migration guide from the previous API:
    
    | Previous API | New API |
    | ------------------|-------------|
    | BottomAppBar(hasNotch: false) | BottomAppBar() |
    | Using a FloatingActionButton with: BottomAppBar() / BottomAppBar(hasNotch: true) | BottomAppBar(shape: CircularNotchedRectangle()) |
    | Scaffold.setFloatingActionButtonNotchFor(..) | No longer supported |
    c39f2f26
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.cirrus.yml Loading commit data...
.coveralls.yml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
analysis_options_repo.yaml Loading commit data...
appveyor.yml Loading commit data...
flutter_console.bat Loading commit data...