flutter/examples
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
..
catalog Revert matcher package (#18614) 2018-06-19 17:22:56 -07:00
flutter_gallery Move the notch computation from the FAB to the BAB. (#18372) 2018-06-21 15:51:21 -07:00
flutter_view Update Android dependencies (#18499) 2018-06-15 14:29:46 +02:00
hello_world Revert matcher package (#18614) 2018-06-19 17:22:56 -07:00
layers Revert matcher package (#18614) 2018-06-19 17:22:56 -07:00
platform_channel Revert matcher package (#18614) 2018-06-19 17:22:56 -07:00
platform_channel_swift Revert matcher package (#18614) 2018-06-19 17:22:56 -07:00
platform_view Upgradle Gradle dependencies to match Android Studio 3.1.2 (#18080) 2018-06-01 09:57:40 +02:00
stocks Revert matcher package (#18614) 2018-06-19 17:22:56 -07:00
README.md Make consistent use of gradle wrapper (#10993) 2017-06-29 09:48:01 +02:00

Flutter Examples

This directory contains several examples of using Flutter. Each of these is an individual Dart application package.

To run an example, use flutter run inside that example's directory. See the getting started guide to install the flutter tool.

Tip: To see examples of how to use a specific Flutter framework class, copy and paste a URL with this format in your browser. Replace foo with the classname you are searching for (for example, here's the query for examples of the AppBar class).

https://github.com/flutter/flutter/search?q=path%3Aexamples+new+foo

Available examples include:

Note on Gradle wrapper files in .gitignore:

Gradle wrapper files should normally be checked into source control. The example projects don't do that to avoid having several copies of the wrapper binary in the Flutter repo. Instead, the Gradle wrapper is injected by Flutter tooling, and the wrapper files are .gitignore'd to avoid making the Flutter repository dirty as a side effect of running the examples.