flutter/examples/flutter_gallery
amirh c39f2f26f7
Move the notch computation from the FAB to the BAB. (#18372)
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 |
2018-06-21 15:51:21 -07:00
..
android Prepare for upgrading video player in Gallery to newest version (#18501) 2018-06-15 15:34:02 +02:00
ios Update the xcode project of flutter_gallery (#17630) 2018-05-15 15:53:56 -07:00
lib Move the notch computation from the FAB to the BAB. (#18372) 2018-06-21 15:51:21 -07:00
test Keep TextFields visible when keyboard comes up (#18291) 2018-06-15 10:11:10 -07:00
test_driver Added GalleryApp testMode (#17640) 2018-05-16 11:42:39 -07:00
tool add Android instrumentation test (#11063) 2017-07-10 17:20:49 -07:00
BUILD.gn Cleanup FLX related code (#16416) 2018-04-12 10:12:26 +02:00
pubspec.yaml Revert matcher package (#18614) 2018-06-19 17:22:56 -07:00
README.md Updated stocks example README (#12634) 2017-10-19 16:37:48 -07:00

Flutter gallery

Demo app for the material design widgets and other features provided by Flutter.

Building

You can follow these instructions to build the gallery app and install it onto your device.

Prerequisites

If you are new to Flutter, please first follow the Flutter Setup guide.

Building and installing the Flutter app

  • cd $FLUTTER_ROOT/examples/flutter_gallery
  • flutter upgrade
  • flutter run --release

The flutter run --release command both builds and installs the Flutter app.

Prerelease checklist

  • Verify that the About box's license page scrolls and reveals its long long stream of license texts.

Icon

Android launcher icons were generated using Android Asset Studio: https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=image&foreground.space.trim=1&foreground.space.pad=0.1&foreColor=607d8b%2C0&crop=0&backgroundShape=square&backColor=fafafa%2C100&effects=none