• 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
..
catalog Loading commit data...
flutter_gallery Loading commit data...
flutter_view Loading commit data...
hello_world Loading commit data...
layers Loading commit data...
platform_channel Loading commit data...
platform_channel_swift Loading commit data...
platform_view Loading commit data...
stocks Loading commit data...
README.md Loading commit data...