flutter/examples
Ian Hickson 3252701753 Make it possible to run tests live on a device (#3936)
This makes it possible to substitute 'flutter run' for 'flutter test'
and actually watch a test run on a device.

For any test that depends on flutter_test:

1. Remove any import of 'package:test/test.dart'.

2. Replace `testWidgets('...', (WidgetTester tester) {`
      with `testWidgets('...', (WidgetTester tester) async {`

3. Add an "await" in front of calls to any of the following:
    * tap()
    * tapAt()
    * fling()
    * flingFrom()
    * scroll()
    * scrollAt()
    * pump()
    * pumpWidget()

4. Replace any calls to `tester.flushMicrotasks()` with calls to
   `await tester.idle()`.

There's a guarding API that you can use, if you have particularly
complicated tests, to get better error messages. Search for
TestAsyncUtils.
2016-05-16 12:53:13 -07:00
..
flutter_gallery Make it possible to run tests live on a device (#3936) 2016-05-16 12:53:13 -07:00
hello_android Upgrade gradle files for Android Studio 2.1 2016-05-10 11:11:31 -07:00
hello_world Make it possible to run tests live on a device (#3936) 2016-05-16 12:53:13 -07:00
layers Turn on avoid_return_types_on_setters and cleanup annotated setters. 2016-05-12 11:45:30 -07:00
stocks Make it possible to run tests live on a device (#3936) 2016-05-16 12:53:13 -07:00
.gitignore Review 2016-02-12 08:27:47 -08:00
README.md Call it Flutter Gallery (#3801) 2016-05-09 11:00:54 -07: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.

Available examples include:

  • Hello, world The hello world app is a basic app that shows the text "hello, world."

  • Flutter gallery The flutter gallery app showcases Flutter's implementation of material design.

  • Layers The layers vignettes show how to use the various layers in the Flutter framework. There is no main.dart in this directory because each file is a standalone example. To run a particular file, use flutter run -t filename.dart.