This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Update Gradle, Java and other Android project settings in a Flutter project | |
| # Works with both .gradle and .gradle.kts build files | |
| # See: https://gradle.org/releases/ | |
| # See: https://developer.android.com/build/releases/gradle-plugin#compatibility | |
| DESIRED_GRADLE_VERSION="8.11.1" | |
| # Build errors often show the required Java version | |
| DESIRED_JAVA_VERSION="17" | |
| # See: https://developer.android.com/ndk/downloads |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package_name("com.foo.bar") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:convert'; | |
| import 'dart:ui'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| class AppLocalizations { | |
| AppLocalizations(this.locale); | |
| final Locale fallbackLocale = Locale('en'); | |
| static AppLocalizations of(BuildContext context) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:async/async.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| void main() { | |
| test("CancelableOperation with future", () async { | |
| var cancellableOperation = CancelableOperation.fromFuture( | |
| Future.value('future result'), | |
| onCancel: () => {print('onCancel')}, | |
| ); |