Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

396
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda