1
resposta

Failed assertion: boolean expression must not be null

Tinha acabado de fazer tudo o que o vídeo recomendou. Dei RUN e apareceu isso para mim:


Performing hot restart...                                               
Restarted application in 709ms.
I/flutter ( 9117): I18NMessagesCubit > Change { currentState: Instance of 'InitI18NMessagesState', nextState: Instance of 'LoadingI18NMessagesState' }
I/flutter ( 9117): I18NMessagesCubit > Change { currentState: Instance of 'LoadingI18NMessagesState', nextState: Instance of 'LoadedI18NMessagesState' }
I/flutter ( 9117): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 9117): The following assertion was thrown building DashboardView(dirty):
I/flutter ( 9117): Failed assertion: boolean expression must not be null
I/flutter ( 9117): 
I/flutter ( 9117): The relevant error-causing widget was:
I/flutter ( 9117):   DashboardView file:///home/l/IntelliJIDEAProjects/flutter-bloc2/lib/screens/dashboard.dart:16:23
I/flutter ( 9117): 

O erro na linha do dashboard.dart:16:23 é:

        (messages) => DashboardView(DashboardViewLazyI18N(messages)),

O que devo fazer?

1 resposta

Fala Lucas, tudo bem ?

Cara vi que sua dúvida tá aberta faz 1 mês, queria saber se já conseguiu resolver ? Se sim fala pra gente como fez?