Find a file
liyuqian c63dcf3bcd
Make shader warm-up async so it can handle image (#28687)
## Description

This moves another 15-20ms from the animation jank of one of our important client to the startup latency. Unfortunately, this is probably not captured in our current benchmarks (presumably some other bottlenecks overshadow this shader compilation in the worst_frame benchmark). Considering that drawing images is such a common operation, maybe we should add one in the future to benchmark this.

We need this PR to land soon for our client because this changes the API to return Future.

## Related Issues

https://github.com/flutter/flutter/issues/813
2019-02-28 20:07:55 -08:00
.github Remove line breaks from PR template (#28235) 2019-02-20 18:40:33 -08:00
bin Roll engine 5194919e1309..56c16154eada (3 commits) (#28686) 2019-02-28 23:02:28 -05:00
dev Make shader warm-up async so it can handle image (#28687) 2019-02-28 20:07:55 -08:00
examples Make shader warm-up async so it can handle image (#28687) 2019-02-28 20:07:55 -08:00
packages Make shader warm-up async so it can handle image (#28687) 2019-02-28 20:07:55 -08:00
.cirrus.yml Removed trailing whitespace from the end of the CI config (#28370) 2019-02-25 10:29:24 -08:00
.gitattributes Add git config option to automatically convert CRLF to LF (#8122) 2017-02-14 10:21:33 -08:00
.gitignore Added key.properties and *.jks to .gitignore to prevent sensitive commits (#25413) 2019-01-15 02:51:17 -08:00
analysis_options.yaml Disable prefer_collection_literals in the analyzer until we can update to using set literals (#28024) 2019-02-15 15:54:16 -08:00
AUTHORS Update AUTHORS to add Volodymyr Lykhonis (#24889) 2019-02-20 20:43:17 -08:00
CODE_OF_CONDUCT.md Fix spelling typo (#25514) 2019-01-03 15:51:45 -05:00
CONTRIBUTING.md Reorganize contributor documentation (#23963) 2018-11-06 13:41:09 -08:00
dartdoc_options.yaml Remove snippets snapshotting hack from dartdoc generation. (#24812) 2018-11-27 22:31:49 -08:00
flutter_console.bat Remove color command from flutter_console.bat (#23880) 2018-11-02 14:23:59 -07:00
LICENSE Wrap lines at 80 characters (#26285) 2019-01-29 16:13:27 +01:00
PATENTS Add a file describing Google's commitments with regard to patents and this project (#8632) 2017-03-08 16:40:36 -08:00
README.md removed image with 404 (#26376) 2019-02-20 16:06:46 -08:00

Flutter Flutter logo

Gitter Channel Build Status - Cirrus

Build beautiful native apps in record time

Flutter is Googles mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

Main site: flutter.io

For announcements about new releases and breaking changes, follow the flutter-announce@googlegroups.com mailing list.

Fast development

Flutter's hot reload helps you quickly and easily experiment, build UIs, add features, and fix bugs. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.

Make a change in your code, and your app changes instantly.

Expressive and flexible UI

Quickly ship features with a focus on native end-user experiences. Layered architecture allows full customization, which results in incredibly fast rendering and expressive and flexible designs.

Delight your users with Flutter's built-in beautiful Material Design and Cupertino (iOS-flavor) widgets, rich motion APIs, smooth natural scrolling, and platform awareness.

Brand-first shopping design Fitness app design

Contact app design iOS chat app design

Browse the widget catalog.

Modern, reactive framework

Easily compose your UI with Flutter's modern functional-reactive framework and rich set of platform, layout, and foundation widgets. Solve your tough UI challenges with powerful and flexible APIs for 2D, animation, gestures, effects, and more.

class CounterState extends State<Counter> {
  int counter = 0;

  void increment() {
    // Tells the Flutter framework that state has changed,
    // so the framework can run build() and update the display.
    setState(() {
      counter++;
    });
  }

  Widget build(BuildContext context) {
    // This method is rerun every time setState is called.
    // The Flutter framework has been optimized to make rerunning
    // build methods fast, so that you can just rebuild anything that
    // needs updating rather than having to individually change
    // instances of widgets.
    return Row(
      children: <Widget>[
        RaisedButton(
          onPressed: increment,
          child: Text('Increment'),
        ),
        Text('Count: $counter'),
      ],
    );
  }
}

Browse the widget catalog and learn more about the functional-reactive framework.

Access native features and SDKs

Make your app come to life with platform APIs, 3rd party SDKs, and native code. Flutter lets you reuse your existing Java/Kotlin and ObjC/Swift code, and access native features and SDKs on Android and iOS.

Accessing platform features is easy. Here is a snippet from our interop example:

Future<void> getBatteryLevel() async {
  var batteryLevel = 'unknown';
  try {
    int result = await methodChannel.invokeMethod('getBatteryLevel');
    batteryLevel = 'Battery level: $result%';
  } on PlatformException {
    batteryLevel = 'Failed to get battery level.';
  }
  setState(() {
    _batteryLevel = batteryLevel;
  });
}

Learn how to use packages or write platform channels to access native code, APIs, and SDKs.

Unified app development

Flutter has the tools and libraries to help you easily bring your ideas to life on iOS and Android. If you don't have any mobile development experience, Flutter is an easy and fast way to build beautiful mobile apps. If you are an experienced iOS or Android developer, you can use Flutter for your views and leverage much of your existing Java/Kotlin/ObjC/Swift investment.

Learn more about what makes Flutter special in the technical overview.

More resources

Join us in our Gitter chat room or join our public mailing list, flutter-dev@googlegroups.com.

How to contribute

To join the team working on Flutter, see our contributor guide.