flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.17k stars 27.48k forks source link

Integration tests not working with localization #84053

Open jarinrocks opened 3 years ago

jarinrocks commented 3 years ago
 (The following exception is now available via WidgetTester.takeException:)
I/flutter (13360): ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
I/flutter (13360): The following TestFailure object was thrown running a test:
I/flutter (13360):   Expected: exactly one matching node in the widget tree
I/flutter (13360):   Actual: _TextFinder:<zero widgets with text "Select Your Language" (ignoring offstage widgets)>
I/flutter (13360):    Which: means none were found but one was expected
I/flutter (13360):
I/flutter (13360): When the exception was thrown, this was the stack:
I/flutter (13360): #4      main.<anonymous closure>.<anonymous closure> (file:///D:/FlutterLearning/flutter_integration_test/integration_test/end_test.dart:20:11)
I/flutter (13360): <asynchronous suspension>
I/flutter (13360): <asynchronous suspension>
I/flutter (13360): (elided one frame from package:stack_trace)
I/flutter (13360): ...
I/flutter (13360):
I/flutter (13360): This was caught by the test expectation on the following line:
I/flutter (13360):   file:///D:/FlutterLearning/flutter_integration_test/integration_test/end_test.dart line 20
I/flutter (13360): The test description was:
I/flutter (13360):   find a widget
I/flutter (13360): (If WidgetTester.takeException is called, the above exception will be ignored. If it is not, then the above exception will be dumped when another exception is caught
by the framework or when the test ends, whichever happens first, and then the test will fail due to having not caught or expected the exception.)

// Integration test code

import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';

// The application under test.
import 'package:flutter_integration_test/main.dart' as app;

void main() {
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();

  group('end-to-end test', () {
    testWidgets('find a widget',
            (WidgetTester tester) async {
          app.main();
          await tester.pumpAndSettle();
          final Finder fab = find.text('Select Your Language');
          expect(fab, findsOneWidget);
        });
  });
}

// Test Driver

import 'package:integration_test/integration_test_driver.dart';

Future<void> main() => integrationDriver();

// Main screen

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'AppTranslationsDelegate.dart';
import 'AppTranslations.dart';
import 'Applications.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget{
  @override
  MyAppState createState() => MyAppState();
  }

class MyAppState extends State<MyApp> {

  late AppTranslationsDelegate _newLocaleDelegate;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _newLocaleDelegate = AppTranslationsDelegate(newLocale: Locale("en", ""));
    application.onLocaleChanged = onLocaleChange;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(

        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Sample'),
      localizationsDelegates: [
        _newLocaleDelegate,
        //provides localised strings
        GlobalMaterialLocalizations.delegate,
        //provides RTL support
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: [
        const Locale("en", ""),
        const Locale("es", ""),
      ],
    );
  }

  void onLocaleChange(Locale locale) {
    setState(() {
      _newLocaleDelegate = AppTranslationsDelegate(newLocale: locale);
    });
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Text(AppTranslations.of(context)!.text('select_ur_lang')),
      ),
    );
  }
}

// Application class

import 'dart:ui';

class Application {

  static final Application _application = Application._internal();

  factory Application() {
    return _application;
  }

  Application._internal();

  final Map<dynamic, dynamic>
  supportedLanguages = {
    'English (United States)' : "en",
    'Vietnamese ' : "vn",
    'Thai' : "en",
    'Japanese' : "en",
    'Korean' : "en"
  };

  // //returns the list of supported Locales
  // Iterable<Locale> supportedLocales() =>
  //     supportedLanguages.values.toList().map<Locale>((language) => Locale(language, ""));

  //function to be invoked when changing the language
  late LocaleChangeCallback onLocaleChanged;
}

Application application = Application();

typedef void LocaleChangeCallback(Locale locale);

// App Translation

import 'dart:async';
import 'dart:convert';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;

class AppTranslations {
  late Locale locale;
  static Map<dynamic, dynamic> _localisedValues = {};

  AppTranslations(Locale locale) {
    this.locale = locale;
  }

  static AppTranslations? of(BuildContext context) {
    return Localizations.of<AppTranslations>(context, AppTranslations);
  }

  static Future<AppTranslations> load(Locale locale) async {
    AppTranslations appTranslations = AppTranslations(locale);
    String jsonContent = await rootBundle
        .loadString("assets/locale/localization_${locale.languageCode}.json");
    _localisedValues = json.decode(jsonContent);
    return appTranslations;
  }

  get currentLanguage => locale.languageCode;

  String text(String key) {
    return _localisedValues[key] ?? "$key not found";
  }
}

// App Translation Delegate

import 'dart:async';
import 'package:flutter/material.dart';

import 'AppTranslations.dart';
import 'Applications.dart';

class AppTranslationsDelegate extends LocalizationsDelegate<AppTranslations> {
  final Locale newLocale;

  const AppTranslationsDelegate({required this.newLocale});

  @override
  bool isSupported(Locale locale) {
    return application.supportedLanguages.values.toList().contains(locale.languageCode);
  }

  @override
  Future<AppTranslations> load(Locale locale) {
    return AppTranslations.load(newLocale);
  }

  @override
  bool shouldReload(LocalizationsDelegate<AppTranslations> old) {
    return true;
  }
}

// Pubspec


name: flutter_integration_test
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  flutter_localizations:
    sdk: flutter

  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  integration_test:
    sdk: flutter
  flutter_driver:
    sdk: flutter

# The following section is specific to Flutter.
flutter:

  uses-material-design: true

  assets:
    - assets/locale/

// localization_en.json

{
  "select_ur_lang": "Select Your Language"
}

// flutter doctor -v


[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19041.985], locale en-IN)
    • Flutter version 2.2.0 at C:\Src\flutter
    • Framework revision b22742018b (3 weeks ago), 2021-05-14 19:12:57 -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\jarinrocks\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[√] IntelliJ IDEA Community Edition (version 2019.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.1
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] Connected device (3 available)
    • Moto G 4 (mobile) • ZY223SPVZP • android-arm    • Android 7.0 (API 24)
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 90.0.4430.212
    • Edge (web)        • edge       • web-javascript • Microsoft Edge 91.0.864.37

! Doctor found issues in 1 category.

D:\FlutterLearning\flutter_integration_test>t plugin can be installed from:
't' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>       https://plugins.jetbrains.com/plugin/6351-dart
'https:' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
'•' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>
D:\FlutterLearning\flutter_integration_test>[√] IntelliJ IDEA Community Edition (version 2019.1)
'[√]' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.1
'•' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>    • Flutter plugin can be installed from:
'•' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>       https://plugins.jetbrains.com/plugin/9212-flutter
'https:' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>    • Dart plugin can be installed from:
'•' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>       https://plugins.jetbrains.com/plugin/6351-dart
'https:' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>
D:\FlutterLearning\flutter_integration_test>[√] Connected device (3 available)
'[√]' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>    • Moto G 4 (mobile) • ZY223SPVZP • android-arm    • Android 7.0 (API 24)
'•' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>    • Chrome (web)      • chrome     • web-javascript • Google Chrome 90.0.4430.212
'•' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>    • Edge (web)        • edge       • web-javascript • Microsoft Edge 91.0.864.37
'•' is not recognized as an internal or external command,
operable program or batch file.

D:\FlutterLearning\flutter_integration_test>
D:\FlutterLearning\flutter_integration_test>! Doctor found issues in 1 category.
'!' is not recognized as an internal or external command,
operable program or batch file.

// flutter --verbose

[ +173 ms] executing: [C:\Src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +125 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +1 ms] b22742018b3edf16c6cadd7b76d9db5e7f9064b5
[   +2 ms] executing: [C:\Src\flutter/] git tag --points-at b22742018b3edf16c6cadd7b76d9db5e7f9064b5
[  +95 ms] Exit code 0 from: git tag --points-at b22742018b3edf16c6cadd7b76d9db5e7f9064b5
[   +1 ms] 2.2.0
[  +11 ms] executing: [C:\Src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +72 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] origin/stable
[   +1 ms] executing: [C:\Src\flutter/] git ls-remote --get-url origin
[  +60 ms] Exit code 0 from: git ls-remote --get-url origin
[   +1 ms] https://github.com/flutter/flutter.git
[ +216 ms] executing: [C:\Src\flutter/] git rev-parse --abbrev-ref HEAD
[  +76 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +1 ms] stable
[ +168 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +6 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +125 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +86 ms] List of devices attached
           ZY223SPVZP             device product:athene_f model:Moto_G__4_ device:athene_f transport_id:1
[  +14 ms] C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP shell getprop
[ +148 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +226 ms] Running "flutter pub get" in flutter_integration_test...
[   +7 ms] Using C:\Src\flutter\.pub-cache for the pub cache.
[   +2 ms] executing: [D:\FlutterLearning\flutter_integration_test/] C:\Src\flutter\bin\cache\dart-sdk\bin\pub.bat --verbose get --no-precompile
[ +212 ms] FINE: Pub 2.13.0
[ +140 ms] MSG : Resolving dependencies...
[  +53 ms] SLVR: fact: flutter_integration_test is 1.0.0+1
[  +14 ms] SLVR: derived: flutter_integration_test
[  +63 ms] SLVR: fact: flutter_integration_test depends on flutter any from sdk
[   +2 ms] SLVR: fact: flutter_integration_test depends on flutter_localizations any from sdk
[   +4 ms] SLVR: fact: flutter_integration_test depends on cupertino_icons ^1.0.2
[   +1 ms] SLVR: fact: flutter_integration_test depends on flutter_test any from sdk
[   +2 ms] SLVR: fact: flutter_integration_test depends on integration_test any from sdk
[   +1 ms] SLVR: fact: flutter_integration_test depends on flutter_driver any from sdk
[   +1 ms] SLVR:   selecting flutter_integration_test
[   +1 ms] SLVR:   derived: flutter_driver any from sdk
[   +2 ms] SLVR:   derived: integration_test any from sdk
[   +1 ms] SLVR:   derived: flutter_test any from sdk
[   +1 ms] SLVR:   derived: cupertino_icons ^1.0.2
[   +1 ms] SLVR:   derived: flutter_localizations any from sdk
[   +1 ms] SLVR:   derived: flutter any from sdk
[  +30 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on file 6.1.0
[   +2 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on flutter any from sdk
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on flutter_test any from sdk
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on fuchsia_remote_debug_protocol any from sdk
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on path 1.8.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on meta 1.3.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on vm_service 6.2.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on webdriver 3.0.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on archive 3.1.2
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on async 2.6.1
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on boolean_selector 2.1.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on characters 1.1.0
[   +4 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on charcode 1.2.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on clock 1.1.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on collection 1.15.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on crypto 3.0.1
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on matcher 0.12.10
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on platform 3.0.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on process 4.2.1
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on source_span 1.8.1
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on stack_trace 1.10.0
[        ] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on stream_channel 2.1.0
[        ] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on string_scanner 1.1.0
[   +2 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on sync_http 0.3.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on term_glyph 1.2.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on test_api 0.3.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on typed_data 1.3.0
[   +1 ms] SLVR:   fact: flutter_driver 0.0.0 from sdk depends on vector_math 2.1.0
[   +1 ms] SLVR:     selecting flutter_driver 0.0.0 from sdk
[   +1 ms] SLVR:     derived: vector_math 2.1.0
[   +1 ms] SLVR:     derived: typed_data 1.3.0
[   +1 ms] SLVR:     derived: test_api 0.3.0
[   +1 ms] SLVR:     derived: term_glyph 1.2.0
[   +1 ms] SLVR:     derived: sync_http 0.3.0
[   +1 ms] SLVR:     derived: string_scanner 1.1.0
[   +3 ms] SLVR:     derived: stream_channel 2.1.0
[   +1 ms] SLVR:     derived: stack_trace 1.10.0
[   +1 ms] SLVR:     derived: source_span 1.8.1
[   +1 ms] SLVR:     derived: process 4.2.1
[   +1 ms] SLVR:     derived: platform 3.0.0
[   +1 ms] SLVR:     derived: matcher 0.12.10
[   +1 ms] SLVR:     derived: crypto 3.0.1
[   +1 ms] SLVR:     derived: collection 1.15.0
[   +2 ms] SLVR:     derived: clock 1.1.0
[   +3 ms] SLVR:     derived: charcode 1.2.0
[   +1 ms] SLVR:     derived: characters 1.1.0
[   +1 ms] SLVR:     derived: boolean_selector 2.1.0
[   +1 ms] SLVR:     derived: async 2.6.1
[   +1 ms] SLVR:     derived: archive 3.1.2
[   +1 ms] SLVR:     derived: webdriver 3.0.0
[   +1 ms] SLVR:     derived: vm_service 6.2.0
[   +1 ms] SLVR:     derived: meta 1.3.0
[   +1 ms] SLVR:     derived: path 1.8.0
[   +1 ms] SLVR:     derived: fuchsia_remote_debug_protocol any from sdk
[   +1 ms] SLVR:     derived: file 6.1.0
[   +2 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on flutter any from sdk
[  +17 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on flutter_driver any from sdk
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on flutter_test any from sdk
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on path 1.8.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on vm_service 6.2.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on archive 3.1.2
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on async 2.6.1
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on boolean_selector 2.1.0
[        ] SLVR:     fact: integration_test 0.0.0 from sdk depends on characters 1.1.0
[        ] SLVR:     fact: integration_test 0.0.0 from sdk depends on charcode 1.2.0
[        ] SLVR:     fact: integration_test 0.0.0 from sdk depends on clock 1.1.0
[        ] SLVR:     fact: integration_test 0.0.0 from sdk depends on collection 1.15.0
[   +3 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on crypto 3.0.1
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on fake_async 1.2.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on file 6.1.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on matcher 0.12.10
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on meta 1.3.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on source_span 1.8.1
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on stack_trace 1.10.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on stream_channel 2.1.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on string_scanner 1.1.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on sync_http 0.3.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on term_glyph 1.2.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on test_api 0.3.0
[   +4 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on typed_data 1.3.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on vector_math 2.1.0
[   +1 ms] SLVR:     fact: integration_test 0.0.0 from sdk depends on webdriver 3.0.0
[   +1 ms] SLVR:       selecting integration_test 0.0.0 from sdk
[   +1 ms] SLVR:       derived: fake_async 1.2.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on flutter any from sdk
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on test_api 0.3.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on path 1.8.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on fake_async 1.2.0
[   +2 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on clock 1.1.0
[   +3 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on stack_trace 1.10.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on vector_math 2.1.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on async 2.6.1
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on boolean_selector 2.1.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on characters 1.1.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on charcode 1.2.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on collection 1.15.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on matcher 0.12.10
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on meta 1.3.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on source_span 1.8.1
[   +3 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on stream_channel 2.1.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on string_scanner 1.1.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on term_glyph 1.2.0
[   +1 ms] SLVR:       fact: flutter_test 0.0.0 from sdk depends on typed_data 1.3.0
[   +1 ms] SLVR:         selecting flutter_test 0.0.0 from sdk
[   +1 ms] SLVR:           selecting cupertino_icons 1.0.3
[   +6 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on flutter any from sdk
[   +2 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on intl 0.17.0
[   +1 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on characters 1.1.0
[   +2 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on clock 1.1.0
[   +1 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on collection 1.15.0
[   +1 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on meta 1.3.0
[   +1 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on path 1.8.0
[   +1 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on typed_data 1.3.0
[   +1 ms] SLVR:           fact: flutter_localizations 0.0.0 from sdk depends on vector_math 2.1.0
[   +1 ms] SLVR:             selecting flutter_localizations 0.0.0 from sdk
[   +1 ms] SLVR:             derived: intl 0.17.0
[   +5 ms] SLVR:             fact: flutter 0.0.0 from sdk depends on characters 1.1.0
[   +1 ms] SLVR:             fact: flutter 0.0.0 from sdk depends on collection 1.15.0
[   +2 ms] SLVR:             fact: flutter 0.0.0 from sdk depends on meta 1.3.0
[   +1 ms] SLVR:             fact: flutter 0.0.0 from sdk depends on typed_data 1.3.0
[   +1 ms] SLVR:             fact: flutter 0.0.0 from sdk depends on vector_math 2.1.0
[   +1 ms] SLVR:             fact: flutter 0.0.0 from sdk depends on sky_engine any from sdk
[   +1 ms] SLVR:               selecting flutter 0.0.0 from sdk
[   +2 ms] SLVR:               derived: sky_engine any from sdk
[  +13 ms] SLVR:                 selecting vector_math 2.1.0
[  +18 ms] SLVR:                 fact: typed_data 1.3.0 depends on collection ^1.15.0
[   +1 ms] SLVR:                   selecting typed_data 1.3.0
[   +9 ms] SLVR:                   fact: test_api 0.3.0 depends on async ^2.5.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on boolean_selector ^2.1.0
[   +2 ms] SLVR:                   fact: test_api 0.3.0 depends on collection ^1.15.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on meta ^1.3.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on path ^1.8.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on source_span ^1.8.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on stack_trace ^1.10.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on stream_channel ^2.1.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on string_scanner ^1.1.0
[   +2 ms] SLVR:                   fact: test_api 0.3.0 depends on term_glyph ^1.2.0
[   +1 ms] SLVR:                   fact: test_api 0.3.0 depends on matcher >=0.12.10 <0.12.11
[   +1 ms] SLVR:                     selecting test_api 0.3.0
[   +3 ms] SLVR:                       selecting term_glyph 1.2.0
[  +13 ms] SLVR:                         selecting sync_http 0.3.0
[   +9 ms] SLVR:                         fact: string_scanner 1.1.0 depends on charcode ^1.2.0
[   +1 ms] SLVR:                         fact: string_scanner 1.1.0 depends on source_span ^1.8.0
[   +2 ms] SLVR:                           selecting string_scanner 1.1.0
[   +7 ms] SLVR:                           fact: stream_channel 2.1.0 depends on async ^2.5.0
[   +1 ms] SLVR:                             selecting stream_channel 2.1.0
[   +8 ms] SLVR:                             fact: stack_trace 1.10.0 depends on path ^1.8.0
[   +2 ms] SLVR:                               selecting stack_trace 1.10.0
[   +7 ms] SLVR:                               fact: source_span 1.8.1 depends on collection ^1.15.0
[   +1 ms] SLVR:                               fact: source_span 1.8.1 depends on path ^1.8.0
[   +1 ms] SLVR:                               fact: source_span 1.8.1 depends on term_glyph ^1.2.0
[   +1 ms] SLVR:                                 selecting source_span 1.8.1
[  +10 ms] SLVR:                                 fact: process 4.2.1 depends on file ^6.0.0
[   +1 ms] SLVR:                                 fact: process 4.2.1 depends on path ^1.8.0
[   +1 ms] SLVR:                                 fact: process 4.2.1 depends on platform ^3.0.0
[   +1 ms] SLVR:                                   selecting process 4.2.1
[   +7 ms] SLVR:                                     selecting platform 3.0.0
[   +8 ms] SLVR:                                     fact: matcher 0.12.10 depends on stack_trace ^1.10.0
[   +1 ms] SLVR:                                       selecting matcher 0.12.10
[  +19 ms] SLVR:                                       fact: crypto 3.0.1 depends on collection ^1.15.0
[   +1 ms] SLVR:                                       fact: crypto 3.0.1 depends on typed_data ^1.3.0
[   +1 ms] SLVR:                                         selecting crypto 3.0.1
[   +6 ms] SLVR:                                           selecting collection 1.15.0
[   +8 ms] SLVR:                                             selecting clock 1.1.0
[   +6 ms] SLVR:                                               selecting charcode 1.2.0
[   +5 ms] SLVR:                                                 selecting characters 1.1.0
[   +8 ms] SLVR:                                                 fact: boolean_selector 2.1.0 depends on source_span ^1.8.0
[   +4 ms] SLVR:                                                 fact: boolean_selector 2.1.0 depends on string_scanner ^1.1.0
[   +2 ms] SLVR:                                                   selecting boolean_selector 2.1.0
[   +2 ms] SLVR:                                                   fact: async 2.6.1 depends on meta ^1.1.7
[   +2 ms] SLVR:                                                   fact: async 2.6.1 depends on collection ^1.15.0
[   +1 ms] SLVR:                                                     selecting async 2.6.1
[   +3 ms] SLVR:                                                     fact: archive 3.1.2 depends on crypto ^3.0.0
[   +1 ms] SLVR:                                                     fact: archive 3.1.2 depends on path ^1.8.0
[   +1 ms] SLVR:                                                       selecting archive 3.1.2
[   +5 ms] SLVR:                                                       fact: webdriver 3.0.0 depends on archive ^3.0.0
[   +1 ms] SLVR:                                                       fact: webdriver 3.0.0 depends on matcher ^0.12.10
[   +1 ms] SLVR:                                                       fact: webdriver 3.0.0 depends on path ^1.8.0
[   +1 ms] SLVR:                                                       fact: webdriver 3.0.0 depends on stack_trace ^1.10.0
[   +1 ms] SLVR:                                                       fact: webdriver 3.0.0 depends on sync_http ^0.3.0
[   +1 ms] SLVR:                                                         selecting webdriver 3.0.0
[   +1 ms] SLVR:                                                           selecting vm_service 6.2.0
[   +4 ms] SLVR:                                                             selecting meta 1.3.0
[  +27 ms] SLVR:                                                               selecting path 1.8.0
[   +1 ms] SLVR:                                                               fact: fuchsia_remote_debug_protocol 0.0.0 from sdk depends on process 4.2.1
[   +4 ms] SLVR:                                                               fact: fuchsia_remote_debug_protocol 0.0.0 from sdk depends on vm_service 6.2.0
[   +1 ms] SLVR:                                                               fact: fuchsia_remote_debug_protocol 0.0.0 from sdk depends on file 6.1.0
[   +1 ms] SLVR:                                                               fact: fuchsia_remote_debug_protocol 0.0.0 from sdk depends on meta 1.3.0
[   +1 ms] SLVR:                                                               fact: fuchsia_remote_debug_protocol 0.0.0 from sdk depends on path 1.8.0
[   +1 ms] SLVR:                                                               fact: fuchsia_remote_debug_protocol 0.0.0 from sdk depends on platform 3.0.0
[   +1 ms] SLVR:                                                                 selecting fuchsia_remote_debug_protocol 0.0.0 from sdk
[   +1 ms] SLVR:                                                                 fact: file 6.1.0 depends on meta ^1.3.0
[   +1 ms] SLVR:                                                                 fact: file 6.1.0 depends on path ^1.8.0
[   +1 ms] SLVR:                                                                   selecting file 6.1.0
[   +1 ms] SLVR:                                                                   fact: fake_async 1.2.0 depends on clock ^1.1.0
[   +1 ms] SLVR:                                                                   fact: fake_async 1.2.0 depends on collection ^1.15.0
[   +1 ms] SLVR:                                                                     selecting fake_async 1.2.0
[   +2 ms] SLVR:                                                                     fact: intl 0.17.0 depends on clock ^1.1.0
[   +1 ms] SLVR:                                                                     fact: intl 0.17.0 depends on path ^1.8.0
[   +1 ms] SLVR:                                                                       selecting intl 0.17.0
[   +1 ms] SLVR:                                                                         selecting sky_engine 0.0.99 from sdk
[ +259 ms] SLVR: Version solving took 0:00:00.909729 seconds.
[   +1 ms]     | Tried 1 solutions.
[   +1 ms] FINE: Resolving dependencies finished (0.959s).
[ +168 ms] MSG :   async 2.6.1 (2.7.0 available)
[   +1 ms]     |   file 6.1.0 (6.1.1 available)
[   +1 ms]     |   meta 1.3.0 (1.4.0 available)
[   +1 ms]     |   test_api 0.3.0 (0.4.0 available)
[   +1 ms]     |   vm_service 6.2.0 (7.0.0 available)
[  +84 ms] IO  : Writing 5279 characters to text file .\pubspec.lock.
[   +1 ms] FINE: Contents:
[        ]     | # Generated by pub
[   +1 ms]     | # See https://dart.dev/tools/pub/glossary#lockfile
[   +1 ms]     | packages:
[   +1 ms]     |   archive:
[   +1 ms]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: archive
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[        ]     |     version: "3.1.2"
[        ]     |   async:
[        ]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: async
[        ]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[        ]     |     version: "2.6.1"
[   +2 ms]     |   boolean_selector:
[   +1 ms]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: boolean_selector
[        ]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "2.1.0"
[   +1 ms]     |   characters:
[   +1 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: characters
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +2 ms]     |     source: hosted
[   +2 ms]     |     version: "1.1.0"
[   +1 ms]     |   charcode:
[        ]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: charcode
[   +1 ms]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[        ]     |     version: "1.2.0"
[        ]     |   clock:
[   +1 ms]     |     dependency: transitive
[   +2 ms]     |     description:
[   +1 ms]     |       name: clock
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "1.1.0"
[   +1 ms]     |   collection:
[        ]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: collection
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[   +1 ms]     |     version: "1.15.0"
[        ]     |   crypto:
[   +1 ms]     |     dependency: transitive
[   +3 ms]     |     description:
[   +1 ms]     |       name: crypto
[        ]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "3.0.1"
[   +1 ms]     |   cupertino_icons:
[        ]     |     dependency: "direct main"
[        ]     |     description:
[        ]     |       name: cupertino_icons
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[        ]     |     version: "1.0.3"
[   +2 ms]     |   fake_async:
[   +1 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: fake_async
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "1.2.0"
[   +1 ms]     |   file:
[        ]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: file
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[   +2 ms]     |     version: "6.1.0"
[   +2 ms]     |   flutter:
[   +2 ms]     |     dependency: "direct main"
[   +1 ms]     |     description: flutter
[   +1 ms]     |     source: sdk
[        ]     |     version: "0.0.0"
[        ]     |   flutter_driver:
[        ]     |     dependency: "direct dev"
[        ]     |     description: flutter
[   +1 ms]     |     source: sdk
[        ]     |     version: "0.0.0"
[   +4 ms]     |   flutter_localizations:
[   +1 ms]     |     dependency: "direct main"
[   +1 ms]     |     description: flutter
[   +1 ms]     |     source: sdk
[   +1 ms]     |     version: "0.0.0"
[   +1 ms]     |   flutter_test:
[   +1 ms]     |     dependency: "direct dev"
[   +1 ms]     |     description: flutter
[   +1 ms]     |     source: sdk
[        ]     |     version: "0.0.0"
[        ]     |   fuchsia_remote_debug_protocol:
[   +3 ms]     |     dependency: transitive
[   +3 ms]     |     description: flutter
[   +1 ms]     |     source: sdk
[   +1 ms]     |     version: "0.0.0"
[        ]     |   integration_test:
[        ]     |     dependency: "direct dev"
[        ]     |     description: flutter
[        ]     |     source: sdk
[        ]     |     version: "0.0.0"
[        ]     |   intl:
[        ]     |     dependency: transitive
[   +3 ms]     |     description:
[   +1 ms]     |       name: intl
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "0.17.0"
[   +1 ms]     |   matcher:
[   +1 ms]     |     dependency: transitive
[   +2 ms]     |     description:
[   +1 ms]     |       name: matcher
[   +2 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "0.12.10"
[   +1 ms]     |   meta:
[   +2 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: meta
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[        ]     |     version: "1.3.0"
[        ]     |   path:
[        ]     |     dependency: transitive
[   +2 ms]     |     description:
[   +1 ms]     |       name: path
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "1.8.0"
[   +1 ms]     |   platform:
[        ]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: platform
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[        ]     |     version: "3.0.0"
[        ]     |   process:
[        ]     |     dependency: transitive
[   +3 ms]     |     description:
[   +1 ms]     |       name: process
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "4.2.1"
[   +1 ms]     |   sky_engine:
[   +1 ms]     |     dependency: transitive
[   +1 ms]     |     description: flutter
[   +1 ms]     |     source: sdk
[        ]     |     version: "0.0.99"
[   +2 ms]     |   source_span:
[        ]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: source_span
[        ]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "1.8.1"
[   +1 ms]     |   stack_trace:
[   +1 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: stack_trace
[  +13 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "1.10.0"
[   +5 ms]     |   stream_channel:
[   +1 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: stream_channel
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "2.1.0"
[   +1 ms]     |   string_scanner:
[   +1 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +3 ms]     |       name: string_scanner
[   +4 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[   +1 ms]     |     version: "1.1.0"
[        ]     |   sync_http:
[        ]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: sync_http
[        ]     |       url: "https://pub.dartlang.org"
[   +3 ms]     |     source: hosted
[   +1 ms]     |     version: "0.3.0"
[   +1 ms]     |   term_glyph:
[        ]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: term_glyph
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[        ]     |     version: "1.2.0"
[        ]     |   test_api:
[        ]     |     dependency: transitive
[        ]     |     description:
[   +1 ms]     |       name: test_api
[        ]     |       url: "https://pub.dartlang.org"
[   +2 ms]     |     source: hosted
[   +3 ms]     |     version: "0.3.0"
[   +1 ms]     |   typed_data:
[   +1 ms]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: typed_data
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[        ]     |     version: "1.3.0"
[   +1 ms]     |   vector_math:
[   +4 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: vector_math
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[        ]     |     version: "2.1.0"
[        ]     |   vm_service:
[        ]     |     dependency: transitive
[        ]     |     description:
[        ]     |       name: vm_service
[        ]     |       url: "https://pub.dartlang.org"
[        ]     |     source: hosted
[        ]     |     version: "6.2.0"
[        ]     |   webdriver:
[   +4 ms]     |     dependency: transitive
[   +1 ms]     |     description:
[   +1 ms]     |       name: webdriver
[   +1 ms]     |       url: "https://pub.dartlang.org"
[   +1 ms]     |     source: hosted
[        ]     |     version: "3.0.0"
[        ]     | sdks:
[        ]     |   dart: ">=2.12.0 <3.0.0"
[        ] IO  : Writing 3229 characters to text file .\.packages.
[        ] FINE: Contents:
[        ]     | # This file is deprecated. Tools should instead consume 
[        ]     | # `.dart_tools/package_config.json`.
[        ]     | # 
[   +4 ms]     | # For more info see: https://dart.dev/go/dot-packages-deprecation
[   +1 ms]     | # 
[   +1 ms]     | # Generated by pub on 2021-06-01 21:23:47.034886.
[   +1 ms]     | archive:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/archive-3.1.2/lib/
[   +1 ms]     | async:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.6.1/lib/
[        ]     | boolean_selector:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/
[        ]     | characters:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.1.0/lib/
[        ]     | charcode:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.2.0/lib/
[        ]     | clock:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.1.0/lib/
[        ]     | collection:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0/lib/
[        ]     | crypto:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-3.0.1/lib/
[        ]     | cupertino_icons:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-1.0.3/lib/
[   +3 ms]     | fake_async:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.2.0/lib/
[   +1 ms]     | file:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/file-6.1.0/lib/
[   +1 ms]     | flutter:file:///C:/Src/flutter/packages/flutter/lib/
[   +1 ms]     | flutter_driver:file:///C:/Src/flutter/packages/flutter_driver/lib/
[   +1 ms]     | flutter_localizations:file:///C:/Src/flutter/packages/flutter_localizations/lib/
[   +1 ms]     | flutter_test:file:///C:/Src/flutter/packages/flutter_test/lib/
[   +1 ms]     | fuchsia_remote_debug_protocol:file:///C:/Src/flutter/packages/fuchsia_remote_debug_protocol/lib/
[   +1 ms]     | integration_test:file:///C:/Src/flutter/packages/integration_test/lib/
[   +1 ms]     | intl:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.17.0/lib/
[   +1 ms]     | matcher:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.10/lib/
[   +2 ms]     | meta:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.3.0/lib/
[   +2 ms]     | path:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.8.0/lib/
[        ]     | platform:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/platform-3.0.0/lib/
[   +2 ms]     | process:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/process-4.2.1/lib/
[   +1 ms]     | sky_engine:file:///C:/Src/flutter/bin/cache/pkg/sky_engine/lib/
[   +1 ms]     | source_span:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.1/lib/
[   +1 ms]     | stack_trace:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0/lib/
[   +1 ms]     | stream_channel:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0/lib/
[   +1 ms]     | string_scanner:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/
[  +23 ms]     | sync_http:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/sync_http-0.3.0/lib/
[   +2 ms]     | term_glyph:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0/lib/
[   +1 ms]     | test_api:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.3.0/lib/
[   +1 ms]     | typed_data:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0/lib/
[   +1 ms]     | vector_math:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.0/lib/
[   +1 ms]     | vm_service:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/vm_service-6.2.0/lib/
[   +1 ms]     | webdriver:file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/webdriver-3.0.0/lib/
[   +2 ms]     | flutter_integration_test:lib/
[   +6 ms] IO  : Writing 6942 characters to text file .\.dart_tool\package_config.json.
[   +1 ms] FINE: Contents:
[   +1 ms]     | {
[   +1 ms]     |   "configVersion": 2,
[   +1 ms]     |   "packages": [
[   +1 ms]     |     {
[   +1 ms]     |       "name": "archive",
[   +3 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/archive-3.1.2",
[   +2 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[        ]     |     {
[   +1 ms]     |       "name": "async",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.6.1",
[   +1 ms]     |       "packageUri": "lib/",
[        ]     |       "languageVersion": "2.12"
[        ]     |     },
[   +3 ms]     |     {
[   +1 ms]     |       "name": "boolean_selector",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[        ]     |       "name": "characters",
[        ]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.1.0",
[        ]     |       "packageUri": "lib/",
[        ]     |       "languageVersion": "2.12"
[        ]     |     },
[   +3 ms]     |     {
[   +2 ms]     |       "name": "charcode",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.2.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[        ]     |       "name": "clock",
[        ]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.1.0",
[        ]     |       "packageUri": "lib/",
[        ]     |       "languageVersion": "2.12"
[        ]     |     },
[   +3 ms]     |     {
[   +1 ms]     |       "name": "collection",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "crypto",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-3.0.1",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +3 ms]     |     },
[   +4 ms]     |     {
[   +1 ms]     |       "name": "cupertino_icons",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-1.0.3",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +5 ms]     |     {
[   +1 ms]     |       "name": "fake_async",
[   +2 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.2.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +2 ms]     |     },
[   +6 ms]     |     {
[   +1 ms]     |       "name": "file",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/file-6.1.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "flutter",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/packages/flutter",
[   +2 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "flutter_driver",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/packages/flutter_driver",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "flutter_localizations",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/packages/flutter_localizations",
[   +3 ms]     |       "packageUri": "lib/",
[   +4 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "flutter_test",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/packages/flutter_test",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +5 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "fuchsia_remote_debug_protocol",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/packages/fuchsia_remote_debug_protocol",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "integration_test",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/packages/integration_test",
[   +5 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "intl",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.17.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +9 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "matcher",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.10",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +6 ms]     |       "name": "meta",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.3.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "path",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.8.0",
[   +7 ms]     |       "packageUri": "lib/",
[   +1 ms] MSG : Got dependencies!
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "platform",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/platform-3.0.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +4 ms]     |       "languageVersion": "2.12"
[   +2 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "process",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/process-4.2.1",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "sky_engine",
[   +3 ms]     |       "rootUri": "file:///C:/Src/flutter/bin/cache/pkg/sky_engine",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +2 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "source_span",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.1",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +2 ms]     |     {
[   +5 ms]     |       "name": "stack_trace",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0",
[   +1 ms]     |       "packageUri": "lib/",
[  +19 ms]     |       "languageVersion": "2.12"
[  +13 ms]     |     },
[   +1 ms]     |     {
[   +2 ms]     |       "name": "stream_channel",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "string_scanner",
[   +2 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +3 ms]     |     },
[   +5 ms]     |     {
[   +1 ms]     |       "name": "sync_http",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/sync_http-0.3.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +2 ms]     |       "name": "term_glyph",
[   +1 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[        ]     |       "name": "test_api",
[        ]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.3.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "typed_data",
[   +3 ms]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0",
[   +3 ms]     |       "packageUri": "lib/",
[   +2 ms]     |       "languageVersion": "2.12"
[   +1 ms]     |     },
[        ]     |     {
[        ]     |       "name": "vector_math",
[        ]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.0",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +3 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "vm_service",
[        ]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/vm_service-6.2.0",
[   +1 ms]     |       "packageUri": "lib/",
[        ]     |       "languageVersion": "2.12"
[        ]     |     },
[        ]     |     {
[        ]     |       "name": "webdriver",
[        ]     |       "rootUri": "file:///C:/Src/flutter/.pub-cache/hosted/pub.dartlang.org/webdriver-3.0.0",
[        ]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[   +5 ms]     |     },
[   +1 ms]     |     {
[   +1 ms]     |       "name": "flutter_integration_test",
[   +1 ms]     |       "rootUri": "../",
[   +1 ms]     |       "packageUri": "lib/",
[   +1 ms]     |       "languageVersion": "2.12"
[        ]     |     }
[        ]     |   ],
[        ]     |   "generated": "2021-06-01T15:53:47.191125Z",
[        ]     |   "generator": "pub",
[   +1 ms]     |   "generatorVersion": "2.13.0"
[   +3 ms]     | }
[  +54 ms] Running "flutter pub get" in flutter_integration_test... (completed in 2,427ms)
[ +157 ms] Found plugin integration_test at C:\Src\flutter\packages\integration_test\
[ +325 ms] Found plugin integration_test at C:\Src\flutter\packages\integration_test\
[  +13 ms] Generating D:\FlutterLearning\flutter_integration_test\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +91 ms] ro.hardware = qcom
[  +96 ms] Initializing file store
[  +18 ms] Skipping target: gen_localizations
[  +10 ms] complete
[   +8 ms] Launching lib\main.dart on Moto G 4 in debug mode...
[  +14 ms] C:\Src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata
-DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\jarinrocks\AppData\Local\Temp\flutter_tools.4373bf55\flutter_tool.1caefa74\app.dill --packages
D:\FlutterLearning\flutter_integration_test\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme
org-dartlang-root --initialize-from-dill build\3c113a45063dc6628e68a4111abcacad.cache.dill.track.dill --enable-experiment=alternative-invalidation-strategy
[  +33 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree D:\FlutterLearning\flutter_integration_test\build\app\outputs\flutter-apk\app.apk
AndroidManifest.xml
[  +43 ms] Exit code 0 from: C:\Users\jarinrocks\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
D:\FlutterLearning\flutter_integration_test\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[   +2 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
               A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
               A: package="com.example.integration_test" (Raw: "com.example.integration_test")
               A: platformBuildVersionCode=(type 0x10)0x1e
               A: platformBuildVersionName=(type 0x10)0xb
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=16)
                 A: android:label(0x01010001)="integration_test" (Raw: "integration_test")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: activity (line=21)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.integration_test.MainActivity" (Raw: "com.example.integration_test.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=35)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=45)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=49)
                     E: action (line=50)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=52)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=59)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[  +18 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP shell -x logcat -v time -t 1
[  +37 ms] <- compile package:flutter_integration_test/main.dart
[ +267 ms] --------- beginning of main
                    06-01 21:23:05.200 D/KeyguardUpdateMonitor( 4225): handleBatteryUpdate
[  +29 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe version
[  +86 ms] Android Debug Bridge version 1.0.41
           Version 31.0.2-7242960
           Installed as C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe
[   +7 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
[  +88 ms] Building APK
[  +95 ms] Running Gradle task 'assembleDebug'...
[ +102 ms] Using gradle from D:\FlutterLearning\flutter_integration_test\android\gradlew.bat.
[  +39 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +350 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[   +1 ms] openjdk version "11.0.8" 2020-07-14
           OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
           OpenJDK 64-Bit Server VM (build 11.0.8+10-b944.6842174, mixed mode)
[   +5 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +341 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[   +1 ms] openjdk version "11.0.8" 2020-07-14
           OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
           OpenJDK 64-Bit Server VM (build 11.0.8+10-b944.6842174, mixed mode)
[   +3 ms] executing: [D:\FlutterLearning\flutter_integration_test\android/] D:\FlutterLearning\flutter_integration_test\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-arm
-Ptarget=D:\FlutterLearning\flutter_integration_test\lib\main.dart -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true
-Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug
[+2617 ms] Welcome to Gradle 6.7!
[  +17 ms] Here are the highlights of this release:
[   +1 ms]  - File system watching is ready for production use
[   +1 ms]  - Declare the version of Java your build requires
[   +1 ms]  - Java 15 support
[   +1 ms] For more details see https://docs.gradle.org/6.7/release-notes.html
[+5553 ms] > Task :app:compileFlutterBuildDebug
[   +2 ms] [ +194 ms] executing: [C:\Src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +291 ms] [ +271 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +1 ms] [        ] b22742018b3edf16c6cadd7b76d9db5e7f9064b5
[   +1 ms] [   +1 ms] executing: [C:\Src\flutter/] git tag --points-at b22742018b3edf16c6cadd7b76d9db5e7f9064b5
[  +95 ms] [ +180 ms] Exit code 0 from: git tag --points-at b22742018b3edf16c6cadd7b76d9db5e7f9064b5
[   +1 ms] [        ] 2.2.0
[  +91 ms] [  +13 ms] executing: [C:\Src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +93 ms] [  +95 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] [        ] origin/stable
[   +1 ms] [        ] executing: [C:\Src\flutter/] git ls-remote --get-url origin
[ +105 ms] [ +101 ms] Exit code 0 from: git ls-remote --get-url origin
[   +2 ms] [        ] https://github.com/flutter/flutter.git
[  +92 ms] [ +171 ms] executing: [C:\Src\flutter/] git rev-parse --abbrev-ref HEAD
[ +115 ms] [  +87 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +2 ms] [        ] stable
[ +207 ms] [ +210 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[  +10 ms] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +5 ms] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +4 ms] [  +10 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[  +86 ms] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +267 ms] [ +345 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[   +1 ms] [   +8 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +7 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +3 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +54 ms] [ +108 ms] Initializing file store
[ +117 ms] [  +81 ms] Skipping target: gen_localizations
[   +2 ms] [  +19 ms] kernel_snapshot: Starting due to {}
[  +84 ms] [  +43 ms] C:\Src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false
-Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages D:\FlutterLearning\flutter_integration_test\.dart_tool\package_config.json --output-dill
D:\FlutterLearning\flutter_integration_test\.dart_tool\flutter_build\1ca4ff2e02dfb8a5f5843cf194a310ac\app.dill --depfile
D:\FlutterLearning\flutter_integration_test\.dart_tool\flutter_build\1ca4ff2e02dfb8a5f5843cf194a310ac\kernel_snapshot.d package:flutter_integration_test/main.dart
[+24404 ms] [+24443 ms] kernel_snapshot: Complete
[+1093 ms] [+1113 ms] debug_android_application: Starting due to {}
[+2102 ms] [+2068 ms] Manifest contained wildcard assets. Inserting missing file into build graph to force rerun. for more information see #56466.
[ +297 ms] [ +273 ms] debug_android_application: Complete
[+1504 ms] [+1522 ms] Persisting file store
[   +4 ms] [  +17 ms] Done persisting file store
[  +99 ms] [  +57 ms] build succeeded.
[   +1 ms] [  +49 ms] "flutter assemble" took 30,211ms.
[  +93 ms] [ +148 ms] ensureAnalyticsSent: 138ms
[ +108 ms] [   +2 ms] Running shutdown hooks
[   +3 ms] [        ] Shutdown hooks complete
[   +1 ms] [   +1 ms] exiting with code 0
[ +885 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[   +2 ms] > Task :app:preBuild UP-TO-DATE
[   +1 ms] > Task :app:preDebugBuild UP-TO-DATE
[   +1 ms] > Task :integration_test:preBuild UP-TO-DATE
[   +1 ms] > Task :integration_test:preDebugBuild UP-TO-DATE
[   +1 ms] > Task :integration_test:compileDebugAidl NO-SOURCE
[   +1 ms] > Task :app:compileDebugAidl NO-SOURCE
[   +1 ms] > Task :integration_test:packageDebugRenderscript NO-SOURCE
[   +1 ms] > Task :app:compileDebugRenderscript NO-SOURCE
[   +1 ms] > Task :app:generateDebugBuildConfig UP-TO-DATE
[   +1 ms] > Task :integration_test:writeDebugAarMetadata UP-TO-DATE
[ +905 ms] > Task :app:checkDebugAarMetadata UP-TO-DATE
[   +7 ms] > Task :app:cleanMergeDebugAssets
[   +1 ms] > Task :app:mergeDebugShaders UP-TO-DATE
[   +1 ms] > Task :app:compileDebugShaders NO-SOURCE
[   +9 ms] > Task :app:generateDebugAssets UP-TO-DATE
[   +7 ms] > Task :integration_test:mergeDebugShaders UP-TO-DATE
[   +1 ms] > Task :integration_test:compileDebugShaders NO-SOURCE
[  +97 ms] > Task :integration_test:generateDebugAssets UP-TO-DATE
[  +83 ms] > Task :integration_test:packageDebugAssets UP-TO-DATE
[   +3 ms] > Task :app:mergeDebugAssets
[ +572 ms] > Task :app:copyFlutterAssetsDebug
[   +2 ms] > Task :app:generateDebugResValues UP-TO-DATE
[   +1 ms] > Task :app:generateDebugResources UP-TO-DATE
[   +1 ms] > Task :integration_test:compileDebugRenderscript NO-SOURCE
[   +1 ms] > Task :integration_test:generateDebugResValues UP-TO-DATE
[  +88 ms] > Task :integration_test:generateDebugResources UP-TO-DATE
[   +1 ms] > Task :integration_test:packageDebugResources UP-TO-DATE
[   +1 ms] > Task :app:mergeDebugResources UP-TO-DATE
[   +1 ms] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[   +1 ms] > Task :app:extractDeepLinksDebug UP-TO-DATE
[   +1 ms] > Task :integration_test:extractDeepLinksDebug UP-TO-DATE
[ +101 ms] > Task :integration_test:processDebugManifest UP-TO-DATE
[   +3 ms] > Task :app:processDebugMainManifest UP-TO-DATE
[        ] > Task :app:processDebugManifest UP-TO-DATE
[        ] > Task :app:processDebugManifestForPackage UP-TO-DATE
[   +1 ms] > Task :integration_test:compileDebugLibraryResources UP-TO-DATE
[ +100 ms] > Task :integration_test:parseDebugLocalResources UP-TO-DATE
[  +87 ms] > Task :integration_test:generateDebugRFile UP-TO-DATE
[ +314 ms] > Task :app:processDebugResources UP-TO-DATE
[   +6 ms] > Task :integration_test:generateDebugBuildConfig UP-TO-DATE
[   +1 ms] > Task :integration_test:javaPreCompileDebug UP-TO-DATE
[ +127 ms] > Task :integration_test:compileDebugJavaWithJavac UP-TO-DATE
[   +6 ms] > Task :integration_test:bundleLibCompileToJarDebug UP-TO-DATE
[  +63 ms] > Task :app:compileDebugKotlin UP-TO-DATE
[   +1 ms] > Task :app:javaPreCompileDebug UP-TO-DATE
[ +400 ms] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[  +33 ms] > Task :app:compileDebugSources UP-TO-DATE
[   +1 ms] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
[   +1 ms] > Task :app:processDebugJavaRes NO-SOURCE
[   +1 ms] > Task :integration_test:processDebugJavaRes NO-SOURCE
[   +1 ms] > Task :integration_test:bundleLibResDebug NO-SOURCE
[   +1 ms] > Task :app:mergeDebugJavaResource UP-TO-DATE
[   +1 ms] > Task :integration_test:bundleLibRuntimeToJarDebug UP-TO-DATE
[ +316 ms] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
[   +1 ms] > Task :app:dexBuilderDebug UP-TO-DATE
[   +1 ms] > Task :app:desugarDebugFileDependencies UP-TO-DATE
[ +149 ms] > Task :app:mergeExtDexDebug UP-TO-DATE
[   +2 ms] > Task :app:mergeDexDebug UP-TO-DATE
[  +22 ms] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
[   +1 ms] > Task :integration_test:mergeDebugJniLibFolders UP-TO-DATE
[   +1 ms] > Task :integration_test:mergeDebugNativeLibs NO-SOURCE
[   +1 ms] > Task :integration_test:stripDebugDebugSymbols NO-SOURCE
[   +1 ms] > Task :integration_test:copyDebugJniLibsProjectOnly UP-TO-DATE
[  +50 ms] > Task :app:mergeDebugNativeLibs UP-TO-DATE
[   +9 ms] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[   +1 ms] > Task :app:validateSigningDebug UP-TO-DATE
[   +1 ms] > Task :integration_test:copyDebugJniLibsProjectAndLocalJars UP-TO-DATE
[ +284 ms] > Task :integration_test:extractDebugAnnotations UP-TO-DATE
[   +1 ms] > Task :integration_test:mergeDebugGeneratedProguardFiles UP-TO-DATE
[   +1 ms] > Task :integration_test:mergeDebugConsumerProguardFiles UP-TO-DATE
[   +1 ms] > Task :integration_test:prepareLintJarForPublish UP-TO-DATE
[   +1 ms] > Task :integration_test:mergeDebugJavaResource UP-TO-DATE
[   +1 ms] > Task :integration_test:syncDebugLibJars UP-TO-DATE
[   +1 ms] > Task :integration_test:bundleDebugAar UP-TO-DATE
[   +1 ms] > Task :integration_test:compileDebugSources UP-TO-DATE
[   +1 ms] > Task :integration_test:assembleDebug UP-TO-DATE
[ +787 ms] > Task :app:compressDebugAssets
[+3998 ms] > Task :app:packageDebug
[ +205 ms] > Task :app:assembleDebug
[  +62 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[   +1 ms] Use '--warning-mode all' to show the individual deprecation warnings.
[   +1 ms] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
[   +1 ms] BUILD SUCCESSFUL in 49s
[   +1 ms] 57 actionable tasks: 7 executed, 50 up-to-date
[ +655 ms] Running Gradle task 'assembleDebug'... (completed in 51.0s)
[ +141 ms] calculateSha: LocalDirectory: 'D:\FlutterLearning\flutter_integration_test\build\app\outputs\flutter-apk'/app.apk
[+1192 ms] √  Built build\app\outputs\flutter-apk\app-debug.apk.
[   +6 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree D:\FlutterLearning\flutter_integration_test\build\app\outputs\flutter-apk\app.apk
AndroidManifest.xml
[ +672 ms] Exit code 0 from: C:\Users\jarinrocks\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
D:\FlutterLearning\flutter_integration_test\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[   +7 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
               A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
               A: package="com.example.integration_test" (Raw: "com.example.integration_test")
               A: platformBuildVersionCode=(type 0x10)0x1e
               A: platformBuildVersionName=(type 0x10)0xb
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=16)
                 A: android:label(0x01010001)="integration_test" (Raw: "integration_test")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: activity (line=21)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.integration_test.MainActivity" (Raw: "com.example.integration_test.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=35)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=45)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=49)
                     E: action (line=50)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=52)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=59)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[  +14 ms] Stopping app 'app.apk' on Moto G 4.
[  +11 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP shell am force-stop com.example.integration_test
[+1023 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP shell pm list packages com.example.integration_test
[+1033 ms] Installing APK.
[   +7 ms] Installing build\app\outputs\flutter-apk\app.apk...
[   +1 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP install -t -r
D:\FlutterLearning\flutter_integration_test\build\app\outputs\flutter-apk\app.apk
[+12534 ms] Performing Streamed Install
                     Success
[   +3 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 12.5s)
[   +6 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP shell echo -n e18927bc489b4ea6eda34f88e589d9d8ba4d8df7 >
/data/local/tmp/sky.com.example.integration_test.sha1
[ +120 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP shell -x logcat -v time -t 1
[ +179 ms] --------- beginning of main
                    06-01 21:24:55.717 W/System  (14097): ClassLoader referenced unknown path: /system/priv-app/GooglePartnerSetup/lib/arm
[  +29 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP shell am start -a android.intent.action.RUN -f 0x20000000 --ez
enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true
com.example.integration_test/com.example.integration_test.MainActivity
[+1056 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.integration_test/.MainActivity (has extras) }
[   +4 ms] Waiting for observatory port to be available...
[+1516 ms] Observatory URL on device: http://127.0.0.1:39937/_7fQo5DExlw=/
[   +6 ms] executing: C:\Users\jarinrocks\AppData\Local\Android\sdk\platform-tools\adb.exe -s ZY223SPVZP forward tcp:0 tcp:39937
[  +81 ms] 61547
[   +2 ms] Forwarded host port 61547 to device port 39937 for Observatory
[  +17 ms] Caching compiled dill
[ +145 ms] Connecting to service protocol: http://127.0.0.1:61547/_7fQo5DExlw=/
[ +867 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:61547/_7fQo5DExlw=/.
[ +373 ms] DDS is listening at http://127.0.0.1:61552/wXkfH1Xx-mw=/.
[ +113 ms] Successfully connected to service protocol: http://127.0.0.1:61547/_7fQo5DExlw=/
[  +49 ms] DevFS: Creating new filesystem on the device (null)
[ +114 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.integration_test/code_cache/flutter_integration_testUBXIFH/flutter_integration_test/)
[   +9 ms] Updating assets
[ +254 ms] Manifest contained wildcard assets. Inserting missing file into build graph to force rerun. for more information see #56466.
[   +8 ms] Syncing files to device Moto G 4...
[   +3 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +4 ms] <- recompile package:flutter_integration_test/main.dart 6abee0b8-293c-4f77-8b0b-badda4d0419a
[   +1 ms] <- 6abee0b8-293c-4f77-8b0b-badda4d0419a
[ +273 ms] Updating files.
[   +3 ms] DevFS: Sync finished
[   +2 ms] Syncing files to device Moto G 4... (completed in 289ms)
[   +2 ms] Synced 0.0MB.
[   +5 ms] <- accept
[ +362 ms] Connected to _flutterView/0x9dce2810.
[   +4 ms] Flutter run key commands.
[   +4 ms] r Hot reload. 
[   +1 ms] R Hot restart.
[   +1 ms] h Repeat this help message.
[   +1 ms] d Detach (terminate "flutter run" but leave application running).
[   +1 ms] c Clear the screen
[   +1 ms] q Quit (terminate the application on the device).
[   +1 ms]  Running with sound null safety 
[   +2 ms] An Observatory debugger and profiler on Moto G 4 is available at: http://127.0.0.1:61552/wXkfH1Xx-mw=/
[+3143 ms] The Flutter DevTools debugger and profiler on Moto G 4 is available at: http://127.0.0.1:9104?uri=http%3A%2F%2F127.0.0.1%3A61552%2FwXkfH1Xx-mw%3D%2F

// flutter analyze

Analyzing flutter_integration_test...
No issues found! (ran in 37.8s)
darshankawar commented 3 years ago

There was a similar issue related to flutter_driver api for which a solution was to use FlutterDriver.requestData to translate the strings, but since there doesn't seem to be an equivalent for requestData from integration_test package point of view, https://github.com/flutter/flutter/issues/76852, it doesn't seem to be possible.

Labeling it accordingly.

HansMuller commented 3 years ago

CC @shihaohong

nilsreichardt commented 3 years ago

I have the same issue. This is for us a big blocker to start with integration tests 🙁

jarinrocks commented 3 years ago

@nilsreichardt This might help you https://medium.com/codechai/testing-localized-widget-in-flutter-3bfa5492bc84

nilsreichardt commented 3 years ago

@jarinrocks Thanks! I found out that it was another issue. Integration tests are now running :)

jarinrocks commented 3 years ago

@nilsreichardt Are you using localization in the code which you are integration testing?

nilsreichardt commented 3 years ago

@jarinrocks Yes, we are using localization, but we are testing with Keys (await tester.tap(find.byKey(const ValueKey('nav-board-button-e2e')));). I had an issue that tester could not tap on anything, even with Key, Type, etc. I had a similar issue with Flutter Widget Tests, where localization was the problem. So I thought that localization was blocking integration tests, but this wasn't correct.

ManukumarSB commented 3 years ago

I still have the same issue. This is a big blocker for us to start with integration tests.

rddewan commented 1 year ago

I have modifier the AppLocalizations class as below and now I can run the test case with localization successfully. This may be work around for now


part of common;

class AppLocalizations {
  final Locale locale;
  final bool isTest;
  late Map<String,String> _localizedString;

  AppLocalizations(this.locale,{this.isTest = false});

  /// localizations are access using the InheritedWidget `of` syntax
  static AppLocalizations? of(BuildContext context) {
    return Localizations.of<AppLocalizations>(context, AppLocalizations);
  }

  static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate();

  /// A list of this localizations delegate along with the default localizations
  /// delegates.
  ///
  /// Returns a list of localizations delegates containing this delegate along with
  /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
  /// and GlobalWidgetsLocalizations.delegate.
  static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
    delegate,
    GlobalMaterialLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
  ];

  /// For Widget/Golden/Integration Test only
  /// `jsonString` is the localization json file 
  static LocalizationsDelegate<AppLocalizations> delegateTest(String jsonString) => _AppLocalizationsDelegate(isTest: true, jsonString: jsonString);

  /// For Widget/Golden/Integration Test only
  /// `jsonString` is the localization json file 
  static List<LocalizationsDelegate<dynamic>> localizationsDelegatesTest(String jsonString) => <LocalizationsDelegate<dynamic>>[
    delegateTest(jsonString),
    GlobalMaterialLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
  ];

  static AppLocalizations get instance => _AppLocalizationsDelegate.instance;

  /// For Widget/Golden/Integration Test only
  /// Test runs on `FakeAsync` so we cant use a compute to decode string to map 
  void loadTest(String jsonString) {    
   _localizedString = _decodeTranslation(jsonString);
  }

  // load json translation file from assets
  Future<void> load() async {
    final jsonString = await rootBundle.loadString('packages/common/assets/i18n/${locale.languageCode}.json');
    _localizedString = await compute(_decodeTranslation, jsonString);
  }

  String translate(String key) {
    return _localizedString[key] ?? 'No translation found';
  }

  Map<String, String> _decodeTranslation(String data) =>
    Map<String, String>.from(jsonDecode(data) as Map);
}

/// private class for LocalizationsDelegate
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
  // bool variable to know if we running a Test 
  final bool isTest;
  // variable to hold the localization josn file when running Test
  final String jsonString;

  const _AppLocalizationsDelegate({this.isTest = false, this.jsonString = ''});

  static late AppLocalizations instance;

  @override
  Future<AppLocalizations> load(Locale locale) async {
    // create new instance of AppLocalizations
    final localization = AppLocalizations(locale, isTest: isTest);

    // For Widget/Golden/Integration Test only
    if (isTest) {
      localization.loadTest(jsonString);      
    }
    else {
      // load the translation file
      await localization.load();
    }

    instance = localization;

    return instance;

  }

  @override
  bool isSupported(Locale locale) {
    // include all your supported locals
    return <String>['en', 'hi', 'th'].contains(locale.languageCode);

  } 

  @override
  bool shouldReload(_AppLocalizationsDelegate old) => false;
}

From Test create a material app wrapper

return ProviderScope(
    overrides: overrides,
    child: MaterialApp(
      debugShowCheckedModeBanner: false,
     // jsonString is the localization json file loaded as String
      localizationsDelegates: AppLocalizations.localizationsDelegatesTest(jsonString),
      supportedLocales: AppLocales.supportedLocales,
      locale: Locale(local),
      themeMode: themeMode,
      home: home,      
    ),
  );