├── examples ├── stocks │ ├── lib │ │ ├── i18n │ │ │ ├── .dartignore │ │ │ ├── stocks_en.arb │ │ │ ├── stocks_es.arb │ │ │ ├── stock_messages_en.dart │ │ │ ├── stock_messages_es.dart │ │ │ ├── regenerate.md │ │ │ └── stock_messages_all.dart │ │ ├── stock_list.dart │ │ ├── stock_strings.dart │ │ └── stock_types.dart │ ├── .gitignore │ ├── README.md │ └── pubspec.yaml ├── hello_world-browser │ ├── dart_test.yaml │ ├── web │ │ ├── main.dart │ │ └── index.html │ ├── pubspec.yaml │ └── test │ │ └── main_test.dart ├── stocks-browser │ ├── web │ │ ├── main.dart │ │ └── index.html │ └── pubspec.yaml └── hello_world │ ├── .gitignore │ ├── README.md │ ├── pubspec.yaml │ ├── lib │ ├── main.dart │ └── arabic.dart │ └── test │ └── hello_test.dart ├── packages ├── flutter │ ├── test │ │ └── main_test.dart │ ├── lib │ │ ├── src │ │ │ ├── widgets │ │ │ │ ├── raw_keyboard_listener.dart │ │ │ │ ├── size_changed_layout_notifier.dart │ │ │ │ ├── sliver_prototype_extent_list.dart │ │ │ │ ├── semantics_debugger.dart │ │ │ │ ├── will_pop_scope.dart │ │ │ │ ├── unique_widget.dart │ │ │ │ ├── layout_builder.dart │ │ │ │ ├── title.dart │ │ │ │ ├── status_transitions.dart │ │ │ │ ├── bottom_navigation_bar_item.dart │ │ │ │ └── texture.dart │ │ │ ├── ui │ │ │ │ └── lerp.dart │ │ │ ├── foundation │ │ │ │ ├── profile.dart │ │ │ │ ├── observer_list.dart │ │ │ │ ├── collections.dart │ │ │ │ ├── debug.dart │ │ │ │ ├── synchronous_future.dart │ │ │ │ └── platform.dart │ │ │ ├── painting │ │ │ │ ├── image_decoder.dart │ │ │ │ └── paint_utilities.dart │ │ │ ├── services │ │ │ │ ├── http_client.dart │ │ │ │ ├── system_sound.dart │ │ │ │ ├── system_navigator.dart │ │ │ │ ├── haptic_feedback.dart │ │ │ │ └── clipboard.dart │ │ │ ├── physics │ │ │ │ ├── utils.dart │ │ │ │ ├── tolerance.dart │ │ │ │ └── clamped_simulation.dart │ │ │ ├── material │ │ │ │ ├── animated_icons.dart │ │ │ │ ├── constants.dart │ │ │ │ ├── animated_icons │ │ │ │ │ └── animated_icons_data.dart │ │ │ │ └── grid_tile.dart │ │ │ ├── gestures │ │ │ │ ├── drag.dart │ │ │ │ ├── long_press.dart │ │ │ │ └── debug.dart │ │ │ ├── semantics │ │ │ │ └── semantics_service.dart │ │ │ ├── cupertino │ │ │ │ └── thumb_painter.dart │ │ │ └── scheduler │ │ │ │ └── priority.dart │ │ ├── ui.dart │ │ ├── semantics.dart │ │ ├── physics.dart │ │ ├── scheduler.dart │ │ ├── animation.dart │ │ ├── cupertino.dart │ │ ├── gestures.dart │ │ ├── services.dart │ │ ├── foundation.dart │ │ └── painting.dart │ ├── dart_test.yaml │ ├── CHANGELOG.md │ ├── README.md │ ├── .gitignore │ ├── analysis_options.yaml │ ├── pubspec.yaml │ └── FLUTTER_LICENSE ├── flutter2js │ ├── dart_test.yaml │ ├── lib │ │ ├── io.dart │ │ ├── third_party │ │ │ └── icons │ │ │ │ ├── MaterialIcons-Regular.eot │ │ │ │ ├── MaterialIcons-Regular.ttf │ │ │ │ ├── MaterialIcons-Regular.woff │ │ │ │ ├── MaterialIcons-Regular.woff2 │ │ │ │ └── README.md │ │ ├── flutter_internals.dart │ │ ├── src │ │ │ ├── core │ │ │ │ ├── routing_plugin.dart │ │ │ │ ├── binding.dart │ │ │ │ ├── uri_handler.dart │ │ │ │ ├── io.dart │ │ │ │ └── window.dart │ │ │ └── html │ │ │ │ ├── element_helpers.dart │ │ │ │ ├── ui │ │ │ │ ├── html_image.dart │ │ │ │ ├── html_semantics_update_builder.dart │ │ │ │ └── html_picture.dart │ │ │ │ ├── html_render_objects.dart │ │ │ │ └── html_routing_plugins.dart │ │ ├── core.dart │ │ └── html.dart │ ├── CHANGELOG.md │ ├── test │ │ ├── main_test.dart │ │ └── src │ │ │ └── core │ │ │ └── device_info_test.dart │ ├── analysis_options.yaml │ └── pubspec.yaml ├── flutter_test │ ├── README.md │ ├── BUILD.gn │ ├── lib │ │ ├── src │ │ │ ├── test_vsync.dart │ │ │ ├── stack_manipulation.dart │ │ │ └── all_elements.dart │ │ └── flutter_test.dart │ ├── pubspec.yaml │ ├── test │ │ ├── stack_manipulation_test.dart │ │ └── finders_test.dart │ └── FLUTTER_LICENSE ├── flutter_localizations │ ├── README.md │ ├── lib │ │ ├── src │ │ │ └── l10n │ │ │ │ ├── material_fr_CA.arb │ │ │ │ ├── material_zh_HK.arb │ │ │ │ ├── material_zh_TW.arb │ │ │ │ ├── material_zh.arb │ │ │ │ ├── material_en_AU.arb │ │ │ │ ├── material_en_CA.arb │ │ │ │ ├── material_en_GB.arb │ │ │ │ ├── material_en_IE.arb │ │ │ │ ├── material_en_IN.arb │ │ │ │ ├── material_en_SG.arb │ │ │ │ ├── material_en_ZA.arb │ │ │ │ ├── material_ko.arb │ │ │ │ ├── material_es_419.arb │ │ │ │ ├── material_es_AR.arb │ │ │ │ ├── material_es_BO.arb │ │ │ │ ├── material_es_CL.arb │ │ │ │ ├── material_es_CO.arb │ │ │ │ ├── material_es_CR.arb │ │ │ │ ├── material_es_DO.arb │ │ │ │ ├── material_es_EC.arb │ │ │ │ ├── material_es_GT.arb │ │ │ │ ├── material_es_HN.arb │ │ │ │ ├── material_es_MX.arb │ │ │ │ ├── material_es_NI.arb │ │ │ │ ├── material_es_PA.arb │ │ │ │ ├── material_es_PE.arb │ │ │ │ ├── material_es_PR.arb │ │ │ │ ├── material_es_PY.arb │ │ │ │ ├── material_es_SV.arb │ │ │ │ ├── material_es_UY.arb │ │ │ │ ├── material_es_VE.arb │ │ │ │ ├── material_es_US.arb │ │ │ │ ├── material_ja.arb │ │ │ │ ├── material_pt_PT.arb │ │ │ │ ├── material_gsw.arb │ │ │ │ ├── material_de_CH.arb │ │ │ │ ├── material_th.arb │ │ │ │ ├── material_fa.arb │ │ │ │ ├── material_tr.arb │ │ │ │ ├── material_ps.arb │ │ │ │ ├── material_ur.arb │ │ │ │ ├── material_nl.arb │ │ │ │ ├── material_it.arb │ │ │ │ ├── material_he.arb │ │ │ │ ├── material_ro.arb │ │ │ │ ├── material_de.arb │ │ │ │ ├── material_es.arb │ │ │ │ ├── material_fr.arb │ │ │ │ ├── material_pl.arb │ │ │ │ ├── material_ru.arb │ │ │ │ ├── material_pt.arb │ │ │ │ └── material_ar.arb │ │ └── flutter_localizations.dart │ ├── pubspec.yaml │ └── FLUTTER_LICENSE └── device_info │ ├── pubspec.yaml │ ├── README.md │ ├── CHANGELOG.md │ └── LICENSE ├── tools ├── build_examples.sh ├── test.sh ├── upgrade_flutter.sh └── pub_get.sh ├── .travis.yml ├── LICENSE └── .gitignore /examples/stocks/lib/i18n/.dartignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/flutter/test/main_test.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /packages/flutter2js/dart_test.yaml: -------------------------------------------------------------------------------- 1 | platforms: 2 | - chrome 3 | -------------------------------------------------------------------------------- /examples/hello_world-browser/dart_test.yaml: -------------------------------------------------------------------------------- 1 | platforms: 2 | - chrome -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/raw_keyboard_listener.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/flutter/dart_test.yaml: -------------------------------------------------------------------------------- 1 | platforms: 2 | - vm 3 | - content-shell -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/size_changed_layout_notifier.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/sliver_prototype_extent_list.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/flutter/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 0.0.1 4 | 5 | - Initial version, created by Stagehand 6 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/io.dart: -------------------------------------------------------------------------------- 1 | /// @nodoc 2 | 3 | library flutter2js.io; 4 | 5 | export 'src/core/io.dart'; -------------------------------------------------------------------------------- /packages/flutter2js/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 0.0.1 4 | 5 | - Initial version, created by Stagehand 6 | -------------------------------------------------------------------------------- /examples/stocks-browser/web/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:stocks/main.dart' as app; 2 | 3 | void main() { 4 | app.main(); 5 | } 6 | -------------------------------------------------------------------------------- /packages/flutter/README.md: -------------------------------------------------------------------------------- 1 | Derived from Flutter SDK. The license for Flutter SDK can be found at [FLUTTER_LICENSE](FLUTTER_LICENSE). -------------------------------------------------------------------------------- /packages/flutter_test/README.md: -------------------------------------------------------------------------------- 1 | Derived from Flutter SDK. The license for Flutter SDK can be found at [FLUTTER_LICENSE](FLUTTER_LICENSE). -------------------------------------------------------------------------------- /examples/hello_world-browser/web/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:hello_world/main.dart' as app; 2 | 3 | void main() { 4 | app.main(); 5 | } 6 | -------------------------------------------------------------------------------- /packages/flutter_localizations/README.md: -------------------------------------------------------------------------------- 1 | Derived from Flutter SDK. The license for Flutter SDK can be found at [FLUTTER_LICENSE](FLUTTER_LICENSE). -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_fr_CA.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH 'h' mm" 4 | } 5 | -------------------------------------------------------------------------------- /packages/flutter2js/test/main_test.dart: -------------------------------------------------------------------------------- 1 | import 'src/core/device_info_test.dart' as device_info; 2 | 3 | void main() { 4 | device_info.main(); 5 | } 6 | -------------------------------------------------------------------------------- /examples/stocks/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .idea 4 | .packages 5 | .pub/ 6 | build/ 7 | ios/.generated/ 8 | packages 9 | pubspec.lock 10 | .flutter-plugins 11 | -------------------------------------------------------------------------------- /examples/hello_world/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .idea 4 | .packages 5 | .pub/ 6 | build/ 7 | ios/.generated/ 8 | packages 9 | pubspec.lock 10 | .flutter-plugins 11 | -------------------------------------------------------------------------------- /examples/hello_world/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | # To run the Hello World demo: 3 | flutter run 4 | 5 | # To run the Hello World demo showing Arabic: 6 | flutter run lib/arabic.dart 7 | ``` 8 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jban332/flutter2js/HEAD/packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.eot -------------------------------------------------------------------------------- /packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jban332/flutter2js/HEAD/packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jban332/flutter2js/HEAD/packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.woff -------------------------------------------------------------------------------- /packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jban332/flutter2js/HEAD/packages/flutter2js/lib/third_party/icons/MaterialIcons-Regular.woff2 -------------------------------------------------------------------------------- /packages/flutter/.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub 2 | .packages 3 | .pub/ 4 | build/ 5 | pubspec.lock 6 | 7 | # Directory created by dartdoc 8 | doc/api/ 9 | 10 | # Editors 11 | .idea 12 | .vscode 13 | .atom/ -------------------------------------------------------------------------------- /packages/flutter2js/lib/third_party/icons/README.md: -------------------------------------------------------------------------------- 1 | Files in this directory are from:[https://github.com/google/material-design-icons](https://github.com/google/material-design-icons). 2 | 3 | The license is in the file [LICENSE](LICENSE). -------------------------------------------------------------------------------- /tools/build_examples.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | build () { 4 | echo "Running 'pub run webdev build' in:" 5 | echo "" 6 | echo " $1" 7 | echo "" 8 | (cd $1 && pub run webdev build) 9 | } 10 | 11 | build examples/hello_world-browser 12 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/flutter_internals.dart: -------------------------------------------------------------------------------- 1 | /// @nodoc 2 | 3 | // This library is meant for internal use from Flutter. 4 | library flutter2js.for_modified_flutter; 5 | 6 | export 'io.dart'; 7 | export 'core.dart' show PlatformPlugin, window; 8 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/core/routing_plugin.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | /// Manages route history. 4 | abstract class RoutingPlugin { 5 | String get current; 6 | 7 | Stream get stream; 8 | 9 | void assign(String value); 10 | 11 | void push(String value); 12 | } 13 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: dart 2 | 3 | dart: 4 | - dev 5 | 6 | addons: 7 | chrome: stable 8 | 9 | script: 10 | # Look for misconfigured dependencies 11 | - ./tools/pub_get.sh --no-precompile 12 | 13 | # Run tests 14 | - ./tools/test.sh 15 | 16 | # Build examples 17 | - ./tools/build_examples.sh 18 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/ui/lerp.dart: -------------------------------------------------------------------------------- 1 | part of dart.ui; 2 | 3 | /// Linearly interpolate between two numbers. 4 | double lerpDouble(num a, num b, double t) { 5 | if (a == null && b == null) return null; 6 | if (a == null) a = 0.0; 7 | if (b == null) b = 0.0; 8 | return a + (b - a) * t; 9 | } 10 | -------------------------------------------------------------------------------- /packages/flutter_localizations/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_localizations 2 | 3 | environment: 4 | sdk: ">=2.0.0 <3.0.0" 5 | 6 | dependencies: 7 | flutter: 8 | path: ../flutter 9 | intl: 0.15.7 10 | 11 | dev_dependencies: 12 | flutter_test: 13 | path: ../flutter_test 14 | test: ^1.3.0 15 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/core.dart: -------------------------------------------------------------------------------- 1 | library flutter2js; 2 | 3 | export 'io.dart'; 4 | export 'src/core/binding.dart'; 5 | export 'src/core/device_info.dart'; 6 | export 'src/core/platform_plugin.dart'; 7 | export 'src/core/routing_plugin.dart'; 8 | export 'src/core/uri_handler.dart'; 9 | export 'src/core/window.dart'; 10 | -------------------------------------------------------------------------------- /examples/hello_world/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: hello_world 2 | 3 | environment: 4 | sdk: ">=2.0.0 <3.0.0" 5 | 6 | dependencies: 7 | flutter: 8 | path: ../../packages/flutter 9 | 10 | dev_dependencies: 11 | flutter_test: 12 | path: ../../packages/flutter_test 13 | 14 | flutter: 15 | uses-material-design: true 16 | -------------------------------------------------------------------------------- /tools/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd `dirname $0`/../ 3 | 4 | test () { 5 | echo "Running 'pub run test' in:" 6 | echo "" 7 | echo " $1" 8 | echo "" 9 | (cd $1 && pub get --offline --no-precompile && pub run test) 10 | } 11 | 12 | # Flutter2js 13 | test packages/flutter2js 14 | 15 | # Examples 16 | test examples/hello_world-browser 17 | -------------------------------------------------------------------------------- /examples/hello_world/lib/main.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/widgets.dart'; 6 | 7 | void main() => runApp(const Center(child: const Text('Hello, world!', textDirection: TextDirection.ltr))); 8 | -------------------------------------------------------------------------------- /examples/hello_world/lib/arabic.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/widgets.dart'; 6 | 7 | void main() => runApp(const Center(child: const Text('برنامج أهلا بالعالم', textDirection: TextDirection.rtl))); 8 | -------------------------------------------------------------------------------- /packages/flutter/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # Lint rules and documentation, see http://dart-lang.github.io/linter/lints 2 | linter: 3 | rules: 4 | - cancel_subscriptions 5 | - hash_and_equals 6 | - iterable_contains_unrelated_type 7 | - list_remove_unrelated_type 8 | - test_types_in_equals 9 | - unrelated_type_equality_checks 10 | - valid_regexps 11 | -------------------------------------------------------------------------------- /packages/flutter2js/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # Lint rules and documentation, see http://dart-lang.github.io/linter/lints 2 | linter: 3 | rules: 4 | - cancel_subscriptions 5 | - hash_and_equals 6 | - iterable_contains_unrelated_type 7 | - list_remove_unrelated_type 8 | - test_types_in_equals 9 | - unrelated_type_equality_checks 10 | - valid_regexps 11 | -------------------------------------------------------------------------------- /packages/flutter2js/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter2js 2 | description: Compiles Flutter apps to Javascript apps. 3 | version: 0.2.0 4 | 5 | executables: 6 | flutter2js: flutter2js 7 | 8 | environment: 9 | sdk: ">=2.0.0 <3.0.0" 10 | 11 | dependencies: 12 | args: '^1.2.0' 13 | flutter: 14 | path: ../flutter 15 | meta: ^1.1.6 16 | 17 | dev_dependencies: 18 | test: '^1.3.0' 19 | -------------------------------------------------------------------------------- /examples/stocks-browser/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/html/element_helpers.dart: -------------------------------------------------------------------------------- 1 | import 'dart:html' as html; 2 | 3 | import 'package:flutter/rendering.dart'; 4 | 5 | Rect flutterRectFromHtmlRect(html.Rectangle rect) { 6 | return new Rect.fromLTWH(rect.left, rect.top, rect.width, rect.height); 7 | } 8 | 9 | Size flutterSizeFromHtmlRect(html.Rectangle rect) { 10 | return new Size(rect.width, rect.height); 11 | } 12 | -------------------------------------------------------------------------------- /examples/hello_world-browser/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | -------------------------------------------------------------------------------- /examples/stocks/README.md: -------------------------------------------------------------------------------- 1 | ## Icon 2 | 3 | Icon was created using Android Asset Studio: 4 | https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=image&foreground.space.trim=0&foreground.space.pad=0&foreColor=607d8b%2C0&crop=0&backgroundShape=square&backColor=fff%2C100&effects=none 5 | 6 | From this clipart: 7 | https://openclipart.org/detail/30403/tango-go-up 8 | Which is public domain. 9 | 10 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/core/binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | /// Singleton returned by [WidgetsFlutterBinding.instance]. 4 | final WidgetsFlutterBindingImplementation widgetsFlutterBinding = 5 | new WidgetsFlutterBindingImplementation(); 6 | 7 | class WidgetsFlutterBindingImplementation extends WidgetsFlutterBinding { 8 | WidgetsFlutterBindingImplementation() : super.constructor(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/flutter_localizations.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Localizations for the Flutter library 6 | library flutter_localizations; 7 | 8 | export 'src/material_localizations.dart' show GlobalMaterialLocalizations; 9 | export 'src/widgets_localizations.dart' show GlobalWidgetsLocalizations; 10 | -------------------------------------------------------------------------------- /examples/stocks/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stocks 2 | 3 | environment: 4 | sdk: ">=2.0.0 <3.0.0" 5 | 6 | dependencies: 7 | flutter: 8 | path: ../../packages/flutter 9 | flutter_localizations: 10 | path: ../../packages/flutter_localizations 11 | intl: ^0.15.7 12 | intl_translation: ^0.17.1 13 | http: ^0.12.0 14 | isolate: ^2.0.2 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | path: ../../packages/flutter_test 19 | 20 | flutter: 21 | uses-material-design: true 22 | -------------------------------------------------------------------------------- /packages/device_info/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: device_info 2 | description: Flutter plugin providing detailed information about the device 3 | (make, model, etc.), and Android or iOS version the app is running on. 4 | author: Flutter Team 5 | homepage: https://github.com/flutter/plugins/tree/master/packages/device_info 6 | version: 0.2.1 7 | 8 | dependencies: 9 | flutter: 10 | path: ../flutter 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.28.0 <3.0.0" 14 | -------------------------------------------------------------------------------- /packages/flutter_test/BUILD.gn: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import("//build/dart/dart_library.gni") 6 | 7 | dart_library("flutter_test") { 8 | package_name = "flutter_test" 9 | 10 | disable_analysis = true 11 | 12 | deps = [ 13 | "../flutter", 14 | "//third_party/dart-pkg/pub/quiver", 15 | "//third_party/dart-pkg/pub/test", 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /examples/stocks-browser/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stocks_browser 2 | 3 | environment: 4 | sdk: ">=2.0.0 <3.0.0" 5 | 6 | dependencies: 7 | stocks: 8 | path: ../stocks 9 | flutter2js: 10 | path: ../../packages/flutter2js 11 | flutter: 12 | path: ../../packages/flutter 13 | flutter_localizations: 14 | path: ../../packages/flutter_localizations 15 | flutter_test: 16 | path: ../../packages/flutter_test 17 | 18 | dev_dependencies: 19 | build_runner: ^0.10.0 20 | build_web_compilers: ^0.4.0 21 | webdev: ^1.0.0 22 | -------------------------------------------------------------------------------- /examples/stocks/lib/i18n/stocks_en.arb: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Stocks", 3 | "@title": { 4 | "description": "Title for the Stocks application", 5 | "type": "text", 6 | "placeholders": {} 7 | }, 8 | 9 | "market": "MARKET", 10 | "@market": { 11 | "description": "Label for the Market tab", 12 | "type": "text", 13 | "placeholders": {} 14 | }, 15 | 16 | "portfolio": "PORTFOLIO", 17 | "@portfolio": { 18 | "description": "Label for the Portfolio tab", 19 | "type": "text", 20 | "placeholders": {} 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/stocks/lib/i18n/stocks_es.arb: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Acciones", 3 | "@title": { 4 | "description": "Title for the Stocks application", 5 | "type": "text", 6 | "placeholders": {} 7 | }, 8 | 9 | "market": "MERCADO", 10 | "@market": { 11 | "description": "Label for the Market tab", 12 | "type": "text", 13 | "placeholders": {} 14 | }, 15 | 16 | "portfolio": "CARTERA", 17 | "@portfolio": { 18 | "description": "Label for the Portfolio tab", 19 | "type": "text", 20 | "placeholders": {} 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/hello_world-browser/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: hello_world_browser 2 | 3 | environment: 4 | sdk: ">=2.0.0 <3.0.0" 5 | 6 | dependencies: 7 | hello_world: 8 | path: ../hello_world 9 | flutter2js: any 10 | 11 | dev_dependencies: 12 | build_runner: ^0.10.0 13 | build_web_compilers: ^0.4.0 14 | flutter_test: any 15 | test: ^1.3.0 16 | webdev: ^1.0.0 17 | 18 | dependency_overrides: 19 | flutter2js: 20 | path: ../../packages/flutter2js 21 | flutter: 22 | path: ../../packages/flutter 23 | flutter_test: 24 | path: ../../packages/flutter_test -------------------------------------------------------------------------------- /packages/flutter/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter 2 | author: Flutter Authors 3 | description: A framework for writing Flutter applications 4 | homepage: http://flutter.io 5 | 6 | environment: 7 | sdk: ">=2.0.0 <3.0.0" 8 | 9 | dependencies: 10 | # To update these, use "flutter update-packages --force-upgrade". 11 | collection: ^1.14.11 12 | flutter2js: 13 | path: ../flutter2js 14 | meta: ^1.1.6 15 | typed_data: ^1.1.6 16 | vector_math: ^2.0.8 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | path: ../flutter_test 21 | mockito: ^3.0.0 -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/core/uri_handler.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/widgets.dart'; 4 | 5 | /// Opens URIs in the user's device. 6 | /// 7 | /// In web browser, URIs are typically opened by changing the current URL of 8 | /// the browser. 9 | /// 10 | /// Subclasses may expose more information about the handler. 11 | abstract class UriHandler { 12 | /// Important: App may stop at any point after invoking the method 13 | /// so you should not assume that the future ever completes. 14 | Future handleUri(Uri uri, {BuildContext buildContext}); 15 | } 16 | -------------------------------------------------------------------------------- /tools/upgrade_flutter.sh: -------------------------------------------------------------------------------- 1 | cd `dirname $0`/../ 2 | SRC_FLUTTER=../flutter/packages/flutter 3 | DEST_FLUTTER=packages/flutter 4 | 5 | # TODO: A script that copies everything except certain files 6 | 7 | echo "Removing old files" 8 | rm packages/flutter/lib/src/physics/* 9 | 10 | echo "Copying new files from '../flutter'" 11 | cp $SRC_FLUTTER/lib/physics.dart $DEST_FLUTTER/lib/ 12 | 13 | cp $SRC_FLUTTER/lib/src/physics/* $DEST_FLUTTER/lib/src/physics/ 14 | 15 | echo "Replacing occurences of 'dart:ui'" 16 | find ./ -iname "*.dart" -exec sed 's/dart:ui/package:flutter\/ui\.dart/g' {} + 17 | 18 | 19 | -------------------------------------------------------------------------------- /tools/pub_get.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd `dirname $0`/.. 4 | ARGS="$@" 5 | SPACE_ARGS="" 6 | if [ -n "$ARGS" ]; then 7 | SPACE_ARGS=" $ARGS" 8 | fi 9 | 10 | get () { 11 | echo "Running 'pub get$SPACE_ARGS' in:" 12 | echo "" 13 | echo " $1" 14 | echo "" 15 | (cd $1 && pub get $ARGS) 16 | } 17 | 18 | get packages/flutter2js 19 | get packages/flutter 20 | get packages/flutter_test 21 | get packages/flutter_localizations 22 | 23 | # "Hello world" 24 | get examples/hello_world 25 | get examples/hello_world-browser 26 | 27 | # "Stocks" 28 | get examples/stocks 29 | get examples/stocks-browser 30 | 31 | -------------------------------------------------------------------------------- /packages/flutter/lib/ui.dart: -------------------------------------------------------------------------------- 1 | library dart.ui; 2 | 3 | import 'dart:async'; 4 | import 'dart:math' as math; 5 | import 'dart:typed_data'; 6 | 7 | import 'package:flutter2js/flutter_internals.dart' as flutter2js; 8 | 9 | part 'src/ui/flutter2js_modifications.dart'; 10 | 11 | part 'src/ui/compositing.dart'; 12 | 13 | part 'src/ui/geometry.dart'; 14 | 15 | part 'src/ui/hash_codes.dart'; 16 | 17 | part 'src/ui/lerp.dart'; 18 | 19 | part 'src/ui/painting.dart'; 20 | 21 | part 'src/ui/pointer.dart'; 22 | 23 | part 'src/ui/semantics.dart'; 24 | 25 | part 'src/ui/text.dart'; 26 | 27 | part 'src/ui/window.dart'; 28 | -------------------------------------------------------------------------------- /examples/hello_world/test/hello_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | import '../lib/main.dart' as hello_world; 8 | 9 | void main() { 10 | testWidgets('Hello world smoke test', (WidgetTester tester) async { 11 | hello_world.main(); // builds the app and schedules a frame but doesn't trigger one 12 | await tester.pump(); // triggers a frame 13 | 14 | expect(find.text('Hello, world!'), findsOneWidget); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /examples/hello_world-browser/test/main_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | import '../web/main.dart' as hello_world; 8 | 9 | void main() { 10 | testWidgets('Hello world smoke test', (WidgetTester tester) async { 11 | hello_world.main(); // builds the app and schedules a frame but doesn't trigger one 12 | await tester.pump(); // triggers a frame 13 | 14 | expect(find.text('Hello, world!'), findsOneWidget); 15 | }); 16 | } -------------------------------------------------------------------------------- /packages/flutter_test/lib/src/test_vsync.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/scheduler.dart'; 6 | 7 | /// A [TickerProvider] that creates a standalone ticker. 8 | /// 9 | /// Useful in tests that create an [AnimationController] outside of the widget 10 | /// tree. 11 | class TestVSync implements TickerProvider { 12 | /// Creates a ticker provider that creates standalone tickers. 13 | const TestVSync(); 14 | 15 | @override 16 | Ticker createTicker(TickerCallback onTick) => new Ticker(onTick); 17 | } 18 | -------------------------------------------------------------------------------- /packages/flutter/lib/semantics.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// The Flutter semantics package. 6 | /// 7 | /// To use, import `package:flutter/semantics.dart`. 8 | /// 9 | /// The [SemanticsEvent] classes define the protocol for sending semantic events 10 | /// to the platform. 11 | /// 12 | /// The [SemanticsNode] hierarchy represents the semantic structure of the UI 13 | /// and is used to by the platform-specific accessibility services. 14 | library semantics; 15 | 16 | export 'src/semantics/semantics.dart'; 17 | export 'src/semantics/semantics_service.dart'; 18 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/foundation/profile.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/ui.dart'; 6 | 7 | /// Whether we've been built in release mode. 8 | const bool _kReleaseMode = const bool.fromEnvironment("dart.vm.product"); 9 | 10 | /// When running in profile mode (or debug mode), invoke the given function. 11 | /// 12 | /// In release mode, the function is not invoked. 13 | // TODO(devoncarew): Going forward, we'll want the call to profile() to be tree-shaken out. 14 | void profile(VoidCallback function) { 15 | if (_kReleaseMode) return; 16 | function(); 17 | } 18 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/html.dart: -------------------------------------------------------------------------------- 1 | library flutter2js.html; 2 | 3 | export 'core.dart'; 4 | export 'src/html/css_helpers.dart'; 5 | export 'src/html/element_helpers.dart'; 6 | export 'src/html/html_platform_plugin.dart'; 7 | export 'src/html/html_render_objects.dart'; 8 | export 'src/html/html_routing_plugins.dart'; 9 | export 'src/html/html_widgets.dart'; 10 | export 'src/html/ui/html_canvas.dart'; 11 | export 'src/html/ui/html_image.dart'; 12 | export 'src/html/ui/html_paragraph_builder.dart'; 13 | export 'src/html/ui/html_path.dart'; 14 | export 'src/html/ui/html_picture.dart'; 15 | export 'src/html/ui/html_picture_recording_canvas.dart'; 16 | export 'src/html/ui/html_scene_builder.dart'; 17 | export 'src/html/ui/html_semantics_update_builder.dart'; -------------------------------------------------------------------------------- /packages/flutter/lib/physics.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Simple one-dimensional physics simulations, such as springs, friction, and 6 | /// gravity, for use in user interface animations. 7 | /// 8 | /// To use, import `package:flutter/physics.dart`. 9 | library physics; 10 | 11 | export 'src/physics/clamped_simulation.dart'; 12 | export 'src/physics/friction_simulation.dart'; 13 | export 'src/physics/gravity_simulation.dart'; 14 | export 'src/physics/simulation.dart'; 15 | export 'src/physics/spring_simulation.dart'; 16 | export 'src/physics/tolerance.dart'; 17 | export 'src/physics/utils.dart'; 18 | -------------------------------------------------------------------------------- /packages/flutter_test/lib/flutter_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Testing library for flutter, built on top of `package:test`. 6 | library flutter_test; 7 | 8 | export 'dart:async' show Future; 9 | 10 | export 'src/all_elements.dart'; 11 | export 'src/binding.dart'; 12 | export 'src/controller.dart'; 13 | export 'src/finders.dart'; 14 | export 'src/matchers.dart'; 15 | export 'src/stack_manipulation.dart'; 16 | export 'src/test_async_utils.dart'; 17 | export 'src/test_pointer.dart'; 18 | export 'src/test_text_input.dart'; 19 | export 'src/test_vsync.dart'; 20 | export 'src/widget_tester.dart'; 21 | -------------------------------------------------------------------------------- /packages/flutter/lib/scheduler.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// The Flutter Scheduler library. 6 | /// 7 | /// To use, import `package:flutter/ticker.dart`. 8 | /// 9 | /// This library is responsible for scheduler frame callbacks, and tasks at 10 | /// given priorities. 11 | /// 12 | /// The library makes sure that tasks are only run when appropriate. 13 | /// For example, an idle-task is only executed when no animation is running. 14 | library scheduler; 15 | 16 | export 'src/scheduler/binding.dart'; 17 | export 'src/scheduler/debug.dart'; 18 | export 'src/scheduler/priority.dart'; 19 | export 'src/scheduler/ticker.dart'; 20 | -------------------------------------------------------------------------------- /packages/flutter/lib/animation.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// The Flutter animation system. 6 | /// 7 | /// To use, import `package:flutter/animation.dart`. 8 | /// 9 | /// See [flutter.io/animations](https://flutter.io/animations/) for an overview. 10 | /// 11 | /// This library depends only on core Dart libraries and the `physics.dart` library. 12 | library animation; 13 | 14 | export 'src/animation/animation.dart'; 15 | export 'src/animation/animation_controller.dart'; 16 | export 'src/animation/animations.dart'; 17 | export 'src/animation/curves.dart'; 18 | export 'src/animation/listener_helpers.dart'; 19 | export 'src/animation/tween.dart'; 20 | -------------------------------------------------------------------------------- /examples/stocks/lib/i18n/stock_messages_en.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart 2 | // This is a library that provides messages for a en locale. All the 3 | // messages from the main program should be duplicated here with the same 4 | // function name. 5 | 6 | import 'package:intl/message_lookup_by_library.dart'; 7 | 8 | final messages = new MessageLookup(); 9 | 10 | class MessageLookup extends MessageLookupByLibrary { 11 | get localeName => 'en'; 12 | 13 | final messages = _notInlinedMessages(_notInlinedMessages); 14 | static _notInlinedMessages(_) => { 15 | "market" : MessageLookupByLibrary.simpleMessage("MARKET"), 16 | "portfolio" : MessageLookupByLibrary.simpleMessage("PORTFOLIO"), 17 | "title" : MessageLookupByLibrary.simpleMessage("Stocks") 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /examples/stocks/lib/i18n/stock_messages_es.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart 2 | // This is a library that provides messages for a es locale. All the 3 | // messages from the main program should be duplicated here with the same 4 | // function name. 5 | 6 | import 'package:intl/message_lookup_by_library.dart'; 7 | 8 | final messages = new MessageLookup(); 9 | 10 | class MessageLookup extends MessageLookupByLibrary { 11 | get localeName => 'es'; 12 | 13 | final messages = _notInlinedMessages(_notInlinedMessages); 14 | static _notInlinedMessages(_) => { 15 | "market" : MessageLookupByLibrary.simpleMessage("MERCADO"), 16 | "portfolio" : MessageLookupByLibrary.simpleMessage("CARTERA"), 17 | "title" : MessageLookupByLibrary.simpleMessage("Acciones") 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/painting/image_decoder.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | import 'dart:typed_data'; 7 | import 'package:flutter/ui.dart' as ui show Image, decodeImageFromList; 8 | 9 | /// Creates an image from a list of bytes. 10 | /// 11 | /// This function attempts to interpret the given bytes an image. If successful, 12 | /// the returned [Future] resolves to the decoded image. Otherwise, the [Future] 13 | /// resolves to null. 14 | Future decodeImageFromList(Uint8List list) { 15 | final Completer completer = new Completer(); 16 | ui.decodeImageFromList(list, completer.complete); 17 | return completer.future; 18 | } 19 | -------------------------------------------------------------------------------- /packages/flutter_test/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_test 2 | 3 | environment: 4 | sdk: ">=2.0.0 <3.0.0" 5 | 6 | dependencies: 7 | flutter: 8 | path: ../flutter 9 | 10 | # We depend on very specific internal implementation details of the 11 | # 'test' package, which change between versions, so when upgrading 12 | # this, make sure the tests are still running correctly. 13 | test: 1.3.0 14 | 15 | # Used by golden file comparator 16 | path: ^1.6.2 17 | 18 | # We use FakeAsync and other testing utilities. 19 | quiver: ^2.0.0+1 20 | 21 | # We import stack_trace because the test packages uses it and we 22 | # need to be able to unmangle the stack traces that it passed to 23 | # stack_trace. See https://github.com/dart-lang/test/issues/590 24 | stack_trace: ^1.9.3 25 | 26 | # Used by globalToLocal et al. 27 | vector_math: ^2.0.8 -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/semantics_debugger.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'framework.dart'; 6 | 7 | /// A widget that visualizes the semantics for the child. 8 | /// 9 | /// This widget is useful for understand how an app presents itself to 10 | /// accessibility technology. 11 | class SemanticsDebugger extends StatelessWidget { 12 | /// Creates a widget that visualizes the semantics for the child. 13 | /// 14 | /// The [child] argument must not be null. 15 | const SemanticsDebugger({Key key, this.child}) : super(key: key); 16 | 17 | /// The widget below this widget in the tree. 18 | final Widget child; 19 | 20 | @override 21 | Widget build(BuildContext context) => child; 22 | } 23 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/core/io.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:typed_data'; 3 | import 'dart:convert'; 4 | 5 | abstract class File { 6 | String get path; 7 | Uri get uri; 8 | Future readAsBytes(); 9 | Future readAsString() async => const Utf8Decoder().convert(await readAsBytes()); 10 | } 11 | 12 | class Platform { 13 | static String get localeName => "en-US"; 14 | static String get operatingSystem => "android"; 15 | static String get pathSeparator => "/"; 16 | static String get resolvedExecutable => "/main.dart"; 17 | static bool get isAndroid => true; 18 | static bool get isFuchsia => false; 19 | static bool get isIOS => false; 20 | static bool get isLinux => false; 21 | static bool get isMacOS => false; 22 | static bool get isWindows => false; 23 | } 24 | 25 | void exit(int status) { 26 | print("Exiting the app."); 27 | } -------------------------------------------------------------------------------- /packages/flutter/lib/src/services/http_client.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'package:http/browser_client.dart' as http; 8 | 9 | /// Create a new [http.Client] object. 10 | /// 11 | /// This can be set to a new function to override the default logic for creating 12 | /// HTTP clients, for example so that all logic in the framework that triggers 13 | /// HTTP requests will use the same `UserAgent` header, or so that tests can 14 | /// provide an [http.testing.MockClient]. 15 | // TODO(ianh): Fix the link to MockClient once dartdoc has a solution. 16 | ValueGetter createHttpClient = () { 17 | return new http.BrowserClient(); 18 | }; 19 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/services/system_sound.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:flutter2js/flutter_internals.dart' as flutter2js; 8 | 9 | /// A sound provided by the system. 10 | enum SystemSoundType { 11 | /// A short indication that a button was pressed. 12 | click, 13 | } 14 | 15 | /// Provides access to the library of short system specific sounds for common 16 | /// tasks. 17 | class SystemSound { 18 | SystemSound._(); 19 | 20 | /// Play the specified system sound. If that sound is not present on the 21 | /// system, the call is ignored. 22 | static Future play(SystemSoundType type) async { 23 | return flutter2js.PlatformPlugin.current.playSystemSound(type); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/html/ui/html_image.dart: -------------------------------------------------------------------------------- 1 | import 'dart:html' as html; 2 | 3 | import 'package:flutter/ui.dart'; 4 | 5 | import '../logging.dart'; 6 | 7 | /// Implements [Image] ('dart:ui') that may be used by [CustomPaint] widget ('package:flutter/widgets.dart'). 8 | /// For examples, "Stocks" examples app uses the widget. 9 | class HtmlEngineImage extends Object with HasDebugName implements Image { 10 | @override 11 | final String debugName; 12 | final String uri; 13 | 14 | @override 15 | final int width; 16 | 17 | @override 18 | final int height; 19 | 20 | HtmlEngineImage(this.uri, {this.width: 300, this.height: 150}) : this.debugName = allocateDebugName( "Image") { 21 | logConstructor(this, arg0:uri, arg1:width, arg2:height); 22 | assert(uri != null); 23 | } 24 | 25 | @override 26 | void dispose() { 27 | html.Url.revokeObjectUrl(uri); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/physics/utils.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Whether two doubles are within a given distance of each other. 6 | /// 7 | /// The `epsilon` argument must be positive and not null. 8 | /// The `a` and `b` arguments may be null. A null value is only considered 9 | /// near-equal to another null value. 10 | bool nearEqual(double a, double b, double epsilon) { 11 | assert(epsilon != null); 12 | assert(epsilon >= 0.0); 13 | if (a == null || b == null) 14 | return a == b; 15 | return (a > (b - epsilon)) && (a < (b + epsilon)) || a == b; 16 | } 17 | 18 | /// Whether a double is within a given distance of zero. 19 | /// 20 | /// The epsilon argument must be positive. 21 | bool nearZero(double a, double epsilon) => nearEqual(a, 0.0, epsilon); 22 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/services/system_navigator.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | import 'system_channels.dart'; 8 | 9 | /// Controls specific aspects of the system navigation stack. 10 | class SystemNavigator { 11 | SystemNavigator._(); 12 | 13 | /// Instructs the system navigator to remove this activity from the stack and 14 | /// return to the previous activity. 15 | /// 16 | /// On iOS, calls to this method are ignored because Apple's human interface 17 | /// guidelines state that applications should not exit themselves. 18 | /// 19 | /// This method should be preferred over calling `dart:io`'s [exit] method, as 20 | /// the latter may cause the underlying platform to act as if the application 21 | /// had crashed. 22 | static Future pop() async { 23 | await SystemChannels.platform.invokeMethod('SystemNavigator.pop'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/material/animated_icons.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Flutter widgets implementing Material Design animated icons. 6 | library material_animated_icons; 7 | 8 | import 'dart:math' as math show pi; 9 | import 'package:flutter/ui.dart' as ui show Paint, Path, Canvas; 10 | import 'package:flutter/ui.dart' show lerpDouble; 11 | 12 | import 'package:flutter/foundation.dart'; 13 | import 'package:flutter/widgets.dart'; 14 | 15 | // This package is split into multiple parts to enable a private API that is 16 | // testable. 17 | 18 | // Public API. 19 | part 'animated_icons/animated_icons.dart'; 20 | 21 | // Provides a public interface for referring to the private icon 22 | // implementations. 23 | part 'animated_icons/animated_icons_data.dart'; 24 | 25 | // Animated icons data files. 26 | part 'animated_icons/data/arrow_menu.g.dart'; 27 | 28 | part 'animated_icons/data/menu_arrow.g.dart'; 29 | -------------------------------------------------------------------------------- /packages/flutter/lib/cupertino.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Flutter widgets implementing the current iOS design language. 6 | /// 7 | /// To use, import `package:flutter/cupertino.dart`. 8 | library cupertino; 9 | 10 | export 'src/cupertino/activity_indicator.dart'; 11 | export 'src/cupertino/bottom_tab_bar.dart'; 12 | export 'src/cupertino/button.dart'; 13 | export 'src/cupertino/colors.dart'; 14 | export 'src/cupertino/dialog.dart'; 15 | export 'src/cupertino/icons.dart'; 16 | export 'src/cupertino/nav_bar.dart'; 17 | export 'src/cupertino/page_scaffold.dart'; 18 | export 'src/cupertino/route.dart'; 19 | export 'src/cupertino/scrollbar.dart'; 20 | export 'src/cupertino/slider.dart'; 21 | export 'src/cupertino/switch.dart'; 22 | export 'src/cupertino/tab_scaffold.dart'; 23 | export 'src/cupertino/tab_view.dart'; 24 | export 'src/cupertino/text_selection.dart'; 25 | export 'src/cupertino/thumb_painter.dart'; 26 | export 'widgets.dart'; 27 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/html/ui/html_semantics_update_builder.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | 3 | import 'package:flutter/ui.dart'; 4 | 5 | import '../logging.dart'; 6 | 7 | class HtmlSemanticsUpdate extends SemanticsUpdate { 8 | @override 9 | void dispose() {} 10 | } 11 | 12 | class HtmlSemanticsUpdateBuilder extends Object with HasDebugName implements SemanticsUpdateBuilder { 13 | final String debugName; 14 | 15 | HtmlSemanticsUpdateBuilder() : this.debugName = allocateDebugName( "SemanticsUpdateBuilder") { 16 | logConstructor(this); 17 | } 18 | 19 | @override 20 | SemanticsUpdate build() { 21 | logMethod(this, "build"); 22 | return new HtmlSemanticsUpdate(); 23 | } 24 | 25 | @override 26 | void updateNode( 27 | {int id, 28 | int flags, 29 | int actions, 30 | Rect rect, 31 | String label, 32 | String hint, 33 | String value, 34 | String increasedValue, 35 | String decreasedValue, 36 | TextDirection textDirection, 37 | Float64List transform, 38 | Int32List children}) {} 39 | } 40 | -------------------------------------------------------------------------------- /packages/device_info/README.md: -------------------------------------------------------------------------------- 1 | # device_info 2 | 3 | Get current device information from within the Flutter application. 4 | 5 | # Usage 6 | 7 | Import `package:device_info/device_info.dart`, instantiate `DeviceInfoPlugin` 8 | and use the Android and iOS getters to get platform-specific device 9 | information. 10 | 11 | Example: 12 | 13 | ```dart 14 | import 'package:device_info/device_info.dart'; 15 | 16 | DeviceInfoPlugin deviceInfo = new DeviceInfoPlugin(); 17 | AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; 18 | print('Running on ${androidInfo.model}'); // e.g. "Moto G (4)" 19 | 20 | IosDeviceInfo iosInfo = await deviceInfo.iosInfo; 21 | print('Running on ${iosInfo.utsname.machine}'); // e.g. "iPod7,1" 22 | ``` 23 | 24 | You will find links to the API docs on the [pub page](https://pub.dartlang.org/packages/device_info). 25 | 26 | ## Getting Started 27 | 28 | For help getting started with Flutter, view our online 29 | [documentation](http://flutter.io/). 30 | 31 | For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code). 32 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/services/haptic_feedback.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:flutter2js/flutter_internals.dart' as flutter2js; 8 | 9 | /// Allows access to the haptic feedback interface on the device. 10 | /// 11 | /// This API is intentionally terse since it calls default platform behavior. It 12 | /// is not suitable for precise control of the system's haptic feedback module. 13 | class HapticFeedback { 14 | HapticFeedback._(); 15 | 16 | /// Provides haptic feedback to the user for a short duration. 17 | /// 18 | /// On iOS devices that support haptic feedback, this uses the default system 19 | /// vibration value (`kSystemSoundID_Vibrate`). 20 | /// 21 | /// On Android, this uses the platform haptic feedback API to simulate a 22 | /// short tap on a virtual keyboard. 23 | static Future vibrate() async { 24 | await flutter2js.PlatformPlugin.current.vibrate(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/flutter_test/test/stack_manipulation_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | void main() { 8 | test('stack manipulation: reportExpectCall', () { 9 | try { 10 | expect(false, isTrue); 11 | throw 'unexpectedly did not throw'; 12 | } catch (e, stack) { 13 | final StringBuffer information = new StringBuffer(); 14 | expect(reportExpectCall(stack, information), 4); 15 | final List lines = information.toString().split('\n'); 16 | expect(lines[0], 'This was caught by the test expectation on the following line:'); 17 | expect(lines[1], matches(r'^ .*stack_manipulation_test.dart line [0-9]+$')); 18 | } 19 | 20 | try { 21 | throw null; 22 | } catch (e, stack) { 23 | final StringBuffer information = new StringBuffer(); 24 | expect(reportExpectCall(stack, information), 0); 25 | expect(information.toString(), ''); 26 | } 27 | }); 28 | } 29 | -------------------------------------------------------------------------------- /packages/flutter/lib/gestures.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// The Flutter gesture recognizers. 6 | /// 7 | /// To use, import `package:flutter/gestures.dart`. 8 | library gestures; 9 | 10 | export 'src/gestures/arena.dart'; 11 | export 'src/gestures/binding.dart'; 12 | export 'src/gestures/constants.dart'; 13 | export 'src/gestures/converter.dart'; 14 | export 'src/gestures/debug.dart'; 15 | export 'src/gestures/drag.dart'; 16 | export 'src/gestures/drag_details.dart'; 17 | export 'src/gestures/events.dart'; 18 | export 'src/gestures/hit_test.dart'; 19 | export 'src/gestures/long_press.dart'; 20 | export 'src/gestures/lsq_solver.dart'; 21 | export 'src/gestures/monodrag.dart'; 22 | export 'src/gestures/multidrag.dart'; 23 | export 'src/gestures/multitap.dart'; 24 | export 'src/gestures/pointer_router.dart'; 25 | export 'src/gestures/recognizer.dart'; 26 | export 'src/gestures/scale.dart'; 27 | export 'src/gestures/tap.dart'; 28 | export 'src/gestures/team.dart'; 29 | export 'src/gestures/velocity_tracker.dart'; 30 | -------------------------------------------------------------------------------- /examples/stocks/lib/stock_list.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | import 'stock_data.dart'; 8 | import 'stock_row.dart'; 9 | 10 | class StockList extends StatelessWidget { 11 | const StockList({ Key key, this.stocks, this.onOpen, this.onShow, this.onAction }) : super(key: key); 12 | 13 | final List stocks; 14 | final StockRowActionCallback onOpen; 15 | final StockRowActionCallback onShow; 16 | final StockRowActionCallback onAction; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return new ListView.builder( 21 | key: const ValueKey('stock-list'), 22 | itemExtent: StockRow.kHeight, 23 | itemCount: stocks.length, 24 | itemBuilder: (BuildContext context, int index) { 25 | return new StockRow( 26 | stock: stocks[index], 27 | onPressed: onOpen, 28 | onDoubleTap: onShow, 29 | onLongPressed: onAction 30 | ); 31 | }, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/device_info/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.2.1 2 | 3 | * Updated Gradle tooling to match Android Studio 3.1.2. 4 | 5 | ## 0.2.0 6 | 7 | * **Breaking change**. Set SDK constraints to match the Flutter beta release. 8 | 9 | ## 0.1.2 10 | 11 | * Fixed Dart 2 type errors. 12 | 13 | ## 0.1.1 14 | 15 | * Simplified and upgraded Android project template to Android SDK 27. 16 | * Updated package description. 17 | 18 | ## 0.1.0 19 | 20 | * **Breaking change**. Upgraded to Gradle 4.1 and Android Studio Gradle plugin 21 | 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in 22 | order to use this version of the plugin. Instructions can be found 23 | [here](https://github.com/flutter/flutter/wiki/Updating-Flutter-projects-to-Gradle-4.1-and-Android-Studio-Gradle-plugin-3.0.1). 24 | 25 | ## 0.0.5 26 | 27 | * Added FLT prefix to iOS types 28 | 29 | ## 0.0.4 30 | 31 | * Fixed Java/Dart communication error with empty lists 32 | 33 | ## 0.0.3 34 | 35 | * Added support for utsname 36 | 37 | ## 0.0.2 38 | 39 | * Fixed broken type comparison 40 | * Added "isPhysicalDevice" field, detecting emulators/simulators 41 | 42 | ## 0.0.1 43 | 44 | * Implements platform-specific device/OS properties 45 | -------------------------------------------------------------------------------- /packages/flutter/lib/services.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Platform services exposed to Flutter apps. 6 | /// 7 | /// To use, import `package:flutter/services.dart`. 8 | /// 9 | /// This library depends only on core Dart libraries and the `foundation` 10 | /// library. 11 | library services; 12 | 13 | export 'src/services/asset_bundle.dart'; 14 | export 'src/services/binding.dart'; 15 | export 'src/services/clipboard.dart'; 16 | export 'src/services/haptic_feedback.dart'; 17 | export 'src/services/http_client.dart'; 18 | export 'src/services/message_codec.dart'; 19 | export 'src/services/message_codecs.dart'; 20 | export 'src/services/platform_channel.dart'; 21 | export 'src/services/platform_messages.dart'; 22 | export 'src/services/raw_keyboard.dart'; 23 | export 'src/services/system_channels.dart'; 24 | export 'src/services/system_chrome.dart'; 25 | export 'src/services/system_navigator.dart'; 26 | export 'src/services/system_sound.dart'; 27 | export 'src/services/text_editing.dart'; 28 | export 'src/services/text_formatter.dart'; 29 | export 'src/services/text_input.dart'; 30 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/gestures/drag.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'drag_details.dart'; 6 | 7 | /// Interface for objects that receive updates about drags. 8 | /// 9 | /// This interface is used in various ways. For example, 10 | /// [MultiDragGestureRecognizer] uses it to update its clients when it 11 | /// recognizes a gesture. Similarly, the scrolling infrastructure in the widgets 12 | /// library uses it to notify the [DragScrollActivity] when the user drags the 13 | /// scrollable. 14 | abstract class Drag { 15 | /// The pointer has moved. 16 | void update(DragUpdateDetails details) {} 17 | 18 | /// The pointer is no longer in contact with the screen. 19 | /// 20 | /// The velocity at which the pointer was moving when it stopped contacting 21 | /// the screen is available in the `details`. 22 | void end(DragEndDetails details) {} 23 | 24 | /// The input from the pointer is no longer directed towards this receiver. 25 | /// 26 | /// For example, the user might have been interrupted by a system-modal dialog 27 | /// in the middle of the drag. 28 | void cancel() {} 29 | } 30 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_zh_HK.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "dense", 3 | "timeOfDayFormat": "ah:mm", 4 | "openAppDrawerTooltip": "開啟導覽選單", 5 | "backButtonTooltip": "返回", 6 | "closeButtonTooltip": "關閉", 7 | "deleteButtonTooltip": "刪除", 8 | "nextMonthTooltip": "下個月", 9 | "previousMonthTooltip": "上個月", 10 | "nextPageTooltip": "下一頁", 11 | "previousPageTooltip": "上一頁", 12 | "showMenuTooltip": "顯示選單", 13 | "aboutListTileTitle": "關於「$applicationName」", 14 | "licensesPageTitle": "授權", 15 | "pageRowsInfoTitle": "第 $firstRow - $lastRow 列 (總共 $rowCount 列)", 16 | "pageRowsInfoTitleApproximate": "第 $firstRow - $lastRow 列 (總共約 $rowCount 列)", 17 | "rowsPerPageTitle": "每頁列數:", 18 | "selectedRowCountTitleOne": "已選取 1 個項目", 19 | "selectedRowCountTitleOther": "已選取 $selectedRowCount 個項目", 20 | "cancelButtonLabel": "取消", 21 | "closeButtonLabel": "關閉", 22 | "continueButtonLabel": "繼續", 23 | "copyButtonLabel": "複製", 24 | "cutButtonLabel": "剪下", 25 | "okButtonLabel": "確定", 26 | "pasteButtonLabel": "貼上", 27 | "selectAllButtonLabel": "全選", 28 | "viewLicensesButtonLabel": "查看授權", 29 | "anteMeridiemAbbreviation": "上午", 30 | "postMeridiemAbbreviation": "下午", 31 | "timePickerHourModeAnnouncement": "選取小時數", 32 | "timePickerMinuteModeAnnouncement": "選取分鐘數" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_zh_TW.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "dense", 3 | "timeOfDayFormat": "ah:mm", 4 | "openAppDrawerTooltip": "開啟導覽選單", 5 | "backButtonTooltip": "返回", 6 | "closeButtonTooltip": "關閉", 7 | "deleteButtonTooltip": "刪除", 8 | "nextMonthTooltip": "下個月", 9 | "previousMonthTooltip": "上個月", 10 | "nextPageTooltip": "下一頁", 11 | "previousPageTooltip": "上一頁", 12 | "showMenuTooltip": "顯示選單", 13 | "aboutListTileTitle": "關於「$applicationName」", 14 | "licensesPageTitle": "授權", 15 | "pageRowsInfoTitle": "第 $firstRow - $lastRow 列 (總共 $rowCount 列)", 16 | "pageRowsInfoTitleApproximate": "第 $firstRow - $lastRow 列 (總共約 $rowCount 列)", 17 | "rowsPerPageTitle": "每頁列數:", 18 | "selectedRowCountTitleOne": "已選取 1 個項目", 19 | "selectedRowCountTitleOther": "已選取 $selectedRowCount 個項目", 20 | "cancelButtonLabel": "取消", 21 | "closeButtonLabel": "關閉", 22 | "continueButtonLabel": "繼續", 23 | "copyButtonLabel": "複製", 24 | "cutButtonLabel": "剪下", 25 | "okButtonLabel": "確定", 26 | "pasteButtonLabel": "貼上", 27 | "selectAllButtonLabel": "全選", 28 | "viewLicensesButtonLabel": "查看授權", 29 | "anteMeridiemAbbreviation": "上午", 30 | "postMeridiemAbbreviation": "下午", 31 | "timePickerHourModeAnnouncement": "選取小時數", 32 | "timePickerMinuteModeAnnouncement": "選取分鐘數" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/html/html_render_objects.dart: -------------------------------------------------------------------------------- 1 | import 'dart:html' as html; 2 | 3 | import 'package:flutter/rendering.dart'; 4 | import 'package:flutter2js/core.dart'; 5 | import 'package:flutter2js/html.dart'; 6 | 7 | class HtmlRenderNode extends RenderObject { 8 | final html.Element htmlElement; 9 | 10 | HtmlRenderNode(this.htmlElement); 11 | 12 | @override 13 | Rect get paintBounds { 14 | return flutterRectFromHtmlRect(htmlElement.getBoundingClientRect()); 15 | } 16 | 17 | @override 18 | Rect get semanticBounds { 19 | return flutterRectFromHtmlRect(htmlElement.getBoundingClientRect()); 20 | } 21 | 22 | @override 23 | void debugAssertDoesMeetConstraints() {} 24 | 25 | @override 26 | void paint(PaintingContext context, Offset offset) { 27 | final platform = PlatformPlugin.current as BrowserPlatformPlugin; 28 | final root = platform.rootHtmlElement; 29 | final element = this.htmlElement; 30 | final style = element.style; 31 | style.position = "absolute"; 32 | style.left = "${offset.dx}px"; 33 | style.top = "${offset.dy}px"; 34 | if (!identical(element, root)) { 35 | element.remove(); 36 | root.insertBefore(element, null); 37 | } 38 | } 39 | 40 | @override 41 | void performLayout() {} 42 | 43 | @override 44 | void performResize() {} 45 | } 46 | -------------------------------------------------------------------------------- /packages/flutter2js/test/src/core/device_info_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter2js/core.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group("DeviceInfo: ", () { 6 | test("Default", () { 7 | final info = DeviceInfo.current; 8 | expect(info.platformType, PlatformType.browser); 9 | expect(info.isMobile, true); 10 | expect(info.userAgent, null); 11 | expect(info.operatingSystemType, OperatingSystemType.android); 12 | }); 13 | group("Browser: ", () { 14 | test("'user-agent' parsing", () { 15 | final userAgents = >{ 16 | OperatingSystemType.android: [ 17 | "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19", 18 | ], 19 | OperatingSystemType.ios: [ 20 | "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1", 21 | ], 22 | }; 23 | userAgents.forEach((operatingSystemType, list) { 24 | for (var item in list) { 25 | final deviceInfo = new DeviceInfo.fromBrowser(userAgent: item); 26 | expect(deviceInfo.operatingSystemType, operatingSystemType); 27 | } 28 | }); 29 | }); 30 | }); 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/will_pop_scope.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | 7 | import 'framework.dart'; 8 | import 'navigator.dart'; 9 | 10 | /// Registers a callback to veto attempts by the user to dismiss the enclosing 11 | /// [ModalRoute]. 12 | /// 13 | /// See also: 14 | /// 15 | /// * [ModalRoute.addScopedWillPopCallback] and [ModalRoute.removeScopedWillPopCallback], 16 | /// which this widget uses to register and unregister [onWillPop]. 17 | class WillPopScope extends StatelessWidget { 18 | /// Creates a widget that registers a callback to veto attempts by the user to 19 | /// dismiss the enclosing [ModalRoute]. 20 | /// 21 | /// The [child] argument must not be null. 22 | const WillPopScope({ 23 | Key key, 24 | @required this.child, 25 | @required this.onWillPop, 26 | }) 27 | : super(key: key); 28 | 29 | /// The widget below this widget in the tree. 30 | final Widget child; 31 | 32 | /// Called to veto attempts by the user to dismiss the enclosing [ModalRoute]. 33 | /// 34 | /// If the callback returns a Future that resolves to false, the enclosing 35 | /// route will not be popped. 36 | final WillPopCallback onWillPop; 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return child; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/semantics/semantics_service.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | import 'package:flutter/ui.dart' show TextDirection; 7 | 8 | import 'package:flutter/services.dart' show SystemChannels; 9 | 10 | import 'semantics_event.dart' show AnnounceSemanticsEvent; 11 | 12 | /// Allows access to the platform's accessibility services. 13 | /// 14 | /// Events sent by this service are handled by the platform-specific 15 | /// accessibility bridge in Flutter's engine. 16 | /// 17 | /// When possible, prefer using mechanisms like [Semantics] to implicitly 18 | /// trigger announcements over using this event. 19 | class SemanticsService { 20 | SemanticsService._(); 21 | 22 | /// Sends a semantic announcement. 23 | /// 24 | /// This should be used for announcement that are not seamlessly announced by 25 | /// the system as a result of a UI state change. 26 | /// 27 | /// For example a camera application can use this method to make accessibility 28 | /// announcements regarding objects in the viewfinder. 29 | static Future announce( 30 | String message, TextDirection textDirection) async { 31 | final AnnounceSemanticsEvent event = 32 | new AnnounceSemanticsEvent(message, textDirection); 33 | await SystemChannels.accessibility.send(event.toMap()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_zh.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "dense", 3 | "timeOfDayFormat": "ah:mm", 4 | "selectedRowCountTitleOne": "已选择 1 项内容", 5 | "openAppDrawerTooltip": "打开导航菜单", 6 | "backButtonTooltip": "返回", 7 | "nextPageTooltip": "下一页", 8 | "previousPageTooltip": "上一页", 9 | "showMenuTooltip": "显示菜单", 10 | "aboutListTileTitle": "关于$applicationName", 11 | "licensesPageTitle": "许可", 12 | "pageRowsInfoTitle": "第 $firstRow-$lastRow 行(共 $rowCount 行)", 13 | "pageRowsInfoTitleApproximate": "第 $firstRow-$lastRow 行(共约 $rowCount 行)", 14 | "rowsPerPageTitle": "每页行数:", 15 | "tabLabel": "第 $tabIndex 行(共 $tabCount 行)", 16 | "selectedRowCountTitleOther": "已选择 $selectedRowCount 项内容", 17 | "cancelButtonLabel": "取消", 18 | "continueButtonLabel": "继续", 19 | "closeButtonLabel": "关闭", 20 | "copyButtonLabel": "复制", 21 | "cutButtonLabel": "剪切", 22 | "okButtonLabel": "确定", 23 | "pasteButtonLabel": "粘贴", 24 | "selectAllButtonLabel": "全选", 25 | "viewLicensesButtonLabel": "查看许可", 26 | "closeButtonTooltip": "关闭", 27 | "deleteButtonTooltip": "删除", 28 | "nextMonthTooltip": "下个月", 29 | "previousMonthTooltip": "上个月", 30 | "anteMeridiemAbbreviation": "上午", 31 | "postMeridiemAbbreviation": "下午", 32 | "timePickerHourModeAnnouncement": "选择小时", 33 | "timePickerMinuteModeAnnouncement": "选择分钟", 34 | "signedInLabel": "登录", 35 | "hideAccountsLabel": "隐藏帐户", 36 | "showAccountsLabel": "显示帐户", 37 | "modalBarrierDismissLabel": "关闭" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_en_AU.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Select minutes", 3 | "timePickerHourModeAnnouncement": "Select hours", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "h:mm a", 6 | "openAppDrawerTooltip": "Open navigation menu", 7 | "backButtonTooltip": "Back", 8 | "closeButtonTooltip": "Close", 9 | "deleteButtonTooltip": "Delete", 10 | "nextMonthTooltip": "Next month", 11 | "previousMonthTooltip": "Previous month", 12 | "nextPageTooltip": "Next page", 13 | "previousPageTooltip": "Previous page", 14 | "showMenuTooltip": "Show menu", 15 | "aboutListTileTitle": "About $applicationName", 16 | "licensesPageTitle": "Licences", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount", 19 | "rowsPerPageTitle": "Rows per page:", 20 | "selectedRowCountTitleOne": "1 item selected", 21 | "selectedRowCountTitleOther": "$selectedRowCount items selected", 22 | "cancelButtonLabel": "CANCEL", 23 | "closeButtonLabel": "CLOSE", 24 | "continueButtonLabel": "CONTINUE", 25 | "copyButtonLabel": "COPY", 26 | "cutButtonLabel": "CUT", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "PASTE", 29 | "selectAllButtonLabel": "SELECT ALL", 30 | "viewLicensesButtonLabel": "VIEW LICENCES", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Dismiss" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_en_CA.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Select minutes", 3 | "timePickerHourModeAnnouncement": "Select hours", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "h:mm a", 6 | "openAppDrawerTooltip": "Open navigation menu", 7 | "backButtonTooltip": "Back", 8 | "closeButtonTooltip": "Close", 9 | "deleteButtonTooltip": "Delete", 10 | "nextMonthTooltip": "Next month", 11 | "previousMonthTooltip": "Previous month", 12 | "nextPageTooltip": "Next page", 13 | "previousPageTooltip": "Previous page", 14 | "showMenuTooltip": "Show menu", 15 | "aboutListTileTitle": "About $applicationName", 16 | "licensesPageTitle": "Licences", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount", 19 | "rowsPerPageTitle": "Rows per page:", 20 | "selectedRowCountTitleOne": "1 item selected", 21 | "selectedRowCountTitleOther": "$selectedRowCount items selected", 22 | "cancelButtonLabel": "CANCEL", 23 | "closeButtonLabel": "CLOSE", 24 | "continueButtonLabel": "CONTINUE", 25 | "copyButtonLabel": "COPY", 26 | "cutButtonLabel": "CUT", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "PASTE", 29 | "selectAllButtonLabel": "SELECT ALL", 30 | "viewLicensesButtonLabel": "VIEW LICENCES", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Dismiss" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_en_GB.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Select minutes", 3 | "timePickerHourModeAnnouncement": "Select hours", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "HH:mm", 6 | "nextMonthTooltip": "Next month", 7 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount", 8 | "copyButtonLabel": "COPY", 9 | "closeButtonTooltip": "Close", 10 | "deleteButtonTooltip": "Delete", 11 | "selectAllButtonLabel": "SELECT ALL", 12 | "viewLicensesButtonLabel": "VIEW LICENCES", 13 | "rowsPerPageTitle": "Rows per page:", 14 | "aboutListTileTitle": "About $applicationName", 15 | "backButtonTooltip": "Back", 16 | "licensesPageTitle": "Licences", 17 | "okButtonLabel": "OK", 18 | "pasteButtonLabel": "PASTE", 19 | "previousMonthTooltip": "Previous month", 20 | "closeButtonLabel": "CLOSE", 21 | "cutButtonLabel": "CUT", 22 | "continueButtonLabel": "CONTINUE", 23 | "nextPageTooltip": "Next page", 24 | "openAppDrawerTooltip": "Open navigation menu", 25 | "previousPageTooltip": "Previous page", 26 | "cancelButtonLabel": "CANCEL", 27 | "pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount", 28 | "selectedRowCountTitleOne": "1 item selected", 29 | "selectedRowCountTitleOther": "$selectedRowCount items selected", 30 | "showMenuTooltip": "Show menu", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Dismiss" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_en_IE.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Select minutes", 3 | "timePickerHourModeAnnouncement": "Select hours", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "HH:mm", 6 | "nextMonthTooltip": "Next month", 7 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount", 8 | "copyButtonLabel": "COPY", 9 | "closeButtonTooltip": "Close", 10 | "deleteButtonTooltip": "Delete", 11 | "selectAllButtonLabel": "SELECT ALL", 12 | "viewLicensesButtonLabel": "VIEW LICENCES", 13 | "rowsPerPageTitle": "Rows per page:", 14 | "aboutListTileTitle": "About $applicationName", 15 | "backButtonTooltip": "Back", 16 | "licensesPageTitle": "Licences", 17 | "okButtonLabel": "OK", 18 | "pasteButtonLabel": "PASTE", 19 | "previousMonthTooltip": "Previous month", 20 | "closeButtonLabel": "CLOSE", 21 | "cutButtonLabel": "CUT", 22 | "continueButtonLabel": "CONTINUE", 23 | "nextPageTooltip": "Next page", 24 | "openAppDrawerTooltip": "Open navigation menu", 25 | "previousPageTooltip": "Previous page", 26 | "cancelButtonLabel": "CANCEL", 27 | "pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount", 28 | "selectedRowCountTitleOne": "1 item selected", 29 | "selectedRowCountTitleOther": "$selectedRowCount items selected", 30 | "showMenuTooltip": "Show menu", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Dismiss" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_en_IN.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Select minutes", 3 | "timePickerHourModeAnnouncement": "Select hours", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "h:mm a", 6 | "openAppDrawerTooltip": "Open navigation menu", 7 | "backButtonTooltip": "Back", 8 | "closeButtonTooltip": "Close", 9 | "deleteButtonTooltip": "Delete", 10 | "nextMonthTooltip": "Next month", 11 | "previousMonthTooltip": "Previous month", 12 | "nextPageTooltip": "Next page", 13 | "previousPageTooltip": "Previous page", 14 | "showMenuTooltip": "Show menu", 15 | "aboutListTileTitle": "About $applicationName", 16 | "licensesPageTitle": "Licences", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount", 19 | "rowsPerPageTitle": "Rows per page:", 20 | "selectedRowCountTitleOne": "1 item selected", 21 | "selectedRowCountTitleOther": "$selectedRowCount items selected", 22 | "cancelButtonLabel": "CANCEL", 23 | "closeButtonLabel": "CLOSE", 24 | "continueButtonLabel": "CONTINUE", 25 | "copyButtonLabel": "COPY", 26 | "cutButtonLabel": "CUT", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "PASTE", 29 | "selectAllButtonLabel": "SELECT ALL", 30 | "viewLicensesButtonLabel": "VIEW LICENCES", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Dismiss" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_en_SG.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Select minutes", 3 | "timePickerHourModeAnnouncement": "Select hours", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "h:mm a", 6 | "openAppDrawerTooltip": "Open navigation menu", 7 | "backButtonTooltip": "Back", 8 | "closeButtonTooltip": "Close", 9 | "deleteButtonTooltip": "Delete", 10 | "nextMonthTooltip": "Next month", 11 | "previousMonthTooltip": "Previous month", 12 | "nextPageTooltip": "Next page", 13 | "previousPageTooltip": "Previous page", 14 | "showMenuTooltip": "Show menu", 15 | "aboutListTileTitle": "About $applicationName", 16 | "licensesPageTitle": "Licences", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount", 19 | "rowsPerPageTitle": "Rows per page:", 20 | "selectedRowCountTitleOne": "1 item selected", 21 | "selectedRowCountTitleOther": "$selectedRowCount items selected", 22 | "cancelButtonLabel": "CANCEL", 23 | "closeButtonLabel": "CLOSE", 24 | "continueButtonLabel": "CONTINUE", 25 | "copyButtonLabel": "COPY", 26 | "cutButtonLabel": "CUT", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "PASTE", 29 | "selectAllButtonLabel": "SELECT ALL", 30 | "viewLicensesButtonLabel": "VIEW LICENCES", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Dismiss" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_en_ZA.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Select minutes", 3 | "timePickerHourModeAnnouncement": "Select hours", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "HH:mm", 6 | "nextMonthTooltip": "Next month", 7 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount", 8 | "copyButtonLabel": "COPY", 9 | "closeButtonTooltip": "Close", 10 | "deleteButtonTooltip": "Delete", 11 | "selectAllButtonLabel": "SELECT ALL", 12 | "viewLicensesButtonLabel": "VIEW LICENCES", 13 | "rowsPerPageTitle": "Rows per page:", 14 | "aboutListTileTitle": "About $applicationName", 15 | "backButtonTooltip": "Back", 16 | "licensesPageTitle": "Licences", 17 | "okButtonLabel": "OK", 18 | "pasteButtonLabel": "PASTE", 19 | "previousMonthTooltip": "Previous month", 20 | "closeButtonLabel": "CLOSE", 21 | "cutButtonLabel": "CUT", 22 | "continueButtonLabel": "CONTINUE", 23 | "nextPageTooltip": "Next page", 24 | "openAppDrawerTooltip": "Open navigation menu", 25 | "previousPageTooltip": "Previous page", 26 | "cancelButtonLabel": "CANCEL", 27 | "pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount", 28 | "selectedRowCountTitleOne": "1 item selected", 29 | "selectedRowCountTitleOther": "$selectedRowCount items selected", 30 | "showMenuTooltip": "Show menu", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Dismiss" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_ko.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "dense", 3 | "timeOfDayFormat": "a h:mm", 4 | "openAppDrawerTooltip": "탐색 메뉴 열기", 5 | "backButtonTooltip": "뒤로", 6 | "closeButtonTooltip": "닫기", 7 | "deleteButtonTooltip": "삭제", 8 | "nextMonthTooltip": "다음 달", 9 | "previousMonthTooltip": "지난달", 10 | "nextPageTooltip": "다음 페이지", 11 | "previousPageTooltip": "이전 페이지", 12 | "showMenuTooltip": "메뉴 표시", 13 | "aboutListTileTitle": "$applicationName 정보", 14 | "licensesPageTitle": "라이선스", 15 | "pageRowsInfoTitle": "$rowCount행 중 $firstRow~$lastRow행", 16 | "pageRowsInfoTitleApproximate": "약 $rowCount행 중 $firstRow~$lastRow행", 17 | "rowsPerPageTitle": "페이지당 행 수:", 18 | "tabLabel": "$tabCount행 중 $tabIndex행", 19 | "selectedRowCountTitleOne": "항목 1개 선택됨", 20 | "selectedRowCountTitleOther": "항목 $selectedRowCount개 선택됨", 21 | "cancelButtonLabel": "취소", 22 | "closeButtonLabel": "닫기", 23 | "continueButtonLabel": "계속", 24 | "copyButtonLabel": "복사", 25 | "cutButtonLabel": "잘라내기", 26 | "okButtonLabel": "확인", 27 | "pasteButtonLabel": "붙여넣기", 28 | "selectAllButtonLabel": "전체 선택", 29 | "viewLicensesButtonLabel": "라이선스 보기", 30 | "anteMeridiemAbbreviation": "오전", 31 | "postMeridiemAbbreviation": "오후", 32 | "timePickerHourModeAnnouncement": "시간 선택", 33 | "timePickerMinuteModeAnnouncement": "분 선택", 34 | "signedInLabel": "로그인 함", 35 | "hideAccountsLabel": "계정 숨기기", 36 | "showAccountsLabel": "계정 표시", 37 | "modalBarrierDismissLabel": "버리다" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/foundation/observer_list.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:collection'; 6 | 7 | /// A list optimized for containment queries. 8 | /// 9 | /// Consider using an [ObserverList] instead of a [List] when the number of 10 | /// [contains] calls dominates the number of [add] and [remove] calls. 11 | class ObserverList extends Iterable { 12 | final List _list = []; 13 | bool _isDirty = false; 14 | HashSet _set; 15 | 16 | /// Adds an item to the end of this list. 17 | /// 18 | /// The given item must not already be in the list. 19 | void add(T item) { 20 | _isDirty = true; 21 | _list.add(item); 22 | } 23 | 24 | /// Removes an item from the list. 25 | /// 26 | /// Returns whether the item was present in the list. 27 | bool remove(T item) { 28 | _isDirty = true; 29 | return _list.remove(item); 30 | } 31 | 32 | @override 33 | bool contains(Object item) { 34 | if (_list.length < 3) return _list.contains(item); 35 | 36 | if (_isDirty) { 37 | if (_set == null) { 38 | _set = new HashSet.from(_list); 39 | } else { 40 | _set.clear(); 41 | _set.addAll(_list); 42 | } 43 | _isDirty = false; 44 | } 45 | 46 | return _set.contains(item); 47 | } 48 | 49 | @override 50 | Iterator get iterator => _list.iterator; 51 | } 52 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_419.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_AR.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_BO.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_CL.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_CO.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_CR.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_DO.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_EC.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_GT.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_HN.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_MX.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_NI.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_PA.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_PE.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_PR.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_PY.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_SV.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_UY.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_VE.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Borrar", 8 | "nextMonthTooltip": "Próximo mes", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Próxima página", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Acerca de $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 19 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 20 | "cancelButtonLabel": "CANCELAR", 21 | "closeButtonLabel": "CERRAR", 22 | "continueButtonLabel": "CONTINUAR", 23 | "copyButtonLabel": "COPIAR", 24 | "cutButtonLabel": "CORTAR", 25 | "okButtonLabel": "ACEPTAR", 26 | "pasteButtonLabel": "PEGAR", 27 | "selectAllButtonLabel": "SELECCIONAR TODO", 28 | "viewLicensesButtonLabel": "VER LICENCIAS", 29 | "anteMeridiemAbbreviation": "a.m.", 30 | "postMeridiemAbbreviation": "p.m.", 31 | "timePickerHourModeAnnouncement": "Seleccionar horas", 32 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos" 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/foundation/collections.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // TODO(ianh): These should be on the Set and List classes themselves. 6 | 7 | /// Compares two sets for deep equality. 8 | /// 9 | /// Returns true if the sets are both null, or if they are both non-null, have 10 | /// the same length, and contain the same members. Returns false otherwise. 11 | /// Order is not compared. 12 | /// 13 | /// See also: 14 | /// 15 | /// * [listEquals], which does something similar for lists. 16 | bool setEquals(Set a, Set b) { 17 | if (a == null) return b == null; 18 | if (b == null || a.length != b.length) return false; 19 | for (T value in a) { 20 | if (!b.contains(value)) return false; 21 | } 22 | return true; 23 | } 24 | 25 | /// Compares two lists for deep equality. 26 | /// 27 | /// Returns true if the lists are both null, or if they are both non-null, have 28 | /// the same length, and contain the same members in the same order. Returns 29 | /// false otherwise. 30 | /// 31 | /// See also: 32 | /// 33 | /// * [setEquals], which does something similar for sets. 34 | bool listEquals(List a, List b) { 35 | if (a == null) return b == null; 36 | if (b == null || a.length != b.length) return false; 37 | for (int index = 0; index < a.length; index += 1) { 38 | if (a[index] != b[index]) return false; 39 | } 40 | return true; 41 | } 42 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es_US.arb: -------------------------------------------------------------------------------- 1 | { 2 | "deleteButtonTooltip": "Borrar", 3 | "nextMonthTooltip": "Próximo mes", 4 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow de aproximadamente $rowCount", 5 | "copyButtonLabel": "COPIAR", 6 | "closeButtonTooltip": "Cerrar", 7 | "selectAllButtonLabel": "SELECCIONAR TODO", 8 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos", 9 | "viewLicensesButtonLabel": "VER LICENCIAS", 10 | "rowsPerPageTitle": "Filas por página:", 11 | "aboutListTileTitle": "Acerca de $applicationName", 12 | "backButtonTooltip": "Atrás", 13 | "licensesPageTitle": "Licencias", 14 | "okButtonLabel": "ACEPTAR", 15 | "pasteButtonLabel": "PEGAR", 16 | "previousMonthTooltip": "Mes anterior", 17 | "closeButtonLabel": "CERRAR", 18 | "cutButtonLabel": "CORTAR", 19 | "continueButtonLabel": "CONTINUAR", 20 | "timePickerHourModeAnnouncement": "Seleccionar horas", 21 | "nextPageTooltip": "Próxima página", 22 | "openAppDrawerTooltip": "Abrir menú de navegación", 23 | "previousPageTooltip": "Página anterior", 24 | "cancelButtonLabel": "CANCELAR", 25 | "pageRowsInfoTitle": "$firstRow–$lastRow de $rowCount", 26 | "selectedRowCountTitleOne": "Se seleccionó 1 elemento", 27 | "selectedRowCountTitleOther": "Se seleccionaron $selectedRowCount elementos", 28 | "showMenuTooltip": "Mostrar menú", 29 | "scriptCategory": "English-like", 30 | "timeOfDayFormat": "h:mm a", 31 | "anteMeridiemAbbreviation": "a.m.", 32 | "postMeridiemAbbreviation": "p.m." 33 | } 34 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_ja.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "dense", 3 | "timeOfDayFormat": "H:mm", 4 | "selectedRowCountTitleOne": "1 件のアイテムを選択中", 5 | "openAppDrawerTooltip": "ナビゲーション メニューを開く", 6 | "backButtonTooltip": "戻る", 7 | "closeButtonTooltip": "閉じる", 8 | "deleteButtonTooltip": "削除", 9 | "nextMonthTooltip": "来月", 10 | "previousMonthTooltip": "前月", 11 | "nextPageTooltip": "次のページ", 12 | "previousPageTooltip": "前のページ", 13 | "showMenuTooltip": "メニューを表示", 14 | "aboutListTileTitle": "$applicationName について", 15 | "licensesPageTitle": "ライセンス", 16 | "pageRowsInfoTitle": "$firstRow - $lastRow 行(合計 $rowCount 行)", 17 | "pageRowsInfoTitleApproximate": "$firstRow – $lastRow 行(合計約 $rowCount 行)", 18 | "rowsPerPageTitle": "ページあたりの行数:", 19 | "tabLabel": "$tabIndex 行(合計 $tabCount 行)", 20 | "selectedRowCountTitleOther": "$selectedRowCount 件のアイテムを選択中", 21 | "cancelButtonLabel": "キャンセル", 22 | "closeButtonLabel": "閉じる", 23 | "continueButtonLabel": "続行", 24 | "copyButtonLabel": "コピー", 25 | "cutButtonLabel": "切り取り", 26 | "okButtonLabel": "OK", 27 | "pasteButtonLabel": "貼り付け", 28 | "selectAllButtonLabel": "すべて選択", 29 | "viewLicensesButtonLabel": "ライセンスを表示", 30 | "anteMeridiemAbbreviation": "AM", 31 | "postMeridiemAbbreviation": "PM", 32 | "timePickerHourModeAnnouncement": "時間を選択", 33 | "timePickerMinuteModeAnnouncement": "分を選択", 34 | "signedInLabel": "ログイン中", 35 | "hideAccountsLabel": "アカウントを隠す", 36 | "showAccountsLabel": "アカウントを表示する", 37 | "modalBarrierDismissLabel": "閉じる" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_pt_PT.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Selecionar minutos", 3 | "timePickerHourModeAnnouncement": "Selecionar horas", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "HH:mm", 6 | "openAppDrawerTooltip": "Abrir menu de navegação", 7 | "backButtonTooltip": "Voltar", 8 | "closeButtonTooltip": "Fechar", 9 | "deleteButtonTooltip": "Eliminar", 10 | "nextMonthTooltip": "Mês seguinte", 11 | "previousMonthTooltip": "Mês anterior", 12 | "nextPageTooltip": "Página seguinte", 13 | "previousPageTooltip": "Página anterior", 14 | "showMenuTooltip": "Mostrar menu", 15 | "aboutListTileTitle": "Acerca de $applicationName", 16 | "licensesPageTitle": "Licenças", 17 | "pageRowsInfoTitle": "$firstRow a $lastRow de $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow a $lastRow de cerca de $rowCount", 19 | "rowsPerPageTitle": "Linhas por página:", 20 | "selectedRowCountTitleOne": "1 item selecionado", 21 | "selectedRowCountTitleOther": "$selectedRowCount itens selecionados", 22 | "cancelButtonLabel": "CANCELAR", 23 | "closeButtonLabel": "FECHAR", 24 | "continueButtonLabel": "CONTINUAR", 25 | "copyButtonLabel": "COPIAR", 26 | "cutButtonLabel": "CORTAR", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "COLAR", 29 | "selectAllButtonLabel": "SELECIONAR TUDO", 30 | "viewLicensesButtonLabel": "VER LICENÇAS", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "modalBarrierDismissLabel": "Ignorar" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/foundation/debug.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'assertions.dart'; 6 | import 'platform.dart'; 7 | import 'print.dart'; 8 | 9 | /// Returns true if none of the foundation library debug variables have been 10 | /// changed. 11 | /// 12 | /// This function is used by the test framework to ensure that debug variables 13 | /// haven't been inadvertently changed. 14 | /// 15 | /// The `debugPrintOverride` argument can be specified to indicate the expected 16 | /// value of the [debugPrint] variable. This is useful for test frameworks that 17 | /// override [debugPrint] themselves and want to check that their own custom 18 | /// value wasn't overridden by a test. 19 | /// 20 | /// See [https://docs.flutter.io/flutter/foundation/foundation-library.html] for 21 | /// a complete list. 22 | bool debugAssertAllFoundationVarsUnset(String reason, 23 | {DebugPrintCallback debugPrintOverride: debugPrintThrottled}) { 24 | assert(() { 25 | if (debugPrint != debugPrintOverride || 26 | debugDefaultTargetPlatformOverride != null) 27 | throw new FlutterError(reason); 28 | return true; 29 | }()); 30 | return true; 31 | } 32 | 33 | /// Arguments to whitelist [Timeline] events in order to be shown in the 34 | /// developer centric version of the Observatory Timeline. 35 | const Map timelineWhitelistArguments = const { 36 | 'mode': 'basic' 37 | }; 38 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_gsw.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Minuten auswählen", 3 | "timePickerHourModeAnnouncement": "Stunden auswählen", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "HH:mm", 6 | "openAppDrawerTooltip": "Navigationsmenü öffnen", 7 | "backButtonTooltip": "Zurück", 8 | "closeButtonTooltip": "Schließen", 9 | "deleteButtonTooltip": "Löschen", 10 | "nextMonthTooltip": "Nächster Monat", 11 | "previousMonthTooltip": "Vorheriger Monat", 12 | "nextPageTooltip": "Nächste Seite", 13 | "previousPageTooltip": "Vorherige Seite", 14 | "showMenuTooltip": "Menü anzeigen", 15 | "aboutListTileTitle": "Über $applicationName", 16 | "licensesPageTitle": "Lizenzen", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow von $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow von etwa $rowCount", 19 | "rowsPerPageTitle": "Zeilen pro Seite:", 20 | "selectedRowCountTitleOne": "1 Element ausgewählt", 21 | "selectedRowCountTitleOther": "$selectedRowCount Elemente ausgewählt", 22 | "cancelButtonLabel": "ABBRECHEN", 23 | "closeButtonLabel": "SCHLIEẞEN", 24 | "continueButtonLabel": "WEITER", 25 | "copyButtonLabel": "KOPIEREN", 26 | "cutButtonLabel": "AUSSCHNEIDEN", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "EINFÜGEN", 29 | "selectAllButtonLabel": "ALLE AUSWÄHLEN", 30 | "viewLicensesButtonLabel": "LIZENZEN ANZEIGEN", 31 | "anteMeridiemAbbreviation": "VORM.", 32 | "postMeridiemAbbreviation": "NACHM.", 33 | "modalBarrierDismissLabel": "Schließen" 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_de_CH.arb: -------------------------------------------------------------------------------- 1 | { 2 | "timePickerMinuteModeAnnouncement": "Minuten auswählen", 3 | "timePickerHourModeAnnouncement": "Stunden auswählen", 4 | "scriptCategory": "English-like", 5 | "timeOfDayFormat": "HH:mm", 6 | "openAppDrawerTooltip": "Navigationsmenü öffnen", 7 | "backButtonTooltip": "Zurück", 8 | "closeButtonTooltip": "Schliessen", 9 | "deleteButtonTooltip": "Löschen", 10 | "nextMonthTooltip": "Nächster Monat", 11 | "previousMonthTooltip": "Vorheriger Monat", 12 | "nextPageTooltip": "Nächste Seite", 13 | "previousPageTooltip": "Vorherige Seite", 14 | "showMenuTooltip": "Menü anzeigen", 15 | "aboutListTileTitle": "Über $applicationName", 16 | "licensesPageTitle": "Lizenzen", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow von $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow von etwa $rowCount", 19 | "rowsPerPageTitle": "Zeilen pro Seite:", 20 | "selectedRowCountTitleOne": "1 Element ausgewählt", 21 | "selectedRowCountTitleOther": "$selectedRowCount Elemente ausgewählt", 22 | "cancelButtonLabel": "ABBRECHEN", 23 | "closeButtonLabel": "SCHLIEẞEN", 24 | "continueButtonLabel": "WEITER", 25 | "copyButtonLabel": "KOPIEREN", 26 | "cutButtonLabel": "AUSSCHNEIDEN", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "EINFÜGEN", 29 | "selectAllButtonLabel": "ALLE AUSWÄHLEN", 30 | "viewLicensesButtonLabel": "LIZENZEN ANZEIGEN", 31 | "anteMeridiemAbbreviation": "VORM.", 32 | "postMeridiemAbbreviation": "NACHM.", 33 | "modalBarrierDismissLabel": "Schliessen" 34 | } 35 | -------------------------------------------------------------------------------- /examples/stocks/lib/i18n/regenerate.md: -------------------------------------------------------------------------------- 1 | ## Regenerating the i18n files 2 | 3 | The files in this directory are based on ../lib/stock_strings.dart 4 | which defines all of the localizable strings used by the stocks 5 | app. The stocks app uses 6 | the [Dart `intl` package](https://github.com/dart-lang/intl). 7 | 8 | Rebuilding everything requires two steps. 9 | 10 | With the `examples/stocks` as the current directory, generate 11 | `intl_messages.arb` from `lib/stock_strings.dart`: 12 | ``` 13 | flutter pub pub run intl_translation:extract_to_arb --output-dir=lib/i18n lib/stock_strings.dart 14 | ``` 15 | The `intl_messages.arb` file is a JSON format map with one entry for 16 | each `Intl.message()` function defined in `stock_strings.dart`. This 17 | file was used to create the English and Spanish localizations, 18 | `stocks_en.arb` and `stocks_es.arb`. The `intl_messages.arb` wasn't 19 | checked into the repository, since it only serves as a template for 20 | the other `.arb` files. 21 | 22 | 23 | With the `examples/stocks` as the current directory, generate a 24 | `stock_messages_.dart` for each `stocks_.arb` file and 25 | `stock_messages_all.dart`, which imports all of the messages files: 26 | ``` 27 | flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/i18n \ 28 | --generated-file-prefix=stock_ --no-use-deferred-loading lib/*.dart lib/i18n/stocks_*.arb 29 | ``` 30 | 31 | The `StockStrings` class uses the generated `initializeMessages()` 32 | function (`stock_messages_all.dart`) to load the localized messages 33 | and `Intl.message()` to look them up. 34 | -------------------------------------------------------------------------------- /examples/stocks/lib/stock_strings.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:intl/intl.dart'; 8 | import 'package:flutter/widgets.dart'; 9 | 10 | import 'i18n/stock_messages_all.dart'; 11 | 12 | // Information about how this file relates to i18n/stock_messages_all.dart and how the i18n files 13 | // were generated can be found in i18n/regenerate.md. 14 | 15 | class StockStrings { 16 | StockStrings(Locale locale) : _localeName = locale.toString(); 17 | 18 | final String _localeName; 19 | 20 | static Future load(Locale locale) { 21 | return initializeMessages(locale.toString()) 22 | .then((Object _) { 23 | return new StockStrings(locale); 24 | }); 25 | } 26 | 27 | static StockStrings of(BuildContext context) { 28 | return Localizations.of(context, StockStrings); 29 | } 30 | 31 | String title() { 32 | return Intl.message( 33 | '', 34 | name: 'title', 35 | desc: 'Title for the Stocks application', 36 | locale: _localeName, 37 | ); 38 | } 39 | 40 | String market() => Intl.message( 41 | 'MARKET', 42 | name: 'market', 43 | desc: 'Label for the Market tab', 44 | locale: _localeName, 45 | ); 46 | 47 | String portfolio() => Intl.message( 48 | 'PORTFOLIO', 49 | name: 'portfolio', 50 | desc: 'Label for the Portfolio tab', 51 | locale: _localeName, 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2017, the project authors. 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_th.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "tall", 3 | "timeOfDayFormat": "ah:mm", 4 | "openAppDrawerTooltip": "เปิดเมนูการนำทาง", 5 | "backButtonTooltip": "กลับ", 6 | "closeButtonTooltip": "ปิด", 7 | "deleteButtonTooltip": "ลบ", 8 | "nextMonthTooltip": "เดือนหน้า", 9 | "previousMonthTooltip": "เดือนที่แล้ว", 10 | "nextPageTooltip": "หน้าถัดไป", 11 | "previousPageTooltip": "หน้าก่อน", 12 | "showMenuTooltip": "แสดงเมนู", 13 | "aboutListTileTitle": "เกี่ยวกับ $applicationName", 14 | "licensesPageTitle": "ใบอนุญาต", 15 | "pageRowsInfoTitle": "$firstRow-$lastRow จาก $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow จากประมาณ $rowCount", 17 | "rowsPerPageTitle": "แถวต่อหน้า:", 18 | "tabLabel": "$tabIndex จาก $tabCount", 19 | "selectedRowCountTitleOne": "เลือกแล้ว 1 รายการ", 20 | "selectedRowCountTitleOther": "เลือกแล้ว $selectedRowCount รายการ", 21 | "cancelButtonLabel": "ยกเลิก", 22 | "closeButtonLabel": "ปิด", 23 | "continueButtonLabel": "ต่อไป", 24 | "copyButtonLabel": "คัดลอก", 25 | "cutButtonLabel": "ตัด", 26 | "okButtonLabel": "ตกลง", 27 | "pasteButtonLabel": "วาง", 28 | "selectAllButtonLabel": "เลือกทั้งหมด", 29 | "viewLicensesButtonLabel": "ดูใบอนุญาต", 30 | "anteMeridiemAbbreviation": "AM", 31 | "postMeridiemAbbreviation": "PM", 32 | "timePickerHourModeAnnouncement": "เลือกชั่วโมง", 33 | "timePickerMinuteModeAnnouncement": "เลือกนาที", 34 | "signedInLabel": "ลงทะเบียนเข้า", 35 | "hideAccountsLabel": "ซ่อนบัญชี", 36 | "showAccountsLabel": "แสดงบัญชี", 37 | "modalBarrierDismissLabel": "ยกเลิก" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/gestures/long_press.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'arena.dart'; 6 | import 'constants.dart'; 7 | import 'events.dart'; 8 | import 'recognizer.dart'; 9 | 10 | /// Signature for when a pointer has remained in contact with the screen at the 11 | /// same location for a long period of time. 12 | typedef void GestureLongPressCallback(); 13 | 14 | /// Recognizes when the user has pressed down at the same location for a long 15 | /// period of time. 16 | class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer { 17 | /// Creates a long-press gesture recognizer. 18 | /// 19 | /// Consider assigning the [onLongPress] callback after creating this object. 20 | LongPressGestureRecognizer({Object debugOwner}) 21 | : super(deadline: kLongPressTimeout, debugOwner: debugOwner); 22 | 23 | /// Called when a long-press is recongized. 24 | GestureLongPressCallback onLongPress; 25 | 26 | @override 27 | void didExceedDeadline() { 28 | resolve(GestureDisposition.accepted); 29 | if (onLongPress != null) 30 | invokeCallback('onLongPress', 31 | onLongPress); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 32 | } 33 | 34 | @override 35 | void handlePrimaryPointer(PointerEvent event) { 36 | if (event is PointerUpEvent) resolve(GestureDisposition.rejected); 37 | } 38 | 39 | @override 40 | String get debugDescription => 'long press'; 41 | } 42 | -------------------------------------------------------------------------------- /packages/flutter/FLUTTER_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 The Chromium Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_fa.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "tall", 3 | "timeOfDayFormat": "H:mm", 4 | "selectedRowCountTitleOne": "۱ مورد انتخاب شد", 5 | "openAppDrawerTooltip": "باز کردن منوی پیمایش", 6 | "backButtonTooltip": "برگشت", 7 | "closeButtonTooltip": "بستن", 8 | "deleteButtonTooltip": "حذف", 9 | "nextMonthTooltip": "ماه بعد", 10 | "previousMonthTooltip": "ماه قبل", 11 | "nextPageTooltip": "صفحه بعد", 12 | "previousPageTooltip": "صفحه قبل", 13 | "showMenuTooltip": "نمایش منو", 14 | "aboutListTileTitle": "درباره $applicationName", 15 | "licensesPageTitle": "مجوزها", 16 | "pageRowsInfoTitle": "$firstRow–$lastRow از $rowCount", 17 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow از حدود $rowCount", 18 | "rowsPerPageTitle": "ردیف در هر صفحه:", 19 | "tabLabel": "$tabIndex از $tabCount", 20 | "selectedRowCountTitleOther": "$selectedRowCount مورد انتخاب شدند", 21 | "cancelButtonLabel": "لغو", 22 | "closeButtonLabel": "بستن", 23 | "continueButtonLabel": "ادامه", 24 | "copyButtonLabel": "کپی", 25 | "cutButtonLabel": "برش", 26 | "okButtonLabel": "تأیید", 27 | "pasteButtonLabel": "جای‌گذاری", 28 | "selectAllButtonLabel": "انتخاب همه", 29 | "viewLicensesButtonLabel": "مشاهده مجوزها", 30 | "anteMeridiemAbbreviation": "ق.ظ.", 31 | "postMeridiemAbbreviation": "ب.ظ.", 32 | "timePickerHourModeAnnouncement": "انتخاب ساعت", 33 | "timePickerMinuteModeAnnouncement": "انتخاب دقیقه", 34 | "signedInLabel": "وارد شدن", 35 | "hideAccountsLabel": "پنهان کردن حساب ها", 36 | "showAccountsLabel": "نمایش حساب ها", 37 | "modalBarrierDismissLabel": "رد کردن" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/material/constants.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/painting.dart'; 6 | 7 | /// The height of the toolbar component of the [AppBar]. 8 | const double kToolbarHeight = 56.0; 9 | 10 | /// The height of the bottom navigation bar. 11 | const double kBottomNavigationBarHeight = 56.0; 12 | 13 | /// The height of a tab bar containing text. 14 | const double kTextTabBarHeight = 48.0; 15 | 16 | /// The amount of time theme change animations should last. 17 | const Duration kThemeChangeDuration = const Duration(milliseconds: 200); 18 | 19 | /// The radius of a circular material ink response in logical pixels. 20 | const double kRadialReactionRadius = 24.0; 21 | 22 | /// The amount of time a circular material ink response should take to expand to its full size. 23 | const Duration kRadialReactionDuration = const Duration(milliseconds: 200); 24 | 25 | /// The value of the alpha channel to use when drawing a circular material ink response. 26 | const int kRadialReactionAlpha = 0x33; 27 | 28 | /// The duration of the horizontal scroll animation that occurs when a tab is tapped. 29 | const Duration kTabScrollDuration = const Duration(milliseconds: 300); 30 | 31 | /// The horizontal padding included by [Tab]s. 32 | const EdgeInsets kTabLabelPadding = 33 | const EdgeInsets.symmetric(horizontal: 12.0); 34 | 35 | /// The padding added around material list items. 36 | const EdgeInsets kMaterialListPadding = 37 | const EdgeInsets.symmetric(vertical: 8.0); 38 | -------------------------------------------------------------------------------- /packages/flutter_test/FLUTTER_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 The Chromium Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /packages/flutter_localizations/FLUTTER_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 The Chromium Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /packages/flutter_test/test/finders_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/widgets.dart'; 7 | import 'package:flutter_test/flutter_test.dart'; 8 | 9 | void main() { 10 | group('hitTestable', () { 11 | testWidgets('excludes non-hit-testable widgets', (WidgetTester tester) async { 12 | await tester.pumpWidget( 13 | _boilerplate(new IndexedStack( 14 | sizing: StackFit.expand, 15 | children: [ 16 | new GestureDetector( 17 | key: const ValueKey(0), 18 | behavior: HitTestBehavior.opaque, 19 | onTap: () { }, 20 | child: const SizedBox.expand(), 21 | ), 22 | new GestureDetector( 23 | key: const ValueKey(1), 24 | behavior: HitTestBehavior.opaque, 25 | onTap: () { }, 26 | child: const SizedBox.expand(), 27 | ), 28 | ], 29 | )), 30 | ); 31 | expect(find.byType(GestureDetector), findsNWidgets(2)); 32 | final Finder hitTestable = find.byType(GestureDetector).hitTestable(at: Alignment.center); 33 | expect(hitTestable, findsOneWidget); 34 | expect(tester.widget(hitTestable).key, const ValueKey(0)); 35 | }); 36 | }); 37 | } 38 | 39 | Widget _boilerplate(Widget child) { 40 | return new Directionality( 41 | textDirection: TextDirection.ltr, 42 | child: child, 43 | ); 44 | } 45 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/core/window.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | 3 | import 'package:flutter/ui.dart' as ui; 4 | import 'package:flutter/widgets.dart'; 5 | import 'package:flutter2js/src/core/platform_plugin.dart'; 6 | 7 | final ui.Window window = new _Window(); 8 | 9 | /// Singleton class that delegates implementation to [PlatformPlugin]. 10 | class _Window extends ui.Window { 11 | _Window(); 12 | 13 | @override 14 | String get defaultRouteName => PlatformPlugin.current.routingPlugin.current; 15 | 16 | @override 17 | Locale get locale => PlatformPlugin.current.locale; 18 | 19 | @override 20 | set onBeginFrame(ui.FrameCallback callback) { 21 | super.onBeginFrame = callback; 22 | } 23 | 24 | @override 25 | set onDrawFrame(ui.VoidCallback callback) { 26 | super.onDrawFrame = callback; 27 | } 28 | 29 | @override 30 | set onPlatformMessage(ui.PlatformMessageCallback callback) { 31 | super.onPlatformMessage = callback; 32 | } 33 | 34 | @override 35 | Size get physicalSize => PlatformPlugin.current.physicalSize; 36 | 37 | @override 38 | void render(ui.Scene scene) { 39 | PlatformPlugin.current.renderScene(scene); 40 | } 41 | 42 | @override 43 | void scheduleFrame() { 44 | PlatformPlugin.current.scheduleFrame(); 45 | } 46 | 47 | @override 48 | void sendPlatformMessage( 49 | String name, ByteData data, ui.PlatformMessageResponseCallback callback) { 50 | PlatformPlugin.current.sendPlatformMessage(name, data, callback); 51 | } 52 | 53 | @override 54 | void updateSemantics(ui.SemanticsUpdate update) { 55 | PlatformPlugin.current.updateSemantics(update); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /packages/device_info/LICENSE: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the names of its 14 | // contributors may be used to endorse or promote products derived from 15 | // this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_tr.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH:mm", 4 | "openAppDrawerTooltip": "Gezinme menüsünü aç", 5 | "backButtonTooltip": "Geri", 6 | "closeButtonTooltip": "Kapat", 7 | "deleteButtonTooltip": "Sil", 8 | "nextMonthTooltip": "Gelecek ay", 9 | "previousMonthTooltip": "Önceki ay", 10 | "nextPageTooltip": "Sonraki sayfa", 11 | "previousPageTooltip": "Önceki sayfa", 12 | "showMenuTooltip": "Menüyü göster", 13 | "aboutListTileTitle": "$applicationName Hakkında", 14 | "licensesPageTitle": "Lisanslar", 15 | "pageRowsInfoTitle": "$firstRow-$lastRow / $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow-$lastRow / $rowCount", 17 | "rowsPerPageTitle": "Sayfa başına satır sayısı:", 18 | "tabLabel": "$tabIndex, $tabCount içinde", 19 | "selectedRowCountTitleOne": "1 öğe seçildi", 20 | "selectedRowCountTitleOther": "$selectedRowCount öğe seçildi", 21 | "cancelButtonLabel": "İPTAL", 22 | "closeButtonLabel": "KAPAT", 23 | "continueButtonLabel": "DEVAM", 24 | "copyButtonLabel": "KOPYALA", 25 | "cutButtonLabel": "KES", 26 | "okButtonLabel": "Tamam", 27 | "pasteButtonLabel": "YAPIŞTIR", 28 | "selectAllButtonLabel": "TÜMÜNÜ SEÇ", 29 | "viewLicensesButtonLabel": "LİSANLARI GÖSTER", 30 | "anteMeridiemAbbreviation": "ÖÖ", 31 | "postMeridiemAbbreviation": "ÖS", 32 | "timePickerHourModeAnnouncement": "Saati seçin", 33 | "timePickerMinuteModeAnnouncement": "Dakikayı seçin", 34 | "signedInLabel": "Yetkili", 35 | "hideAccountsLabel": "Hesapları gizle", 36 | "showAccountsLabel": "Hesapları göster", 37 | "modalBarrierDismissLabel": "Reddet" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_ps.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "tall", 3 | "timeOfDayFormat": "HH:mm", 4 | "@anteMeridiemAbbreviation": {"notUsed":"Pashto time format does not use a.m. indicator"}, 5 | "@postMeridiemAbbreviation": {"notUsed":"Pashto time format does not use p.m. indicator"}, 6 | "openAppDrawerTooltip": "د پرانیستی نیینګ مینو", 7 | "backButtonTooltip": "شاته", 8 | "closeButtonTooltip": "بنده", 9 | "deleteButtonTooltip": "", 10 | "nextMonthTooltip": "بله میاشت", 11 | "previousMonthTooltip": "تیره میاشت", 12 | "nextPageTooltip": "بله پاڼه", 13 | "previousPageTooltip": "مخکینی مخ", 14 | "showMenuTooltip": "غورنۍ ښودل", 15 | "aboutListTileTitle": "د $applicationName په اړه", 16 | "licensesPageTitle": "جوازونه", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow د $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow څخه $rowCount د", 19 | "rowsPerPageTitle": "د هرې پاڼې پاڼې:", 20 | "tabLabel": "$tabIndex د $tabCount", 21 | "selectedRowCountTitleOther": "$selectedRowCount توکي غوره شوي", 22 | "cancelButtonLabel": "لغوه کول", 23 | "closeButtonLabel": "تړل", 24 | "continueButtonLabel": "منځپانګې", 25 | "copyButtonLabel": "کاپی", 26 | "cutButtonLabel": "کم کړئ", 27 | "okButtonLabel": "سمه ده", 28 | "pasteButtonLabel": "پیټ کړئ", 29 | "selectAllButtonLabel": "غوره کړئ", 30 | "viewLicensesButtonLabel": "لیدلس وګورئ", 31 | "timePickerHourModeAnnouncement": "وختونه وټاکئ", 32 | "timePickerMinuteModeAnnouncement": "منې غوره کړئ", 33 | "signedInLabel": "ننوتل", 34 | "hideAccountsLabel": "حسابونه پټ کړئ", 35 | "showAccountsLabel": "حسابونه ښکاره کړئ", 36 | "modalBarrierDismissLabel": "رد کړه" 37 | } 38 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_ur.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "tall", 3 | "timeOfDayFormat": "h:mm a", 4 | "selectedRowCountTitleOne": "1 آئٹم منتخب کیا گیا", 5 | "openAppDrawerTooltip": "نیویگیشن مینو کھولیں", 6 | "backButtonTooltip": "پیچھے", 7 | "closeButtonTooltip": "بند کریں", 8 | "deleteButtonTooltip": "حذف کریں", 9 | "nextMonthTooltip": "اگلا مہینہ", 10 | "previousMonthTooltip": "پچھلا مہینہ", 11 | "nextPageTooltip": "اگلا صفحہ", 12 | "previousPageTooltip": "گزشتہ صفحہ", 13 | "showMenuTooltip": "مینو دکھائیں", 14 | "aboutListTileTitle": "$applicationName کے بارے میں", 15 | "licensesPageTitle": "لائسنسز", 16 | "pageRowsInfoTitle": "$firstRow–$lastRow از $rowCount", 17 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow $rowCount میں سے تقریباً", 18 | "rowsPerPageTitle": "قطاریں فی صفحہ:", 19 | "tabLabel": "$tabIndex از $tabCount", 20 | "selectedRowCountTitleOther": "$selectedRowCount آئٹمز منتخب کیے گئے", 21 | "cancelButtonLabel": "منسوخ کریں", 22 | "closeButtonLabel": "بند کریں", 23 | "continueButtonLabel": "جاری رکھیں", 24 | "copyButtonLabel": "کاپی کریں", 25 | "cutButtonLabel": "کٹ کریں", 26 | "okButtonLabel": "ٹھیک ہے", 27 | "pasteButtonLabel": "پیسٹ کریں", 28 | "selectAllButtonLabel": "سبھی منتخب کریں", 29 | "viewLicensesButtonLabel": "لائسنسز دیکھیں", 30 | "anteMeridiemAbbreviation": "AM", 31 | "postMeridiemAbbreviation": "PM", 32 | "timePickerHourModeAnnouncement": "گھنٹے منتخب کریں", 33 | "timePickerMinuteModeAnnouncement": "منٹ منتخب کریں", 34 | "signedInLabel": "سائن ان", 35 | "hideAccountsLabel": "اکاؤنٹس چھپائیں", 36 | "showAccountsLabel": "اکاؤنٹس دکھائیں", 37 | "modalBarrierDismissLabel": "برطرف" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/unique_widget.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | 7 | import 'framework.dart'; 8 | 9 | /// Base class for stateful widgets that have exactly one inflated instance in 10 | /// the tree. 11 | /// 12 | /// Such widgets must be given a [GlobalKey]. This key can be generated by the 13 | /// subclass from its [Type] object, e.g. by calling `super(key: new 14 | /// GlobalObjectKey(MyWidget))` where `MyWidget` is the name of the subclass. 15 | /// 16 | /// Since only one instance can be inflated at a time, there is only ever one 17 | /// corresponding [State] object. That object is exposed, for convenience, via 18 | /// the [currentState] property. 19 | /// 20 | /// When subclassing [UniqueWidget], provide the corresponding [State] subclass 21 | /// as the type argument. 22 | abstract class UniqueWidget> 23 | extends StatefulWidget { 24 | /// Creates a widget that has exactly one inflated instance in the tree. 25 | /// 26 | /// The [key] argument must not be null because it identifies the unique 27 | /// inflated instance of this widget. 28 | const UniqueWidget({ 29 | @required GlobalKey key, 30 | }) 31 | : super(key: key); 32 | 33 | @override 34 | T createState(); 35 | 36 | /// The state for the unique inflated instance of this widget. 37 | /// 38 | /// Might be null if the widget is not currently in the tree. 39 | T get currentState { 40 | final GlobalKey globalKey = key; 41 | return globalKey.currentState; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_nl.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH:mm", 4 | "openAppDrawerTooltip": "Navigatiemenu openen", 5 | "backButtonTooltip": "Terug", 6 | "closeButtonTooltip": "Sluiten", 7 | "deleteButtonTooltip": "Verwijderen", 8 | "nextMonthTooltip": "Volgende maand", 9 | "previousMonthTooltip": "Vorige maand", 10 | "nextPageTooltip": "Volgende pagina", 11 | "previousPageTooltip": "Vorige pagina", 12 | "showMenuTooltip": "Menu weergeven", 13 | "aboutListTileTitle": "Over $applicationName", 14 | "licensesPageTitle": "Licenties", 15 | "pageRowsInfoTitle": "$firstRow-$lastRow van $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow-$lastRow van ongeveer $rowCount", 17 | "rowsPerPageTitle": "Rijen per pagina:", 18 | "tabLabel": "$tabIndex van $tabCount", 19 | "selectedRowCountTitleOne": "1 item geselecteerd", 20 | "selectedRowCountTitleOther": "$selectedRowCount items geselecteerd", 21 | "cancelButtonLabel": "ANNULEREN", 22 | "closeButtonLabel": "SLUITEN", 23 | "continueButtonLabel": "DOORGAAN", 24 | "copyButtonLabel": "KOPIËREN", 25 | "cutButtonLabel": "KNIPPEN", 26 | "okButtonLabel": "OK", 27 | "pasteButtonLabel": "PLAKKEN", 28 | "selectAllButtonLabel": "ALLES SELECTEREN", 29 | "viewLicensesButtonLabel": "LICENTIES BEKIJKEN", 30 | "anteMeridiemAbbreviation": "am", 31 | "postMeridiemAbbreviation": "pm", 32 | "timePickerHourModeAnnouncement": "Uren selecteren", 33 | "timePickerMinuteModeAnnouncement": "Minuten selecteren", 34 | "signedInLabel": "Ingelogd", 35 | "hideAccountsLabel": "Verberg accounts", 36 | "showAccountsLabel": "Toon accounts", 37 | "modalBarrierDismissLabel": "ontslaan" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_it.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH:mm", 4 | "selectedRowCountTitleOne": "1 elemento selezionato", 5 | "openAppDrawerTooltip": "Apri il menu di navigazione", 6 | "backButtonTooltip": "Indietro", 7 | "closeButtonTooltip": "Chiudi", 8 | "deleteButtonTooltip": "Elimina", 9 | "nextMonthTooltip": "Mese successivo", 10 | "previousMonthTooltip": "Mese precedente", 11 | "nextPageTooltip": "Pagina successiva", 12 | "previousPageTooltip": "Pagina precedente", 13 | "showMenuTooltip": "Mostra il menu", 14 | "aboutListTileTitle": "Informazioni su $applicationName", 15 | "licensesPageTitle": "Licenze", 16 | "pageRowsInfoTitle": "$firstRow-$lastRow di $rowCount", 17 | "pageRowsInfoTitleApproximate": "$firstRow-$lastRow di circa $rowCount", 18 | "rowsPerPageTitle": "Righe per pagina:", 19 | "tabLabel": "$tabIndex di $tabCount", 20 | "selectedRowCountTitleOther": "$selectedRowCount elementi selezionati", 21 | "cancelButtonLabel": "ANNULLA", 22 | "closeButtonLabel": "CHIUDI", 23 | "continueButtonLabel": "CONTINUA", 24 | "copyButtonLabel": "COPIA", 25 | "cutButtonLabel": "TAGLIA", 26 | "okButtonLabel": "OK", 27 | "pasteButtonLabel": "INCOLLA", 28 | "selectAllButtonLabel": "SELEZIONA TUTTO", 29 | "viewLicensesButtonLabel": "VISUALIZZA LICENZE", 30 | "anteMeridiemAbbreviation": "AM", 31 | "postMeridiemAbbreviation": "PM", 32 | "timePickerHourModeAnnouncement": "Seleziona le ore", 33 | "timePickerMinuteModeAnnouncement": "Seleziona i minuti", 34 | "signedInLabel": "Registrato", 35 | "hideAccountsLabel": "Nascondi account", 36 | "showAccountsLabel": "Mostra account", 37 | "modalBarrierDismissLabel": "Ignora" 38 | } 39 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/painting/paint_utilities.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:math' as math; 6 | 7 | import 'basic_types.dart'; 8 | 9 | /// Draw a line between two points, which cuts diagonally back and forth across 10 | /// the line that connects the two points. 11 | /// 12 | /// The line will cross the line `zigs - 1` times. 13 | /// 14 | /// If `zigs` is 1, then this will draw two sides of a triangle from `start` to 15 | /// `end`, with the third point being `width` away from the line, as measured 16 | /// perpendicular to that line. 17 | /// 18 | /// If `width` is positive, the first `zig` will be to the left of the `start` 19 | /// point when facing the `end` point. To reverse the zigging polarity, provide 20 | /// a negative `width`. 21 | /// 22 | /// The line is drawn using the provided `paint` on the provided `canvas`. 23 | void paintZigZag(Canvas canvas, Paint paint, Offset start, Offset end, int zigs, 24 | double width) { 25 | assert(zigs.isFinite); 26 | assert(zigs > 0); 27 | canvas.save(); 28 | canvas.translate(start.dx, start.dy); 29 | end = end - start; 30 | canvas.rotate(math.atan2(end.dy, end.dx)); 31 | final double length = end.distance; 32 | final double spacing = length / (zigs * 2.0); 33 | final Path path = new Path()..moveTo(0.0, 0.0); 34 | for (int index = 0; index < zigs; index += 1) { 35 | final double x = (index * 2.0 + 1.0) * spacing; 36 | final double y = width * ((index % 2.0) * 2.0 - 1.0); 37 | path.lineTo(x, y); 38 | } 39 | path.lineTo(length, 0.0); 40 | canvas.drawPath(path, paint); 41 | canvas.restore(); 42 | } 43 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_he.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "selectedRowCountTitleOne": "פריט אחד נבחר", 5 | "selectedRowCountTitleTwo": "$selectedRowCount פריטים נבחרו", 6 | "selectedRowCountTitleMany": "$selectedRowCount פריטים נבחרו", 7 | "openAppDrawerTooltip": "פתיחה של תפריט הניווט", 8 | "backButtonTooltip": "הקודם", 9 | "closeButtonTooltip": "סגירה", 10 | "deleteButtonTooltip": "מחיקה", 11 | "nextMonthTooltip": "החודש הבא", 12 | "previousMonthTooltip": "החודש הקודם", 13 | "nextPageTooltip": "הדף הבא", 14 | "previousPageTooltip": "הדף הקודם", 15 | "showMenuTooltip": "הצגת התפריט", 16 | "aboutListTileTitle": "מידע על $applicationName", 17 | "licensesPageTitle": "רישיונות", 18 | "pageRowsInfoTitle": "$lastRow–$firstRow מתוך $rowCount", 19 | "pageRowsInfoTitleApproximate": "$lastRow–$firstRow מתוך כ-$rowCount", 20 | "rowsPerPageTitle": "שורות בכל דף:", 21 | "tabLabel": "$tabIndex מתוך $tabCount", 22 | "selectedRowCountTitleOther": "$selectedRowCount פריטים נבחרו", 23 | "cancelButtonLabel": "ביטול", 24 | "closeButtonLabel": "סגירה", 25 | "continueButtonLabel": "המשך", 26 | "copyButtonLabel": "העתקה", 27 | "cutButtonLabel": "גזירה", 28 | "okButtonLabel": "אישור", 29 | "pasteButtonLabel": "הדבקה", 30 | "selectAllButtonLabel": "בחירת הכול", 31 | "viewLicensesButtonLabel": "הצגת הרישיונות", 32 | "anteMeridiemAbbreviation": "AM", 33 | "postMeridiemAbbreviation": "PM", 34 | "timePickerHourModeAnnouncement": "בחירת שעות", 35 | "timePickerMinuteModeAnnouncement": "בחירת דקות", 36 | "signedInLabel": "מחובר", 37 | "hideAccountsLabel": "הסתר חשבונות", 38 | "showAccountsLabel": "הצג חשבונות", 39 | "modalBarrierDismissLabel": "סגירה" 40 | } 41 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_ro.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH:mm", 4 | "openAppDrawerTooltip": "Deschide meniul de navigare", 5 | "backButtonTooltip": "Înapoi", 6 | "closeButtonTooltip": "Închide", 7 | "deleteButtonTooltip": "Șterge", 8 | "nextMonthTooltip": "Luna următoare", 9 | "previousMonthTooltip": "Luna precedentă", 10 | "nextPageTooltip": "Pagina următoare", 11 | "previousPageTooltip": "Pagina precedentă", 12 | "showMenuTooltip": "Afișează meniul", 13 | "aboutListTileTitle": "Despre $applicationName", 14 | "licensesPageTitle": "Licențe", 15 | "pageRowsInfoTitle": "$firstRow – $lastRow din $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow – $lastRow din aproximativ $rowCount", 17 | "rowsPerPageTitle": "Linii pe pagină:", 18 | "tabLabel": "Tab $tabIndex din $tabCount", 19 | "selectedRowCountTitleZero": "Nu există elemente selectate", 20 | "selectedRowCountTitleOne": "1 element selectat", 21 | "selectedRowCountTitleOther": "$selectedRowCount elemente selectate", 22 | "cancelButtonLabel": "ANULEAZĂ", 23 | "closeButtonLabel": "ÎNCHIDE", 24 | "continueButtonLabel": "CONTINUĂ", 25 | "copyButtonLabel": "COPIAZĂ", 26 | "cutButtonLabel": "TAIE", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "LIPEȘTE", 29 | "selectAllButtonLabel": "SELECTEAZĂ TOT", 30 | "viewLicensesButtonLabel": "AFIȘEAZĂ LICENȚELE", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "timePickerHourModeAnnouncement": "Selectați orele", 34 | "timePickerMinuteModeAnnouncement": "Selectați minutele", 35 | "signedInLabel": "Autentificat", 36 | "hideAccountsLabel": "Ascunde conturile", 37 | "showAccountsLabel": "Afișează conturile", 38 | "modalBarrierDismissLabel": "Ignoră" 39 | } -------------------------------------------------------------------------------- /packages/flutter/lib/foundation.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Core Flutter framework primitives. 6 | /// 7 | /// The features defined in this library are the lowest-level utility 8 | /// classes and functions used by all the other layers of the Flutter 9 | /// framework. 10 | library foundation; 11 | 12 | export 'package:meta/meta.dart' 13 | show 14 | immutable, 15 | mustCallSuper, 16 | optionalTypeArgs, 17 | protected, 18 | required, 19 | visibleForTesting; 20 | 21 | // Examples can assume: 22 | // String _name; 23 | // bool _first; 24 | // bool _lights; 25 | // bool _visible; 26 | // bool inherit; 27 | // int columns; 28 | // int rows; 29 | // class Cat { } 30 | // double _volume; 31 | // dynamic _calculation; 32 | // dynamic _last; 33 | // dynamic _selection; 34 | 35 | export 'src/foundation/annotations.dart'; 36 | export 'src/foundation/assertions.dart'; 37 | export 'src/foundation/basic_types.dart'; 38 | export 'src/foundation/binding.dart'; 39 | export 'src/foundation/change_notifier.dart'; 40 | export 'src/foundation/collections.dart'; 41 | export 'src/foundation/debug.dart'; 42 | export 'src/foundation/diagnostics.dart'; 43 | export 'src/foundation/isolates.dart'; 44 | export 'src/foundation/key.dart'; 45 | export 'src/foundation/licenses.dart'; 46 | export 'src/foundation/node.dart'; 47 | export 'src/foundation/observer_list.dart'; 48 | export 'src/foundation/platform.dart'; 49 | export 'src/foundation/print.dart'; 50 | export 'src/foundation/profile.dart'; 51 | export 'src/foundation/serialization.dart'; 52 | export 'src/foundation/synchronous_future.dart'; 53 | export 'src/foundation/unicode.dart'; 54 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_de.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH:mm", 4 | "openAppDrawerTooltip": "Navigationsmenü öffnen", 5 | "backButtonTooltip": "Zurück", 6 | "closeButtonTooltip": "Schließen", 7 | "deleteButtonTooltip": "Löschen", 8 | "nextMonthTooltip": "Nächster Monat", 9 | "previousMonthTooltip": "Vorheriger Monat", 10 | "nextPageTooltip": "Nächste Seite", 11 | "previousPageTooltip": "Vorherige Seite", 12 | "showMenuTooltip": "Menü anzeigen", 13 | "aboutListTileTitle": "Über $applicationName", 14 | "licensesPageTitle": "Lizenzen", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow von $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow von etwa $rowCount", 17 | "rowsPerPageTitle": "Zeilen pro Seite:", 18 | "tabLabel": "Tabulator $tabIndex von $tabCount", 19 | "selectedRowCountTitleZero": "Keine Objekte ausgewählt", 20 | "selectedRowCountTitleOne": "1 Element ausgewählt", 21 | "selectedRowCountTitleOther": "$selectedRowCount Elemente ausgewählt", 22 | "cancelButtonLabel": "ABBRECHEN", 23 | "closeButtonLabel": "SCHLIEẞEN", 24 | "continueButtonLabel": "WEITER", 25 | "copyButtonLabel": "KOPIEREN", 26 | "cutButtonLabel": "AUSSCHNEIDEN", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "EINFÜGEN", 29 | "selectAllButtonLabel": "ALLE AUSWÄHLEN", 30 | "viewLicensesButtonLabel": "LIZENZEN ANZEIGEN", 31 | "anteMeridiemAbbreviation": "VORM.", 32 | "postMeridiemAbbreviation": "NACHM.", 33 | "timePickerHourModeAnnouncement": "Stunden auswählen", 34 | "timePickerMinuteModeAnnouncement": "Minuten auswählen", 35 | "signedInLabel": "Angemeldet", 36 | "hideAccountsLabel": "Konten ausblenden", 37 | "showAccountsLabel": "Konten anzeigen", 38 | "modalBarrierDismissLabel": "Schließen" 39 | } 40 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_es.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "openAppDrawerTooltip": "Abrir el menú de navegación", 5 | "backButtonTooltip": "Atrás", 6 | "closeButtonTooltip": "Cerrar", 7 | "deleteButtonTooltip": "Eliminar", 8 | "nextMonthTooltip": "Mes siguiente", 9 | "previousMonthTooltip": "Mes anterior", 10 | "nextPageTooltip": "Página siguiente", 11 | "previousPageTooltip": "Página anterior", 12 | "showMenuTooltip": "Mostrar menú", 13 | "aboutListTileTitle": "Sobre $applicationName", 14 | "licensesPageTitle": "Licencias", 15 | "pageRowsInfoTitle": "$firstRow‑$lastRow de $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow‑$lastRow de aproximadamente $rowCount", 17 | "rowsPerPageTitle": "Filas por página:", 18 | "tabLabel": "$tabIndex de $tabCount", 19 | "selectedRowCountTitleZero": "No se han seleccionado elementos", 20 | "selectedRowCountTitleOne": "1 elemento seleccionado", 21 | "selectedRowCountTitleOther": "$selectedRowCount elementos seleccionados", 22 | "cancelButtonLabel": "CANCELAR", 23 | "closeButtonLabel": "CERRAR", 24 | "continueButtonLabel": "CONTINUAR", 25 | "copyButtonLabel": "COPIAR", 26 | "cutButtonLabel": "CORTAR", 27 | "okButtonLabel": "ACEPTAR", 28 | "pasteButtonLabel": "PEGAR", 29 | "selectAllButtonLabel": "SELECCIONAR TODO", 30 | "viewLicensesButtonLabel": "VER LICENCIAS", 31 | "anteMeridiemAbbreviation": "A.M.", 32 | "postMeridiemAbbreviation": "P.M.", 33 | "timePickerHourModeAnnouncement": "Seleccionar horas", 34 | "timePickerMinuteModeAnnouncement": "Seleccionar minutos", 35 | "signedInLabel": "Registrado", 36 | "hideAccountsLabel": "Ocultar cuentas", 37 | "showAccountsLabel": "Mostrar cuentas", 38 | "modalBarrierDismissLabel": "Ignorar" 39 | } 40 | -------------------------------------------------------------------------------- /packages/flutter_test/lib/src/stack_manipulation.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // See also test_async_utils.dart which has some stack manipulation code. 6 | 7 | /// Report call site for `expect()` call. Returns the number of frames that 8 | /// should be elided if a stack were to be modified to hide the expect call, or 9 | /// zero if no such call was found. 10 | /// 11 | /// If the head of the stack trace consists of a failure as a result of calling 12 | /// the test_widgets [expect] function, this will fill the given StringBuffer 13 | /// with the precise file and line number that called that function. 14 | int reportExpectCall(StackTrace stack, StringBuffer information) { 15 | final RegExp line0 = new RegExp(r'^#0 +fail \(.+\)$'); 16 | final RegExp line1 = new RegExp(r'^#1 +_expect \(.+\)$'); 17 | final RegExp line2 = new RegExp(r'^#2 +expect \(.+\)$'); 18 | final RegExp line3 = new RegExp(r'^#3 +expect \(.+\)$'); 19 | final RegExp line4 = new RegExp(r'^#4 +[^(]+ \((.+?):([0-9]+)(?::[0-9]+)?\)$'); 20 | final List stackLines = stack.toString().split('\n'); 21 | if (line0.firstMatch(stackLines[0]) != null && 22 | line1.firstMatch(stackLines[1]) != null && 23 | line2.firstMatch(stackLines[2]) != null && 24 | line3.firstMatch(stackLines[3]) != null 25 | ) { 26 | final Match expectMatch = line4.firstMatch(stackLines[4]); 27 | assert(expectMatch != null); 28 | assert(expectMatch.groupCount == 2); 29 | information.writeln('This was caught by the test expectation on the following line:'); 30 | information.writeln(' ${expectMatch.group(1)} line ${expectMatch.group(2)}'); 31 | return 4; 32 | } 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_fr.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH:mm", 4 | "openAppDrawerTooltip": "Ouvrir le menu de navigation", 5 | "backButtonTooltip": "Retour", 6 | "closeButtonTooltip": "Fermer", 7 | "deleteButtonTooltip": "Supprimer", 8 | "nextMonthTooltip": "Mois suivant", 9 | "previousMonthTooltip": "Mois précédent", 10 | "nextPageTooltip": "Page suivante", 11 | "previousPageTooltip": "Page précédente", 12 | "showMenuTooltip": "Afficher le menu", 13 | "aboutListTileTitle": "À propos de $applicationName", 14 | "licensesPageTitle": "Licences", 15 | "pageRowsInfoTitle": "$firstRow – $lastRow sur $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow – $lastRow sur environ $rowCount", 17 | "rowsPerPageTitle": "Lignes par page :", 18 | "tabLabel": "$tabIndex sur $tabCount", 19 | "selectedRowCountTitleZero": "Aucun élément sélectionné", 20 | "selectedRowCountTitleOne": "1 élément sélectionné", 21 | "selectedRowCountTitleOther": "$selectedRowCount éléments sélectionnés", 22 | "cancelButtonLabel": "ANNULER", 23 | "closeButtonLabel": "FERMER", 24 | "continueButtonLabel": "CONTINUER", 25 | "copyButtonLabel": "COPIER", 26 | "cutButtonLabel": "COUPER", 27 | "okButtonLabel": "OK", 28 | "pasteButtonLabel": "COLLER", 29 | "selectAllButtonLabel": "TOUT SÉLECTIONNER", 30 | "viewLicensesButtonLabel": "AFFICHER LES LICENCES", 31 | "anteMeridiemAbbreviation": "AM", 32 | "postMeridiemAbbreviation": "PM", 33 | "timePickerHourModeAnnouncement": "Sélectionner une heure", 34 | "timePickerMinuteModeAnnouncement": "Sélectionner des minutes", 35 | "signedInLabel": "Connecté", 36 | "hideAccountsLabel": "Masquer les comptes", 37 | "showAccountsLabel": "Afficher les comptes", 38 | "modalBarrierDismissLabel": "Ignorer" 39 | } 40 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/services/clipboard.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:flutter2js/flutter_internals.dart' as flutter2js; 8 | import 'package:flutter/foundation.dart'; 9 | 10 | /// Data stored on the system clipboard. 11 | /// 12 | /// The system clipboard can contain data of various media types. This data 13 | /// structure currently supports only plain text data, in the [text] property. 14 | @immutable 15 | class ClipboardData { 16 | /// Creates data for the system clipboard. 17 | const ClipboardData({this.text}); 18 | 19 | /// Plain text variant of this clipboard data. 20 | final String text; 21 | } 22 | 23 | /// Utility methods for interacting with the system's clipboard. 24 | class Clipboard { 25 | Clipboard._(); 26 | 27 | // Constants for common [getData] [format] types. 28 | 29 | /// Plain text data format string. 30 | /// 31 | /// Used with [getData]. 32 | static const String kTextPlain = 'text/plain'; 33 | 34 | /// Stores the given clipboard data on the clipboard. 35 | static Future setData(ClipboardData data) { 36 | return flutter2js.PlatformPlugin.current.clipboardSetData(data); 37 | } 38 | 39 | /// Retrieves data from the clipboard that matches the given format. 40 | /// 41 | /// The `format` argument specifies the media type, such as `text/plain`, of 42 | /// the data to obtain. 43 | /// 44 | /// Returns a future which completes to null if the data could not be 45 | /// obtained, and to a [ClipboardData] object if it could. 46 | static Future getData(String format) { 47 | return flutter2js.PlatformPlugin.current.clipboardGetData(format); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_pl.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "HH:mm", 4 | "selectedRowCountTitleFew": "$selectedRowCount wybrane elementy", 5 | "selectedRowCountTitleMany": "$selectedRowCount wybranych elementów", 6 | "openAppDrawerTooltip": "Otwórz menu nawigacyjne", 7 | "backButtonTooltip": "Wstecz", 8 | "closeButtonTooltip": "Zamknij", 9 | "deleteButtonTooltip": "Usuń", 10 | "nextMonthTooltip": "Następny miesiąc", 11 | "previousMonthTooltip": "Poprzedni miesiąc", 12 | "nextPageTooltip": "Następna strona", 13 | "previousPageTooltip": "Poprzednia strona", 14 | "showMenuTooltip": "Pokaż menu", 15 | "aboutListTileTitle": "$applicationName – informacje", 16 | "licensesPageTitle": "Licencje", 17 | "pageRowsInfoTitle": "$firstRow–$lastRow z $rowCount", 18 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow z około $rowCount", 19 | "rowsPerPageTitle": "Wiersze na stronie:", 20 | "tabLabel": "$tabIndex z $tabCount", 21 | "selectedRowCountTitleOne": "1 wybrany element", 22 | "selectedRowCountTitleOther": "$selectedRowCount wybranego elementu", 23 | "cancelButtonLabel": "ANULUJ", 24 | "closeButtonLabel": "ZAMKNIJ", 25 | "continueButtonLabel": "DALEJ", 26 | "copyButtonLabel": "KOPIUJ", 27 | "cutButtonLabel": "WYTNIJ", 28 | "okButtonLabel": "OK", 29 | "pasteButtonLabel": "WKLEJ", 30 | "selectAllButtonLabel": "ZAZNACZ WSZYSTKO", 31 | "viewLicensesButtonLabel": "WYŚWIETL LICENCJE", 32 | "anteMeridiemAbbreviation": "AM", 33 | "postMeridiemAbbreviation": "PM", 34 | "timePickerHourModeAnnouncement": "Wybierz godziny", 35 | "timePickerMinuteModeAnnouncement": "Wybierz minuty", 36 | "signedInLabel": "Zapisany", 37 | "hideAccountsLabel": "Ukryj konta", 38 | "showAccountsLabel": "Pokaż konta", 39 | "modalBarrierDismissLabel": "oddalić" 40 | } 41 | -------------------------------------------------------------------------------- /examples/stocks/lib/i18n/stock_messages_all.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart 2 | // This is a library that looks up messages for specific locales by 3 | // delegating to the appropriate library. 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:intl/intl.dart'; 8 | import 'package:intl/message_lookup_by_library.dart'; 9 | import 'package:intl/src/intl_helpers.dart'; 10 | 11 | import 'stock_messages_en.dart' as messages_en; 12 | import 'stock_messages_es.dart' as messages_es; 13 | 14 | typedef Future LibraryLoader(); 15 | Map _deferredLibraries = { 16 | 'en': () => new Future.value(null), 17 | 'es': () => new Future.value(null), 18 | }; 19 | 20 | MessageLookupByLibrary _findExact(localeName) { 21 | switch (localeName) { 22 | case 'en': 23 | return messages_en.messages; 24 | case 'es': 25 | return messages_es.messages; 26 | default: 27 | return null; 28 | } 29 | } 30 | 31 | /// User programs should call this before using [localeName] for messages. 32 | Future initializeMessages(String localeName) { 33 | var lib = _deferredLibraries[Intl.canonicalizedLocale(localeName)]; 34 | var load = lib == null ? new Future.value(false) : lib(); 35 | return load.then((_) { 36 | initializeInternalMessageLookup(() => new CompositeMessageLookup()); 37 | messageLookup.addLocale(localeName, _findGeneratedMessagesFor); 38 | }); 39 | } 40 | 41 | bool _messagesExistFor(String locale) { 42 | var messages; 43 | try { 44 | messages = _findExact(locale); 45 | } catch (e) {} 46 | return messages != null; 47 | } 48 | 49 | MessageLookupByLibrary _findGeneratedMessagesFor(locale) { 50 | var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, 51 | onFailure: (_) => null); 52 | if (actualLocale == null) return null; 53 | return _findExact(actualLocale); 54 | } 55 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/cupertino/thumb_painter.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/painting.dart'; 6 | 7 | import 'colors.dart'; 8 | 9 | final MaskFilter _kShadowMaskFilter = 10 | new MaskFilter.blur(BlurStyle.normal, BoxShadow.convertRadiusToSigma(1.0)); 11 | 12 | /// Paints an iOS-style slider thumb. 13 | /// 14 | /// Used by [CupertinoSwitch] and [CupertinoSlider]. 15 | class CupertinoThumbPainter { 16 | /// Creates an object that paints an iOS-style slider thumb. 17 | CupertinoThumbPainter({ 18 | this.color: CupertinoColors.white, 19 | this.shadowColor: const Color(0x2C000000), 20 | }); 21 | 22 | /// The color of the interior of the thumb. 23 | final Color color; 24 | 25 | /// The color of the shadow case by the thumb. 26 | final Color shadowColor; 27 | 28 | /// Half the default diameter of the thumb. 29 | static const double radius = 14.0; 30 | 31 | /// The default amount the thumb should be extended horizontally when pressed. 32 | static const double extension = 7.0; 33 | 34 | /// Paints the thumb onto the given canvas in the given rectangle. 35 | /// 36 | /// Consider using [radius] and [extension] when deciding how large a 37 | /// rectangle to use for the thumb. 38 | void paint(Canvas canvas, Rect rect) { 39 | final RRect rrect = new RRect.fromRectAndRadius( 40 | rect, new Radius.circular(rect.shortestSide / 2.0)); 41 | 42 | final Paint paint = new Paint() 43 | ..color = shadowColor 44 | ..maskFilter = _kShadowMaskFilter; 45 | canvas.drawRRect(rrect, paint); 46 | canvas.drawRRect(rrect.shift(const Offset(0.0, 3.0)), paint); 47 | 48 | paint 49 | ..color = color 50 | ..maskFilter = null; 51 | canvas.drawRRect(rrect, paint); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_ru.arb: -------------------------------------------------------------------------------- 1 | { 2 | "scriptCategory": "English-like", 3 | "timeOfDayFormat": "H:mm", 4 | "selectedRowCountTitleFew": "Выбрано $selectedRowCount объекта", 5 | "selectedRowCountTitleMany": "Выбрано $selectedRowCount объектов", 6 | "openAppDrawerTooltip": "Открыть меню навигации", 7 | "backButtonTooltip": "Назад", 8 | "closeButtonTooltip": "Закрыть", 9 | "deleteButtonTooltip": "Удалить", 10 | "nextMonthTooltip": "Следующий месяц", 11 | "previousMonthTooltip": "Предыдущий месяц", 12 | "nextPageTooltip": "Следующая страница", 13 | "previousPageTooltip": "Предыдущая страница", 14 | "showMenuTooltip": "Показать меню", 15 | "pageRowsInfoTitle": "$firstRow–$lastRow из $rowCount", 16 | "pageRowsInfoTitleApproximate": "$firstRow–$lastRow из примерно $rowCount", 17 | "rowsPerPageTitle": "Строк на странице:", 18 | "tabLabel": "Закладка $tabIndex из $tabCount", 19 | "aboutListTileTitle": "$applicationName: сведения", 20 | "licensesPageTitle": "Лицензии", 21 | "selectedRowCountTitleZero": "Строки не выбраны", 22 | "selectedRowCountTitleOne": "Выбран 1 объект", 23 | "selectedRowCountTitleOther": "Выбрано $selectedRowCount объекта", 24 | "cancelButtonLabel": "ОТМЕНА", 25 | "closeButtonLabel": "ЗАКРЫТЬ", 26 | "continueButtonLabel": "ПРОДОЛЖИТЬ", 27 | "copyButtonLabel": "КОПИРОВАТЬ", 28 | "cutButtonLabel": "ВЫРЕЗАТЬ", 29 | "okButtonLabel": "ОК", 30 | "pasteButtonLabel": "ВСТАВИТЬ", 31 | "selectAllButtonLabel": "ВЫБРАТЬ ВСЕ", 32 | "viewLicensesButtonLabel": "ЛИЦЕНЗИИ", 33 | "anteMeridiemAbbreviation": "АМ", 34 | "postMeridiemAbbreviation": "PM", 35 | "timePickerHourModeAnnouncement": "Выберите часы", 36 | "timePickerMinuteModeAnnouncement": "Выберите минуты", 37 | "signedInLabel": "Залогинен", 38 | "hideAccountsLabel": "Спрятать аккаунты", 39 | "showAccountsLabel": "Показать аккаунты", 40 | "modalBarrierDismissLabel": "Закрыть" 41 | } 42 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_pt.arb: -------------------------------------------------------------------------------- 1 | { 2 | "anteMeridiemAbbreviation": "Manhã", 3 | "selectedRowCountTitleOne": "1 item selecionado", 4 | "postMeridiemAbbreviation": "Tarde/noite", 5 | "scriptCategory": "English-like", 6 | "timeOfDayFormat": "HH:mm", 7 | "@anteMeridiemAbbreviation": {"notUsed":"Pashto time format does not use a.m. indicator"}, 8 | "@postMeridiemAbbreviation": {"notUsed":"Pashto time format does not use p.m. indicator"}, 9 | "openAppDrawerTooltip": "Abrir menu de navegação", 10 | "backButtonTooltip": "Voltar", 11 | "closeButtonTooltip": "Fechar", 12 | "deleteButtonTooltip": "Excluir", 13 | "nextMonthTooltip": "Próximo mês", 14 | "previousMonthTooltip": "Mês anterior", 15 | "nextPageTooltip": "Próxima página", 16 | "previousPageTooltip": "Página anterior", 17 | "showMenuTooltip": "Mostrar menu", 18 | "aboutListTileTitle": "Sobre o app $applicationName", 19 | "licensesPageTitle": "Licenças", 20 | "pageRowsInfoTitle": "$firstRow – $lastRow de $rowCount", 21 | "pageRowsInfoTitleApproximate": "$firstRow – $lastRow de aproximadamente $rowCount", 22 | "rowsPerPageTitle": "Linhas por página:", 23 | "tabLabel": "$tabIndex de $tabCount", 24 | "selectedRowCountTitleOther": "$selectedRowCount itens selecionados", 25 | "cancelButtonLabel": "CANCELAR", 26 | "closeButtonLabel": "FECHAR", 27 | "continueButtonLabel": "CONTINUAR", 28 | "copyButtonLabel": "COPIAR", 29 | "cutButtonLabel": "RECORTAR", 30 | "okButtonLabel": "Ok", 31 | "pasteButtonLabel": "COLAR", 32 | "selectAllButtonLabel": "SELECIONAR TUDO", 33 | "viewLicensesButtonLabel": "VER LICENÇAS", 34 | "timePickerHourModeAnnouncement": "Selecione as horas", 35 | "timePickerMinuteModeAnnouncement": "Selecione os minutos", 36 | "signedInLabel": "Assinado", 37 | "hideAccountsLabel": "Ocultar contas", 38 | "showAccountsLabel": "Mostrar contas", 39 | "modalBarrierDismissLabel": "Dispensar" 40 | } 41 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/scheduler/priority.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | 7 | /// A task priority, as passed to [SchedulerBinding.scheduleTask]. 8 | @immutable 9 | class Priority { 10 | const Priority._(this._value); 11 | 12 | /// The integer that describes this Priority value. 13 | int get value => _value; 14 | final int _value; 15 | 16 | /// A task to run after all other tasks, when no animations are running. 17 | static const Priority idle = const Priority._(0); 18 | 19 | /// A task to run even when animations are running. 20 | static const Priority animation = const Priority._(100000); 21 | 22 | /// A task to run even when the user is interacting with the device. 23 | static const Priority touch = const Priority._(200000); 24 | 25 | /// Maximum offset by which to clamp relative priorities. 26 | /// 27 | /// It is still possible to have priorities that are offset by more 28 | /// than this amount by repeatedly taking relative offsets, but that 29 | /// is generally discouraged. 30 | static const int kMaxOffset = 10000; 31 | 32 | /// Returns a priority relative to this priority. 33 | /// 34 | /// A positive [offset] indicates a higher priority. 35 | /// 36 | /// The parameter [offset] is clamped to ±[kMaxOffset]. 37 | Priority operator +(int offset) { 38 | if (offset.abs() > kMaxOffset) { 39 | // Clamp the input offset. 40 | offset = kMaxOffset * offset.sign; 41 | } 42 | return new Priority._(_value + offset); 43 | } 44 | 45 | /// Returns a priority relative to this priority. 46 | /// 47 | /// A positive offset indicates a lower priority. 48 | /// 49 | /// The parameter [offset] is clamped to ±[kMaxOffset]. 50 | Priority operator -(int offset) => this + (-offset); 51 | } 52 | -------------------------------------------------------------------------------- /packages/flutter_localizations/lib/src/l10n/material_ar.arb: -------------------------------------------------------------------------------- 1 | { 2 | "selectedRowCountTitleOne": "تم اختيار عنصر واحد", 3 | "selectedRowCountTitleZero": "لم يتم اختيار أي عنصر", 4 | "selectedRowCountTitleTwo": "تم اختيار عنصرين ($selectedRowCount)", 5 | "selectedRowCountTitleFew": "تم اختيار $selectedRowCount عنصر", 6 | "selectedRowCountTitleMany": "تم اختيار $selectedRowCount عنصرًا", 7 | "scriptCategory": "tall", 8 | "timeOfDayFormat": "h:mm a", 9 | "openAppDrawerTooltip": "فتح قائمة التنقل", 10 | "backButtonTooltip": "رجوع", 11 | "closeButtonTooltip": "إغلاق", 12 | "deleteButtonTooltip": "حذف", 13 | "nextMonthTooltip": "الشهر التالي", 14 | "previousMonthTooltip": "الشهر السابق", 15 | "nextPageTooltip": "الصفحة التالية", 16 | "previousPageTooltip": "الصفحة السابقة", 17 | "showMenuTooltip": "عرض القائمة", 18 | "aboutListTileTitle": "حول \"$applicationName\"", 19 | "licensesPageTitle": "التراخيص", 20 | "pageRowsInfoTitle": "من $firstRow إلى $lastRow من إجمالي $rowCount", 21 | "pageRowsInfoTitleApproximate": "من $firstRow إلى $lastRow من إجمالي $rowCount تقريبًا", 22 | "rowsPerPageTitle": "عدد الصفوف في الصفحة:", 23 | "tabLabel": "من $tabIndex من إجمالي $tabCount", 24 | "selectedRowCountTitleOther": "تم اختيار $selectedRowCount عنصر", 25 | "cancelButtonLabel": "إلغاء", 26 | "closeButtonLabel": "إغلاق", 27 | "continueButtonLabel": "متابعة", 28 | "copyButtonLabel": "نسخ", 29 | "cutButtonLabel": "قص", 30 | "okButtonLabel": "حسنًا", 31 | "pasteButtonLabel": "لصق", 32 | "selectAllButtonLabel": "اختيار الكل", 33 | "viewLicensesButtonLabel": "الاطّلاع على التراخيص", 34 | "anteMeridiemAbbreviation": "ص", 35 | "postMeridiemAbbreviation": "م", 36 | "timePickerHourModeAnnouncement": "اختيار الساعات", 37 | "timePickerMinuteModeAnnouncement": "اختيار الدقائق", 38 | "signedInLabel": "تم تسجيل الدخول", 39 | "hideAccountsLabel": "إخفاء الحسابات", 40 | "showAccountsLabel": "عرض الحسابات", 41 | "modalBarrierDismissLabel": "تجاهل" 42 | } 43 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/layout_builder.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:flutter/rendering.dart'; 7 | 8 | import 'framework.dart'; 9 | 10 | /// The signature of the [LayoutBuilder] builder function. 11 | typedef Widget LayoutWidgetBuilder( 12 | BuildContext context, BoxConstraints constraints); 13 | 14 | /// Builds a widget tree that can depend on the parent widget's size. 15 | /// 16 | /// Similar to the [Builder] widget except that the framework calls the [builder] 17 | /// function at layout time and provides the parent widget's constraints. This 18 | /// is useful when the parent constrains the child's size and doesn't depend on 19 | /// the child's intrinsic size. The [LayoutBuilder]'s final size will match its 20 | /// child's size. 21 | /// 22 | /// If the child should be smaller than the parent, consider wrapping the child 23 | /// in an [Align] widget. If the child might want to be bigger, consider 24 | /// wrapping it in a [SingleChildScrollView]. 25 | /// 26 | /// See also: 27 | /// 28 | /// * [Builder], which calls a `builder` function at build time. 29 | /// * [StatefulBuilder], which passes its `builder` function a `setState` callback. 30 | /// * [CustomSingleChildLayout], which positions its child during layout. 31 | class LayoutBuilder extends StatelessWidget { 32 | /// Creates a widget that defers its building until layout. 33 | /// 34 | /// The [builder] argument must not be null. 35 | const LayoutBuilder({Key key, @required this.builder}) : super(key: key); 36 | 37 | /// Called at layout time to construct the widget tree. The builder must not 38 | /// return null. 39 | final LayoutWidgetBuilder builder; 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return builder(context, new BoxConstraints()); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/html/ui/html_picture.dart: -------------------------------------------------------------------------------- 1 | import 'dart:html' as html; 2 | 3 | import 'package:flutter/ui.dart'; 4 | 5 | import '../logging.dart'; 6 | import 'html_canvas.dart'; 7 | import 'html_image.dart'; 8 | 9 | typedef Command(HtmlCanvas canvas); 10 | 11 | class HtmlPicture extends Object with HasDebugName implements Picture { 12 | final String debugName; 13 | List _commands; 14 | 15 | HtmlPicture(this._commands) : this.debugName = allocateDebugName( "Picture") { 16 | logConstructor(this); 17 | } 18 | 19 | @override 20 | void dispose() { 21 | _commands = null; 22 | } 23 | 24 | void draw(HtmlCanvas canvas) { 25 | logMethod(this, "draw", arg0:canvas); 26 | for (var command in _commands) { 27 | command(canvas); 28 | } 29 | } 30 | 31 | html.CanvasElement toHtmlElement(int width, int height) { 32 | logMethod(this, "toHtmlElement", arg0:width, arg1:height); 33 | final element = new html.CanvasElement(width:width, height:height); 34 | element.setAttribute("data-kind", "Picture"); 35 | final canvas = new HtmlCanvas(element); 36 | draw(canvas); 37 | return element; 38 | } 39 | 40 | @override 41 | Image toImage(int width, int height) { 42 | final element = toHtmlElement(width, height); 43 | return new HtmlEngineImage(element.toDataUrl(), width: width, height: height); 44 | } 45 | } 46 | 47 | class HtmlPictureRecorder extends Object with HasDebugName implements PictureRecorder { 48 | final String debugName; 49 | List commands = []; 50 | 51 | HtmlPictureRecorder() : this.debugName = allocateDebugName( "PictureRecorder") { 52 | logConstructor(this); 53 | } 54 | 55 | @override 56 | bool get isRecording { 57 | return commands != null; 58 | } 59 | 60 | @override 61 | Picture endRecording() { 62 | logMethod(this, "endRecording"); 63 | final commands = this.commands; 64 | this.commands = null; 65 | return new HtmlPicture(commands); 66 | } 67 | } -------------------------------------------------------------------------------- /packages/flutter/lib/src/physics/tolerance.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// Structure that specifies maximum allowable magnitudes for distances, 6 | /// durations, and velocity differences to be considered equal. 7 | class Tolerance { 8 | /// Creates a [Tolerance] object. By default, the distance, time, and velocity 9 | /// tolerances are all ±0.001; the constructor arguments override this. 10 | /// 11 | /// The arguments should all be positive values. 12 | const Tolerance({ 13 | this.distance = _epsilonDefault, 14 | this.time = _epsilonDefault, 15 | this.velocity = _epsilonDefault 16 | }); 17 | 18 | static const double _epsilonDefault = 1e-3; 19 | 20 | /// A default tolerance of 0.001 for all three values. 21 | static const Tolerance defaultTolerance = Tolerance(); 22 | 23 | /// The magnitude of the maximum distance between two points for them to be 24 | /// considered within tolerance. 25 | /// 26 | /// The units for the distance tolerance must be the same as the units used 27 | /// for the distances that are to be compared to this tolerance. 28 | final double distance; 29 | 30 | /// The magnitude of the maximum duration between two times for them to be 31 | /// considered within tolerance. 32 | /// 33 | /// The units for the time tolerance must be the same as the units used 34 | /// for the times that are to be compared to this tolerance. 35 | final double time; 36 | 37 | /// The magnitude of the maximum difference between two velocities for them to 38 | /// be considered within tolerance. 39 | /// 40 | /// The units for the velocity tolerance must be the same as the units used 41 | /// for the velocities that are to be compared to this tolerance. 42 | final double velocity; 43 | 44 | @override 45 | String toString() => 'Tolerance(distance: ±$distance, time: ±$time, velocity: ±$velocity)'; 46 | } 47 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/title.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:flutter/services.dart'; 7 | 8 | import 'basic.dart'; 9 | import 'framework.dart'; 10 | 11 | /// A widget that describes this app in the operating system. 12 | class Title extends StatelessWidget { 13 | /// Creates a widget that describes this app to the operating system. 14 | /// 15 | /// [title] will default to the empty string if not supplied. 16 | /// [color] must be an opaque color (i.e. color.alpha must be 255 (0xFF)). 17 | /// [color] and [child] are required arguments. 18 | Title({ 19 | Key key, 20 | this.title: '', 21 | @required this.color, 22 | @required this.child, 23 | }) 24 | : super(key: key); 25 | 26 | /// A one-line description of this app for use in the window manager. 27 | /// Must not be null. 28 | final String title; 29 | 30 | /// A color that the window manager should use to identify this app. Must be 31 | /// an opaque color (i.e. color.alpha must be 255 (0xFF)), and must not be 32 | /// null. 33 | final Color color; 34 | 35 | /// The widget below this widget in the tree. 36 | /// 37 | /// {@macro flutter.widgets.child} 38 | final Widget child; 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | SystemChrome 43 | .setApplicationSwitcherDescription(new ApplicationSwitcherDescription( 44 | label: title, 45 | primaryColor: color.value, 46 | )); 47 | return child; 48 | } 49 | 50 | @override 51 | void debugFillProperties(DiagnosticPropertiesBuilder description) { 52 | super.debugFillProperties(description); 53 | description.add(new StringProperty('title', title, defaultValue: '')); 54 | description.add( 55 | new DiagnosticsProperty('color', color, defaultValue: null)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter repo-specific 23 | /bin/cache/ 24 | /bin/mingit/ 25 | /dev/benchmarks/mega_gallery/ 26 | /dev/bots/.recipe_deps 27 | /dev/bots/android_tools/ 28 | /dev/docs/doc/ 29 | /dev/docs/lib/ 30 | /dev/docs/pubspec.yaml 31 | /packages/flutter/coverage/ 32 | version 33 | 34 | # Flutter/Dart/Pub related 35 | **/doc/api/ 36 | .dart_tool/ 37 | .flutter-plugins 38 | .packages 39 | .pub-cache/ 40 | .pub/ 41 | build/ 42 | flutter_*.png 43 | linked_*.ds 44 | unlinked.ds 45 | unlinked_spec.ds 46 | 47 | # Android related 48 | **/android/**/gradle-wrapper.jar 49 | **/android/.gradle 50 | **/android/captures/ 51 | **/android/gradlew 52 | **/android/gradlew.bat 53 | **/android/local.properties 54 | **/android/**/GeneratedPluginRegistrant.java 55 | 56 | # iOS/XCode related 57 | **/ios/**/*.mode1v3 58 | **/ios/**/*.mode2v3 59 | **/ios/**/*.moved-aside 60 | **/ios/**/*.pbxuser 61 | **/ios/**/*.perspectivev3 62 | **/ios/**/*sync/ 63 | **/ios/**/.sconsign.dblite 64 | **/ios/**/.tags* 65 | **/ios/**/.vagrant/ 66 | **/ios/**/DerivedData/ 67 | **/ios/**/Icon? 68 | **/ios/**/Pods/ 69 | **/ios/**/.symlinks/ 70 | **/ios/**/profile 71 | **/ios/**/xcuserdata 72 | **/ios/.generated/ 73 | **/ios/Flutter/App.framework 74 | **/ios/Flutter/Flutter.framework 75 | **/ios/Flutter/Generated.xcconfig 76 | **/ios/Flutter/app.flx 77 | **/ios/Flutter/app.zip 78 | **/ios/Flutter/flutter_assets/ 79 | **/ios/ServiceDefinitions.json 80 | **/ios/Runner/GeneratedPluginRegistrant.* 81 | 82 | # Exceptions to above rules. 83 | !**/ios/**/default.mode1v3 84 | !**/ios/**/default.mode2v3 85 | !**/ios/**/default.pbxuser 86 | !**/ios/**/default.perspectivev3 87 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 88 | 89 | # Added by Flutter2js 90 | /examples/*/ios 91 | /examples/*/android 92 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/status_transitions.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | 7 | import 'basic.dart'; 8 | import 'framework.dart'; 9 | 10 | /// A widget that rebuilds when the given animation changes status. 11 | abstract class StatusTransitionWidget extends StatefulWidget { 12 | /// Initializes fields for subclasses. 13 | /// 14 | /// The [animation] argument must not be null. 15 | const StatusTransitionWidget({Key key, @required this.animation}) 16 | : super(key: key); 17 | 18 | /// The animation to which this widget is listening. 19 | final Animation animation; 20 | 21 | /// Override this method to build widgets that depend on the current status 22 | /// of the animation. 23 | Widget build(BuildContext context); 24 | 25 | @override 26 | _StatusTransitionState createState() => new _StatusTransitionState(); 27 | } 28 | 29 | class _StatusTransitionState extends State { 30 | @override 31 | void initState() { 32 | super.initState(); 33 | widget.animation.addStatusListener(_animationStatusChanged); 34 | } 35 | 36 | @override 37 | void didUpdateWidget(StatusTransitionWidget oldWidget) { 38 | super.didUpdateWidget(oldWidget); 39 | if (widget.animation != oldWidget.animation) { 40 | oldWidget.animation.removeStatusListener(_animationStatusChanged); 41 | widget.animation.addStatusListener(_animationStatusChanged); 42 | } 43 | } 44 | 45 | @override 46 | void dispose() { 47 | widget.animation.removeStatusListener(_animationStatusChanged); 48 | super.dispose(); 49 | } 50 | 51 | void _animationStatusChanged(AnimationStatus status) { 52 | setState(() { 53 | // The animation's state is our build state, and it changed already. 54 | }); 55 | } 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return widget.build(context); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /packages/flutter/lib/painting.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | /// The Flutter painting library. 6 | /// 7 | /// To use, import `package:flutter/painting.dart`. 8 | /// 9 | /// This library includes a variety of classes that wrap the Flutter 10 | /// engine's painting API for more specialized purposes, such as painting scaled 11 | /// images, interpolating between shadows, painting borders around boxes, etc. 12 | /// 13 | /// In particular: 14 | /// 15 | /// * Use the [TextPainter] class for painting text. 16 | /// * Use [Decoration] (and more concretely [BoxDecoration]) for 17 | /// painting boxes. 18 | library painting; 19 | 20 | export 'src/painting/alignment.dart'; 21 | export 'src/painting/basic_types.dart'; 22 | export 'src/painting/binding.dart'; 23 | export 'src/painting/border_radius.dart'; 24 | export 'src/painting/borders.dart'; 25 | export 'src/painting/box_border.dart'; 26 | export 'src/painting/box_decoration.dart'; 27 | export 'src/painting/box_fit.dart'; 28 | export 'src/painting/box_shadow.dart'; 29 | export 'src/painting/circle_border.dart'; 30 | export 'src/painting/colors.dart'; 31 | export 'src/painting/decoration.dart'; 32 | export 'src/painting/decoration_image.dart'; 33 | export 'src/painting/edge_insets.dart'; 34 | export 'src/painting/flutter_logo.dart'; 35 | export 'src/painting/fractional_offset.dart'; 36 | export 'src/painting/geometry.dart'; 37 | export 'src/painting/gradient.dart'; 38 | export 'src/painting/image_cache.dart'; 39 | export 'src/painting/image_decoder.dart'; 40 | export 'src/painting/image_provider.dart'; 41 | export 'src/painting/image_resolution.dart'; 42 | export 'src/painting/image_stream.dart'; 43 | export 'src/painting/matrix_utils.dart'; 44 | export 'src/painting/paint_utilities.dart'; 45 | export 'src/painting/rounded_rectangle_border.dart'; 46 | export 'src/painting/shape_decoration.dart'; 47 | export 'src/painting/stadium_border.dart'; 48 | export 'src/painting/text_painter.dart'; 49 | export 'src/painting/text_span.dart'; 50 | export 'src/painting/text_style.dart'; 51 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/foundation/synchronous_future.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'dart:async'; 6 | 7 | /// A [Future] whose [then] implementation calls the callback immediately. 8 | /// 9 | /// This is similar to [new Future.value], except that the value is available in 10 | /// the same event-loop iteration. 11 | /// 12 | /// ⚠ This class is useful in cases where you want to expose a single API, where 13 | /// you normally want to have everything execute synchronously, but where on 14 | /// rare occasions you want the ability to switch to an asynchronous model. **In 15 | /// general use of this class should be avoided as it is very difficult to debug 16 | /// such bimodal behavior.** 17 | class SynchronousFuture implements Future { 18 | /// Creates a synchronous future. 19 | /// 20 | /// See also [new Future.value]. 21 | SynchronousFuture(this._value); 22 | 23 | final T _value; 24 | 25 | @override 26 | Stream asStream() { 27 | final StreamController controller = new StreamController(); 28 | controller.add(_value); 29 | controller.close(); 30 | return controller.stream; 31 | } 32 | 33 | @override 34 | Future catchError(Function onError, {bool test(dynamic error)}) => 35 | new Completer().future; 36 | 37 | @override 38 | Future then(dynamic f(T value), {Function onError}) { 39 | final dynamic result = f(_value); 40 | if (result is Future) return result; 41 | return new SynchronousFuture(result); 42 | } 43 | 44 | @override 45 | Future timeout(Duration timeLimit, {dynamic onTimeout()}) { 46 | return new Future.value(_value).timeout(timeLimit, onTimeout: onTimeout); 47 | } 48 | 49 | @override 50 | Future whenComplete(dynamic action()) { 51 | try { 52 | final dynamic result = action(); 53 | if (result is Future) return result.then((dynamic value) => _value); 54 | return this; 55 | } catch (e, stack) { 56 | return new Future.error(e, stack); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/bottom_navigation_bar_item.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:flutter/ui.dart' show Color; 7 | 8 | import 'framework.dart'; 9 | 10 | /// An interactive button within either material's [BottomNavigationBar] 11 | /// or the iOS themed [CupertinoTabBar] with an icon and title. 12 | /// 13 | /// This calss is rarely used in isolation. Commonly embedded in one of the 14 | /// bottom navigation widgets above. 15 | /// 16 | /// See also: 17 | /// 18 | /// * [BottomNavigationBar] 19 | /// * 20 | /// * [CupertinoTabBar] 21 | /// * 22 | class BottomNavigationBarItem { 23 | /// Creates an item that is used with [BottomNavigationBar.items]. 24 | /// 25 | /// The arguments [icon] and [title] should not be null. 26 | const BottomNavigationBarItem({ 27 | @required this.icon, 28 | @required this.title, 29 | this.backgroundColor, 30 | }); 31 | 32 | /// The icon of the item. 33 | /// 34 | /// Typically the icon is an [Icon] or an [ImageIcon] widget. If another type 35 | /// of widget is provided then it should configure itself to match the current 36 | /// [IconTheme] size and color. 37 | final Widget icon; 38 | 39 | /// The title of the item. 40 | final Widget title; 41 | 42 | /// The color of the background radial animation for material [BottomNavigationBar]. 43 | /// 44 | /// If the navigation bar's type is [BottomNavigationBarType.shifting], then 45 | /// the entire bar is flooded with the [backgroundColor] when this item is 46 | /// tapped. 47 | /// 48 | /// Not used for [CupertinoTabBar]. Control the invariant bar color directly 49 | /// via [CupertinoTabBar.backgroundColor]. 50 | /// 51 | /// See also: 52 | /// 53 | /// * [Icon.color] and [ImageIcon.color] to control the foreground color of 54 | /// the icons themselves. 55 | final Color backgroundColor; 56 | } 57 | -------------------------------------------------------------------------------- /packages/flutter_test/lib/src/all_elements.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:flutter/widgets.dart'; 7 | 8 | /// Provides an iterable that efficiently returns all the elements 9 | /// rooted at the given element. See [CachingIterable] for details. 10 | /// 11 | /// This method must be called again if the tree changes. You cannot 12 | /// call this function once, then reuse the iterable after having 13 | /// changed the state of the tree, because the iterable returned by 14 | /// this function caches the results and only walks the tree once. 15 | /// 16 | /// The same applies to any iterable obtained indirectly through this 17 | /// one, for example the results of calling `where` on this iterable 18 | /// are also cached. 19 | Iterable collectAllElementsFrom(Element rootElement, { 20 | @required bool skipOffstage, 21 | }) { 22 | return new CachingIterable(new _DepthFirstChildIterator(rootElement, skipOffstage)); 23 | } 24 | 25 | class _DepthFirstChildIterator implements Iterator { 26 | _DepthFirstChildIterator(Element rootElement, this.skipOffstage) 27 | : _stack = _reverseChildrenOf(rootElement, skipOffstage).toList(); 28 | 29 | final bool skipOffstage; 30 | 31 | Element _current; 32 | 33 | final List _stack; 34 | 35 | @override 36 | Element get current => _current; 37 | 38 | @override 39 | bool moveNext() { 40 | if (_stack.isEmpty) 41 | return false; 42 | 43 | _current = _stack.removeLast(); 44 | // Stack children in reverse order to traverse first branch first 45 | _stack.addAll(_reverseChildrenOf(_current, skipOffstage)); 46 | 47 | return true; 48 | } 49 | 50 | static Iterable _reverseChildrenOf(Element element, bool skipOffstage) { 51 | assert(element != null); 52 | final List children = []; 53 | if (skipOffstage) { 54 | element.debugVisitOnstageChildren(children.add); 55 | } else { 56 | element.visitChildren(children.add); 57 | } 58 | return children.reversed; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file serves as the interface between the public and private APIs for 6 | // animated icons. 7 | // The AnimatedIcons class is public and is used to specify available icons, 8 | // while the _AnimatedIconData interface which used to deliver the icon data is 9 | // kept private. 10 | 11 | part of material_animated_icons; 12 | 13 | /// Identifier for the supported material design animated icons. 14 | /// 15 | /// Use with [AnimatedIcon] class to show specific animated icons. 16 | abstract class AnimatedIcons { 17 | /// The material design arrow to menu icon animation. 18 | static const AnimatedIconData arrow_menu = _$arrow_menu; 19 | 20 | /// The material design menu to arrow icon animation. 21 | static const AnimatedIconData menu_arrow = _$menu_arrow; 22 | } 23 | 24 | /// Vector graphics data for icons used by [AnimatedIcon]. 25 | /// 26 | /// Instances of this class are currently opaque because we have not committed to a specific 27 | /// animated vector graphics format. 28 | /// 29 | /// See also: 30 | /// * [AnimatedIcons], a class that contains constants that implement this interface. 31 | abstract class AnimatedIconData { 32 | /// Abstract const constructor. This constructor enables subclasses to provide 33 | /// const constructors so that they can be used in const expressions. 34 | const AnimatedIconData(); 35 | 36 | /// Whether this icon should be mirrored horizontally when text direction is 37 | /// right-to-left. 38 | /// 39 | /// See also: 40 | /// * [TextDirection], which discusses concerns regarding reading direction 41 | /// in Flutter. 42 | /// * [Directionality], a widget which determines the ambient directionality. 43 | bool get matchTextDirection; 44 | } 45 | 46 | class _AnimatedIconData extends AnimatedIconData { 47 | const _AnimatedIconData(this.size, this.paths, 48 | {this.matchTextDirection = false}); 49 | 50 | final Size size; 51 | final List<_PathFrames> paths; 52 | 53 | @override 54 | final bool matchTextDirection; 55 | } 56 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/physics/clamped_simulation.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'simulation.dart'; 6 | 7 | /// A simulation that applies limits to another simulation. 8 | /// 9 | /// The limits are only applied to the other simulation's outputs. For example, 10 | /// if a maximum position was applied to a gravity simulation with the 11 | /// particle's initial velocity being up, and the acceleration being down, and 12 | /// the maximum position being between the initial position and the curve's 13 | /// apogee, then the particle would return to its initial position in the same 14 | /// amount of time as it would have if the maximum had not been applied; the 15 | /// difference would just be that the position would be reported as pinned to 16 | /// the maximum value for the times that it would otherwise have been reported 17 | /// as higher. 18 | class ClampedSimulation extends Simulation { 19 | 20 | /// Creates a [ClampedSimulation] that clamps the given simulation. 21 | /// 22 | /// The named arguments specify the ranges for the clamping behavior, as 23 | /// applied to [x] and [dx]. 24 | ClampedSimulation(this.simulation, { 25 | this.xMin = double.negativeInfinity, 26 | this.xMax = double.infinity, 27 | this.dxMin = double.negativeInfinity, 28 | this.dxMax = double.infinity 29 | }) : assert(simulation != null), 30 | assert(xMax >= xMin), 31 | assert(dxMax >= dxMin); 32 | 33 | /// The simulation being clamped. Calls to [x], [dx], and [isDone] are 34 | /// forwarded to the simulation. 35 | final Simulation simulation; 36 | 37 | /// The minimum to apply to [x]. 38 | final double xMin; 39 | 40 | /// The maximum to apply to [x]. 41 | final double xMax; 42 | 43 | /// The minimum to apply to [dx]. 44 | final double dxMin; 45 | 46 | /// The maximum to apply to [dx]. 47 | final double dxMax; 48 | 49 | @override 50 | double x(double time) => simulation.x(time).clamp(xMin, xMax); 51 | 52 | @override 53 | double dx(double time) => simulation.dx(time).clamp(dxMin, dxMax); 54 | 55 | @override 56 | bool isDone(double time) => simulation.isDone(time); 57 | } 58 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/material/grid_tile.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | import 'package:flutter/widgets.dart'; 7 | 8 | /// A tile in a material design grid list. 9 | /// 10 | /// A grid list is a [GridView] of tiles in a vertical and horizontal 11 | /// array. Each tile typically contains some visually rich content (e.g., an 12 | /// image) together with a [GridTileBar] in either a [header] or a [footer]. 13 | /// 14 | /// See also: 15 | /// 16 | /// * [GridView], which is a scrollable grid of tiles. 17 | /// * [GridTileBar], which is typically used in either the [header] or 18 | /// [footer]. 19 | /// * 20 | class GridTile extends StatelessWidget { 21 | /// Creates a grid tile. 22 | /// 23 | /// Must have a child. Does not typically have both a header and a footer. 24 | const GridTile({ 25 | Key key, 26 | this.header, 27 | this.footer, 28 | @required this.child, 29 | }) 30 | : super(key: key); 31 | 32 | /// The widget to show over the top of this grid tile. 33 | /// 34 | /// Typically a [GridTileBar]. 35 | final Widget header; 36 | 37 | /// The widget to show over the bottom of this grid tile. 38 | /// 39 | /// Typically a [GridTileBar]. 40 | final Widget footer; 41 | 42 | /// The widget that fills the tile. 43 | /// 44 | /// {@macro flutter.widgets.child} 45 | final Widget child; 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | if (header == null && footer == null) return child; 50 | 51 | final List children = [ 52 | new Positioned.fill( 53 | child: child, 54 | ), 55 | ]; 56 | if (header != null) { 57 | children.add(new Positioned( 58 | top: 0.0, 59 | left: 0.0, 60 | right: 0.0, 61 | child: header, 62 | )); 63 | } 64 | if (footer != null) { 65 | children.add(new Positioned( 66 | left: 0.0, 67 | bottom: 0.0, 68 | right: 0.0, 69 | child: footer, 70 | )); 71 | } 72 | return new Stack(children: children); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/foundation/platform.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter2js/core.dart' as flutter2js; 6 | 7 | /// The platform that user interaction should adapt to target. 8 | /// 9 | /// The [defaultTargetPlatform] getter returns the current platform. 10 | enum TargetPlatform { 11 | /// Android: 12 | android, 13 | 14 | /// Fuchsia: 15 | fuchsia, 16 | 17 | /// iOS: 18 | iOS, 19 | } 20 | 21 | /// The [TargetPlatform] that matches the platform on which the framework is 22 | /// currently executing. 23 | /// 24 | /// In a test environment, the platform returned is [TargetPlatform.android] 25 | /// regardless of the host platform. (Android was chosen because the tests were 26 | /// originally written assuming Android-like behavior, and we added platform 27 | /// adaptations for iOS later). Tests can check iOS behavior by using the 28 | /// platform override APIs (such as [ThemeData.platform] in the material 29 | /// library) or by setting [debugDefaultTargetPlatformOverride]. The value 30 | /// can only be explicitly set in debug mode. 31 | TargetPlatform get defaultTargetPlatform { 32 | final result = debugDefaultTargetPlatformOverride; 33 | if (result != null) { 34 | return result; 35 | } 36 | final deviceInfo = flutter2js.DeviceInfo.current; 37 | switch (deviceInfo.operatingSystemType) { 38 | case flutter2js.OperatingSystemType.ios: 39 | return TargetPlatform.iOS; 40 | case flutter2js.OperatingSystemType.fuchsia: 41 | return TargetPlatform.fuchsia; 42 | default: 43 | return TargetPlatform.android; 44 | } 45 | } 46 | 47 | /// Override the [defaultTargetPlatform]. 48 | /// 49 | /// Setting this to null returns the [defaultTargetPlatform] to its original 50 | /// value (based on the actual current platform). 51 | /// 52 | /// This setter is only available intended for debugging purposes. To change the 53 | /// target platform in release builds, use the platform override APIs (such as 54 | /// [ThemeData.platform] in the material library). 55 | TargetPlatform debugDefaultTargetPlatformOverride; 56 | -------------------------------------------------------------------------------- /examples/stocks/lib/stock_types.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | 7 | enum StockMode { optimistic, pessimistic } 8 | enum BackupMode { enabled, disabled } 9 | 10 | class StockConfiguration { 11 | StockConfiguration({ 12 | @required this.stockMode, 13 | @required this.backupMode, 14 | @required this.debugShowGrid, 15 | @required this.debugShowSizes, 16 | @required this.debugShowBaselines, 17 | @required this.debugShowLayers, 18 | @required this.debugShowPointers, 19 | @required this.debugShowRainbow, 20 | @required this.showPerformanceOverlay, 21 | @required this.showSemanticsDebugger 22 | }); 23 | 24 | final StockMode stockMode; 25 | final BackupMode backupMode; 26 | final bool debugShowGrid; 27 | final bool debugShowSizes; 28 | final bool debugShowBaselines; 29 | final bool debugShowLayers; 30 | final bool debugShowPointers; 31 | final bool debugShowRainbow; 32 | final bool showPerformanceOverlay; 33 | final bool showSemanticsDebugger; 34 | 35 | StockConfiguration copyWith({ 36 | StockMode stockMode, 37 | BackupMode backupMode, 38 | bool debugShowGrid, 39 | bool debugShowSizes, 40 | bool debugShowBaselines, 41 | bool debugShowLayers, 42 | bool debugShowPointers, 43 | bool debugShowRainbow, 44 | bool showPerformanceOverlay, 45 | bool showSemanticsDebugger 46 | }) { 47 | return new StockConfiguration( 48 | stockMode: stockMode ?? this.stockMode, 49 | backupMode: backupMode ?? this.backupMode, 50 | debugShowGrid: debugShowGrid ?? this.debugShowGrid, 51 | debugShowSizes: debugShowSizes ?? this.debugShowSizes, 52 | debugShowBaselines: debugShowBaselines ?? this.debugShowBaselines, 53 | debugShowLayers: debugShowLayers ?? this.debugShowLayers, 54 | debugShowPointers: debugShowPointers ?? this.debugShowPointers, 55 | debugShowRainbow: debugShowRainbow ?? this.debugShowRainbow, 56 | showPerformanceOverlay: showPerformanceOverlay ?? this.showPerformanceOverlay, 57 | showSemanticsDebugger: showSemanticsDebugger ?? this.showSemanticsDebugger 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/gestures/debug.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/foundation.dart'; 6 | 7 | // Any changes to this file should be reflected in the debugAssertAllGesturesVarsUnset() 8 | // function below. 9 | 10 | /// Whether to print the results of each hit test to the console. 11 | /// 12 | /// When this is set, in debug mode, any time a hit test is triggered by the 13 | /// [GestureBinding] the results are dumped to the console. 14 | /// 15 | /// This has no effect in release builds. 16 | bool debugPrintHitTestResults = false; 17 | 18 | /// Prints information about gesture recognizers and gesture arenas. 19 | /// 20 | /// This flag only has an effect in debug mode. 21 | /// 22 | /// See also: 23 | /// 24 | /// * [GestureArenaManager], the class that manages gesture arenas. 25 | /// * [debugPrintRecognizerCallbacksTrace], for debugging issues with 26 | /// gesture recognizers. 27 | bool debugPrintGestureArenaDiagnostics = false; 28 | 29 | /// Logs a message every time a gesture recognizer callback is invoked. 30 | /// 31 | /// This flag only has an effect in debug mode. 32 | /// 33 | /// This is specifically used by [GestureRecognizer.invokeCallback]. Gesture 34 | /// recognizers that do not use this method to invoke callbacks may not honor 35 | /// the [debugPrintRecognizerCallbacksTrace] flag. 36 | /// 37 | /// See also: 38 | /// 39 | /// * [debugPrintGestureArenaDiagnostics], for debugging issues with gesture 40 | /// arenas. 41 | bool debugPrintRecognizerCallbacksTrace = false; 42 | 43 | /// Returns true if none of the gestures library debug variables have been changed. 44 | /// 45 | /// This function is used by the test framework to ensure that debug variables 46 | /// haven't been inadvertently changed. 47 | /// 48 | /// See [https://docs.flutter.io/flutter/gestures/gestures-library.html] for 49 | /// a complete list. 50 | bool debugAssertAllGesturesVarsUnset(String reason) { 51 | assert(() { 52 | if (debugPrintHitTestResults || 53 | debugPrintGestureArenaDiagnostics || 54 | debugPrintRecognizerCallbacksTrace) throw new FlutterError(reason); 55 | return true; 56 | }()); 57 | return true; 58 | } 59 | -------------------------------------------------------------------------------- /packages/flutter2js/lib/src/html/html_routing_plugins.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:html' as html; 3 | 4 | import 'package:flutter/widgets.dart'; 5 | import 'package:flutter2js/core.dart'; 6 | 7 | class UrlFragmentRoutingPlugin extends RoutingPlugin { 8 | @override 9 | String get current { 10 | var value = html.window.location.hash; 11 | 12 | // Remove hash 13 | if (value.startsWith("#")) value = value.substring(1); 14 | 15 | // Handle special cases 16 | if (value == "") { 17 | return Navigator.defaultRouteName; 18 | } 19 | print("Route is: ${value}"); 20 | 21 | // Return route 22 | return value; 23 | } 24 | 25 | @override 26 | Stream get stream => html.window.onHashChange.map((event) => current); 27 | 28 | @override 29 | void assign(String value) { 30 | html.window.location.hash = value; 31 | } 32 | 33 | @override 34 | void push(String value) { 35 | html.window.location.hash = value; 36 | } 37 | } 38 | 39 | class UrlPathRoutingPlugin extends RoutingPlugin { 40 | final String prefix; 41 | 42 | final StreamController _streamController = 43 | new StreamController(); 44 | 45 | UrlPathRoutingPlugin({this.prefix: ""}) { 46 | html.window.onPopState.listen((event) { 47 | assign(current); 48 | }); 49 | } 50 | 51 | @override 52 | String get current { 53 | var value = html.window.history.state as String; 54 | 55 | // Handle special cases 56 | if (value == null || value == "") { 57 | return Navigator.defaultRouteName; 58 | } 59 | 60 | // Remove prefix 61 | if (value.startsWith(prefix)) { 62 | value = value.substring(prefix.length); 63 | } 64 | return value; 65 | } 66 | 67 | @override 68 | Stream get stream => _streamController.stream; 69 | 70 | @override 71 | void assign(String value) { 72 | // Fire an event 73 | _streamController.add(value); 74 | 75 | // Replace state 76 | value = "${prefix}${value}"; 77 | html.window.history.replaceState(value, "", value); 78 | } 79 | 80 | @override 81 | void push(String value) { 82 | // Fire an event 83 | _streamController.add(value); 84 | 85 | // Push state 86 | value = "${prefix}${value}"; 87 | html.window.history.pushState(value, "", value); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /packages/flutter/lib/src/widgets/texture.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import 'package:flutter/rendering.dart'; 6 | import 'package:flutter/foundation.dart'; 7 | import 'framework.dart'; 8 | 9 | /// A rectangle upon which a backend texture is mapped. 10 | /// 11 | /// Backend textures are images that can be applied (mapped) to an area of the 12 | /// Flutter view. They are created, managed, and updated using a 13 | /// platform-specific texture registry. This is typically done by a plugin 14 | /// that integrates with host platform video player, camera, or OpenGL APIs, 15 | /// or similar image sources. 16 | /// 17 | /// A texture widget refers to its backend texture using an integer ID. Texture 18 | /// IDs are obtained from the texture registry and are scoped to the Flutter 19 | /// view. Texture IDs may be reused after deregistration, at the discretion 20 | /// of the registry. The use of texture IDs currently unknown to the registry 21 | /// will silently result in a blank rectangle. 22 | /// 23 | /// Texture widgets are repainted autonomously as dictated by the backend (e.g. 24 | /// on arrival of a video frame). Such repainting generally does not involve 25 | /// executing Dart code. 26 | /// 27 | /// The size of the rectangle is determined by its parent widget, and the 28 | /// texture is automatically scaled to fit. 29 | /// 30 | /// See also: 31 | /// 32 | /// * 33 | /// for how to create and manage backend textures on Android. 34 | /// * 35 | /// for how to create and manage backend textures on iOS. 36 | class Texture extends LeafRenderObjectWidget { 37 | /// Creates a widget backed by the texture identified by [textureId]. 38 | const Texture({Key key, @required this.textureId}) : super(key: key); 39 | 40 | /// The identity of the backend texture. 41 | final int textureId; 42 | 43 | @override 44 | TextureBox createRenderObject(BuildContext context) => 45 | new TextureBox(textureId: textureId); 46 | 47 | @override 48 | void updateRenderObject(BuildContext context, TextureBox renderObject) { 49 | renderObject.textureId = textureId; 50 | } 51 | } 52 | --------------------------------------------------------------------------------