-
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 |