Add LICENSE test to presubmit checks (#28369)

## Description

Also update the existing dart files with missing licenses.

Without the fix, we'll emit the following error message
```
License headers cannot be found at the beginning of the following files.

/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/lib/src/animation/tween_sequence.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/material/raw_material_button_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/async_lifecycle_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/sliver_constraints_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/app_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/test_border.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/physical_model_test.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter/test/widgets/inherited_model.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/lib/src/base/user_messages.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/test/src/pubspec_schema.dart
/usr/local/google/home/liyuqian/flutter/flutter/packages/flutter_tools/test/ios/simulators_test.dart
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

## Related Issues

Fixes https://github.com/flutter/flutter/issues/28368

## Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.

- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] My PR includes tests for *all* changed/updated/fixed behaviors (See [Test Coverage]).
- [x] All existing and new tests are passing.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] The analyzer (`flutter analyze --flutter-repo`) does not report any problems on my PR.
- [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I am willing to follow-up on review comments in a timely manner.

## Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

- [ ] Yes, this is a breaking change (Please read [Handling breaking changes]).
- [x] No, this is *not* a breaking change.

<!-- Links -->
[issue database]: https://github.com/flutter/flutter/issues
[Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Test Coverage]: https://github.com/flutter/flutter/wiki/Test-coverage-for-package%3Aflutter
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[Handling breaking changes]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
18 files changed
tree: e0232b1bc345849f6923fb3ffc454d190718f79f
  1. .github/
  2. bin/
  3. dev/
  4. examples/
  5. packages/
  6. .cirrus.yml
  7. .gitattributes
  8. .gitignore
  9. analysis_options.yaml
  10. AUTHORS
  11. CODE_OF_CONDUCT.md
  12. CONTRIBUTING.md
  13. dartdoc_options.yaml
  14. flutter_console.bat
  15. LICENSE
  16. PATENTS
  17. README.md
README.md

Flutter Flutter logo

Gitter Channel Build Status - Cirrus

Build beautiful native apps in record time

Flutter is Google’s 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.

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.

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.