Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

397
Visualizações
Flutter - widget test never finishes on Linux

I use Flutter on Linux(Ubuntu). I created simply Linux desktop app. Also I created test widget, but I have issue. I have two user case: first I run my application. after that I run the test, I always get the error:

   /home/ubuntu/snap/flutter/common/flutter/bin/flutter --no-color test --machine --start- 
   paused 
   test/widget_test.dart
   Testing started at 10:00 AM ...

   package:flutter_tools/src/test/flutter_tester_device.dart 224:73  
   FlutterTesterTestDevice.finished
   ===== asynchronous gap ===========================
   dart:async/future.dart                                            Future.any.onValue

   Failed to load "/home/ubuntu/StudioProjects/my-flutter/test/widget_test.dart": Shell 
   subprocess ended cleanly. Did main() call exit()?

For fix it I running these commands :

   flutter clean
   flutter pub get

I run test(two user case) but it never ends - infinite loading indicator

enter image description here

This is my code, it working on Windows:

 testWidgets('Counter increments smoke test', (WidgetTester tester) 
  async 
  {
   final pref = await SharedPreferences.getInstance();
   await tester.pumpWidget(ProviderScope(overrides: [
   settingsProvider.overrideWithValue(
    SettingsService(pref),
   ),
  ], child: const MyApp()));
  expect(find.text('1'), findsNothing);

 });

is it possible to fix this?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda