diff --git a/README.md b/README.md index fe1aa29612f..c025bf3c4e5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ --- -A predictable state management library that helps implement the [BLoC design pattern](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +A predictable state management library that helps implement the BLoC design pattern. | Package | Pub | | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | diff --git a/analysis_options.yaml b/analysis_options.yaml index 2a26aca7d22..a6132f15f12 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -81,7 +81,6 @@ linter: - implicit_call_tearoffs - implicit_reopen - invalid_case_patterns - - iterable_contains_unrelated_type - join_return_with_assignment - leading_newlines_in_multiline_strings - library_annotations @@ -89,7 +88,6 @@ linter: - library_prefixes - library_private_types_in_public_api - lines_longer_than_80_chars - - list_remove_unrelated_type - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list diff --git a/docs/_snippets/core_concepts/counter_cubit_on_change_usage_output.sh.md b/docs/_snippets/core_concepts/counter_cubit_on_change_usage_output.sh.md index 5ec2535c4a3..da70e38da8e 100644 --- a/docs/_snippets/core_concepts/counter_cubit_on_change_usage_output.sh.md +++ b/docs/_snippets/core_concepts/counter_cubit_on_change_usage_output.sh.md @@ -1,4 +1,4 @@ ```sh -Change { currentState: 0, nextState: 1 } CounterCubit Change { currentState: 0, nextState: 1 } +Change { currentState: 0, nextState: 1 } ``` \ No newline at end of file diff --git a/docs/_snippets/core_concepts/simple_bloc_observer_on_event_output.sh.md b/docs/_snippets/core_concepts/simple_bloc_observer_on_event_output.sh.md index 118f6288cb5..edba31e32f5 100644 --- a/docs/_snippets/core_concepts/simple_bloc_observer_on_event_output.sh.md +++ b/docs/_snippets/core_concepts/simple_bloc_observer_on_event_output.sh.md @@ -1,8 +1,8 @@ ```sh -Increment CounterBloc Increment -Transition { currentState: 0, event: Increment, nextState: 1 } +Increment CounterBloc Transition { currentState: 0, event: Increment, nextState: 1 } -Change { currentState: 0, nextState: 1 } +Transition { currentState: 0, event: Increment, nextState: 1 } CounterBloc Change { currentState: 0, nextState: 1 } +Change { currentState: 0, nextState: 1 } ``` \ No newline at end of file diff --git a/docs/_snippets/core_concepts/simple_bloc_observer_on_transition_output.sh.md b/docs/_snippets/core_concepts/simple_bloc_observer_on_transition_output.sh.md index 94d816803f9..d457eae82c5 100644 --- a/docs/_snippets/core_concepts/simple_bloc_observer_on_transition_output.sh.md +++ b/docs/_snippets/core_concepts/simple_bloc_observer_on_transition_output.sh.md @@ -1,6 +1,6 @@ ```sh -Transition { currentState: 0, event: Increment, nextState: 1 } CounterBloc Transition { currentState: 0, event: Increment, nextState: 1 } -Change { currentState: 0, nextState: 1 } +Transition { currentState: 0, event: Increment, nextState: 1 } CounterBloc Change { currentState: 0, nextState: 1 } +Change { currentState: 0, nextState: 1 } ``` \ No newline at end of file diff --git a/docs/az/README.md b/docs/az/README.md index eabb96038e7..ae9de079ff1 100644 --- a/docs/az/README.md +++ b/docs/az/README.md @@ -11,7 +11,7 @@ --- -[BLoC design pattern](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc)-i həyata keçirməyə kömək edən gözlənilən vəziyyətin idarə edilməsi kitabxanası. +BLoC design pattern-i həyata keçirməyə kömək edən gözlənilən vəziyyətin idarə edilməsi kitabxanası. | Paketlər | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | diff --git a/docs/coreconcepts.md b/docs/coreconcepts.md index e6a67543286..da5e735c570 100644 --- a/docs/coreconcepts.md +++ b/docs/coreconcepts.md @@ -130,7 +130,7 @@ The above snippet would then output: [script](_snippets/core_concepts/counter_cubit_on_change_usage_output.sh.md ':include') -?> **Note**: The internal `onChange` override is called first, followed by `onChange` in `BlocObserver`. +?> **Note**: The internal `onChange` override is called first, which calls `super.onChange` notifying the `onChange` in the `BlocObserver`. ?> 💡 **Tip**: In `BlocObserver` we have access to the `Cubit` instance in addition to the `Change` itself. diff --git a/docs/cs/README.md b/docs/cs/README.md index c598d6af6fc..142987c07e9 100644 --- a/docs/cs/README.md +++ b/docs/cs/README.md @@ -11,7 +11,7 @@ --- -Prediktivní knihovna pro state management, která pomáhá implementovat [návrhový vzor BLoC](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +Prediktivní knihovna pro state management, která pomáhá implementovat návrhový vzor BLoC. | Balíček | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | @@ -70,7 +70,7 @@ V rámci této dokumentace se budeme držet originálního názvu `Bloc` (čti _ - + diff --git a/docs/de-de/README.md b/docs/de-de/README.md index 1035f985723..142ccf29cb0 100644 --- a/docs/de-de/README.md +++ b/docs/de-de/README.md @@ -11,7 +11,7 @@ --- -Eine vorhersagbare Zustandsverwaltungsbibliothek, die bei der Implementierung des [BLoC-Entwurfsmusters](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc) hilft. +Eine vorhersagbare Zustandsverwaltungsbibliothek, die bei der Implementierung des BLoC-Entwurfsmusters hilft. | Paket | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | @@ -68,7 +68,7 @@ Das Ziel dieser Bibliothek ist es, eine erleichterte Trennung von _Präsentation - + diff --git a/docs/es/README.md b/docs/es/README.md index bc50f5b7e7b..8916662cdf1 100644 --- a/docs/es/README.md +++ b/docs/es/README.md @@ -11,7 +11,7 @@ --- -Una librería de administración de estado predecible que ayuda a implementar el [patrón de diseño BLoC](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +Una librería de administración de estado predecible que ayuda a implementar el patrón de diseño BLoC. | Package | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | diff --git a/docs/fluttertodostutorial.md b/docs/fluttertodostutorial.md index 67a980b88fb..c366a372017 100644 --- a/docs/fluttertodostutorial.md +++ b/docs/fluttertodostutorial.md @@ -13,7 +13,7 @@ - [BlocObserver](/coreconcepts?id=blocobserver) to observe state changes. - [BlocProvider](/flutterbloccoreconcepts?id=blocprovider), a Flutter widget which provides a bloc to its children. - [BlocBuilder](/flutterbloccoreconcepts?id=blocbuilder), a Flutter widget that handles building the widget in response to new states. -- [BlocListener](/flutterbloccoreconcepts?id=bloclistener), a Flutter widget that handlers performing side effects in response to state changes. +- [BlocListener](/flutterbloccoreconcepts?id=bloclistener), a Flutter widget that handles performing side effects in response to state changes. - [RepositoryProvider](/flutterbloccoreconcepts?id=repositoryprovider), a Flutter widget to provide a repository to its children. - [Equatable](/faqs?id=when-to-use-equatable) to prevent unnecessary rebuilds. - [MultiBlocListener](/flutterbloccoreconcepts?id=multibloclistener), a Flutter widget that reduces nesting when using multiple BlocListeners. diff --git a/docs/fr/README.md b/docs/fr/README.md index c82ed378463..b231b68d660 100644 --- a/docs/fr/README.md +++ b/docs/fr/README.md @@ -11,7 +11,7 @@ --- -Une librairie pour gérer le state de notre application en implémentant le [paterne BLoC](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +Une librairie pour gérer le state de notre application en implémentant le paterne BLoC. | Package | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | @@ -68,7 +68,7 @@ Le but de cette architecte est de facilité la séparation entre _présentation_ - + diff --git a/docs/gettingstarted.md b/docs/gettingstarted.md index ffe55c189c8..c20fa6c0f69 100644 --- a/docs/gettingstarted.md +++ b/docs/gettingstarted.md @@ -44,6 +44,6 @@ For a Flutter application we can import `flutter_bloc`. [main.dart](_snippets/getting_started/flutter_bloc_main.dart.md ':include') -For an AngularDart application we can import angular_bloc. +For an AngularDart application we can import `angular_bloc`. [main.dart](_snippets/getting_started/angular_bloc_main.dart.md ':include') diff --git a/docs/jp/README.md b/docs/jp/README.md index ddc5bfe153f..cb28c62d7f1 100644 --- a/docs/jp/README.md +++ b/docs/jp/README.md @@ -16,7 +16,7 @@ --- -A predictable state management library that helps implement the [BLoC design pattern](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +A predictable state management library that helps implement the BLoC design pattern. | Package | Pub | | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | diff --git a/docs/ko-kr/README.md b/docs/ko-kr/README.md index ddc5bfe153f..cb28c62d7f1 100644 --- a/docs/ko-kr/README.md +++ b/docs/ko-kr/README.md @@ -16,7 +16,7 @@ --- -A predictable state management library that helps implement the [BLoC design pattern](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +A predictable state management library that helps implement the BLoC design pattern. | Package | Pub | | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | diff --git a/docs/pt-br/README.md b/docs/pt-br/README.md index d72f207781e..777f9982b46 100644 --- a/docs/pt-br/README.md +++ b/docs/pt-br/README.md @@ -11,7 +11,7 @@ --- -Uma biblioteca previsível de gerenciamento de estado que ajuda a implementar o [padrão de projeto BLoC](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +Uma biblioteca previsível de gerenciamento de estado que ajuda a implementar o padrão de projeto BLoC. | Package | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | @@ -69,7 +69,7 @@ O objetivo dessa biblioteca é tornar fácil separar _apresentação_ da _lógic - + diff --git a/docs/pt-br/gettingstarted.md b/docs/pt-br/gettingstarted.md index 39282376f3f..a38817163fd 100644 --- a/docs/pt-br/gettingstarted.md +++ b/docs/pt-br/gettingstarted.md @@ -4,9 +4,9 @@ ## Visão geral -O Bloc consiste em vários packages disponíveis no pub: +O Bloc consiste em vários pacotes disponíveis no pub: -- [bloc](https://pub.dev/packages/bloc) - Package principal para o bloc +- [bloc](https://pub.dev/packages/bloc) - Biblioteca principal do bloc - [flutter_bloc](https://pub.dev/packages/flutter_bloc) - Poderosos Widgets para Flutter desenvolvidos para trabalhar com bloc e construir aplicações mobile rápidas e reativas. - [angular_bloc](https://pub.dev/packages/angular_bloc) - Poderosos Componentes para Angular desenvolvidos para trabalhar com bloc e construir aplicações web rápidas e reativas. - [hydrated_bloc](https://pub.dev/packages/hydrated_bloc) - Uma extensão da biblioteca de gerenciamento de estado bloc que persiste e restaura automaticamente os estados do bloc. @@ -14,36 +14,36 @@ O Bloc consiste em vários packages disponíveis no pub: ## Instalação -A primeira coisa que precisamos fazer é adicionar o package bloc como uma dependência no `pubspec.yaml`. +Para uma aplicação [Dart](https://dart.dev/), precisamos adicionar o pacote `bloc` ao nosso `pubspec.yaml` como uma dependência. [pubspec.yaml](../_snippets/getting_started/bloc_pubspec.yaml.md ':include') -Para uma aplicação [Flutter](https://flutter.dev/), também é necessário adicionar o package flutter_bloc como uma dependência no `pubspec.yaml`. +Para uma aplicação [Flutter](https://flutter.dev/), precisamos adicionar o pacote `flutter_bloc` ao nosso `pubspec.yaml` como uma dependência. [pubspec.yaml](../_snippets/getting_started/flutter_bloc_pubspec.yaml.md ':include') -Para uma aplicação [AngularDart](https://angulardart.dev/), também é necessário adicionar o package angular_bloc como uma dependência no `pubspec.yaml`. +Para uma aplicação [AngularDart](https://angulardart.dev/), precisamos adicionar o pacote `angular_bloc` ao nosso `pubspec.yaml` como uma dependência. [pubspec.yaml](../_snippets/getting_started/angular_bloc_pubspec.yaml.md ':include') -Agora precisamos instalar o bloc. +Em seguida, precisamos instalar o bloc. -!> Execute os comandos abaixo no mesmo diretório em que se encontra o arquivo `pubspec.yaml`. +!> Certifique-se de executar o seguinte comando no mesmo diretório do arquivo `pubspec.yaml`. -- Para projetos Dart ou AngularDart execute `pub get` +- Para Dart ou AngularDart execute `pub get` -- Para projetos Flutter execute `flutter packages get` +- Para Flutter, execute `flutter packages get` ## Importações -Agora que instalamos o bloc, podemos criar o arquivo `main.dart` e importar o bloc. +Agora que instalamos o bloc com sucesso, podemos criar nosso `main.dart` e importar `bloc`. [main.dart](../_snippets/getting_started/bloc_main.dart.md ':include') -Para uma aplicação Flutter também podemos importar o flutter_bloc. +Para uma aplicação Flutter podemos importar `flutter_bloc`. [main.dart](../_snippets/getting_started/flutter_bloc_main.dart.md ':include') -Para uma aplicação AngularDart também podemos importar o angular_bloc. +Para uma aplicação AngularDart podemos importar `angular_bloc`. [main.dart](../_snippets/getting_started/angular_bloc_main.dart.md ':include') diff --git a/docs/pt-br/recipesflutternavigation.md b/docs/pt-br/recipesflutternavigation.md index 71eeeb9a920..ed7893e9a00 100644 --- a/docs/pt-br/recipesflutternavigation.md +++ b/docs/pt-br/recipesflutternavigation.md @@ -1,20 +1,20 @@ # Receitas: Navegação -> Nesta receita, veremos como usar o `BlocBuilder` e / ou o `BlocListener` para navegar. Vamos explorar duas abordagens: Navegação Direta e Navegação de Rota. +> Nesta receita, veremos como usar o `BlocBuilder` e/ou o `BlocListener` para navegar. Vamos explorar três abordagens: Navegação Direta, Navegação por Rota e Navegação Declarativa usando o Navigator 2.0. ## Navegação Direta -> Neste exemplo, veremos como usar o BlocBuilder para mostrar uma página específica (widget) em resposta a uma mudança de estado em um bloc sem o uso de uma rota. +> Neste exemplo, veremos como usar o `BlocBuilder` para mostrar uma página específica (widget) em resposta a uma mudança de estado em um bloc sem o uso de uma rota. -![demo](./assets/gifs/recipes_flutter_navigation_direct.gif) +![demo](../assets/gifs/recipes_flutter_navigation_direct.gif) ### Bloc -Vamos construir o `MyBloc`, que pegará o` MyEvents` e os converterá em `MyStates`. +Vamos construir o `MyBloc`, que pegará o `MyEvents` e os converterá em `MyStates`. #### MyEvent -Para simplificar, nosso `MyBloc` responderá apenas a dois `MyEvents`: `eventA` e` eventB`. +Para simplificar, nosso `MyBloc` responderá apenas a dois `MyEvents`: `EventA` e` EventB`. [my_event.dart](../_snippets/recipes_flutter_navigation/my_event.dart.md ':include') @@ -39,7 +39,7 @@ Agora vamos dar uma olhada em como conectar nosso `MyBloc` a um widget e mostrar [main.dart](../_snippets/recipes_flutter_navigation/direct_navigation/main.dart.md ':include') -?> Usamos o widget `BlocBuilder` para renderizar o widget correto em resposta a alterações de estado em nosso` MyBloc`. +?> Usamos o widget `BlocBuilder` para renderizar o widget correto em resposta a alterações de estado em nosso `MyBloc`. ?> Usamos o widget `BlocProvider` para tornar nossa instância do `MyBloc` disponível para toda a árvore do widget. @@ -47,9 +47,9 @@ O código completo dessa receita pode ser encontrado [aqui](https://gist.github. ## Navegação por Rotas -> Neste exemplo, veremos como usar o BlocListener para navegar para uma página específica (widget) em resposta a uma mudança de estado em um bloc usando uma rota. +> Neste exemplo, veremos como usar o `BlocListener` para navegar para uma página específica (widget) em resposta a uma mudança de estado em um bloc usando uma rota. -![demo](./assets/gifs/recipes_flutter_navigation_routes.gif) +![demo](../assets/gifs/recipes_flutter_navigation_routes.gif) ### Bloc @@ -61,8 +61,45 @@ Vamos dar uma olhada em como direcionar para uma página diferente com base no e [main.dart](../_snippets/recipes_flutter_navigation/route_navigation/main.dart.md ':include') -?> Usamos o widget `BlocListener` para empurrar uma nova rota em resposta a alterações de estado em nosso `MyBloc`. +?> Usamos o widget `BlocListener` para enviar uma nova rota em resposta a alterações de estado em nosso `MyBloc`. -!> Para fins deste exemplo, estamos adicionando um evento apenas para navegação. Em um aplicativo real, você não deve criar eventos de navegação explícitos. Se não houver uma "lógica comercial" necessária para ativar a navegação, você deve sempre navegar diretamente em resposta à entrada do usuário (no retorno de chamada `onPressed`, etc ...). Navegue apenas em resposta a alterações de estado se alguma "lógica de negócios" for necessária para determinar para onde navegar. +!> Para fins deste exemplo, estamos adicionando um evento apenas para navegação. Em um aplicativo real, você não deve criar eventos de navegação explícitos. Se não houver uma "lógica de negócios" necessária para acionar a navegação, você deve sempre navegar diretamente em resposta à entrada do usuário (no retorno de chamada `onPressed`, etc ...). Navegue apenas em resposta a alterações de estado se alguma "lógica de negócios" for necessária para determinar para onde navegar. O código completo dessa receita pode ser encontrado [aqui](https://gist.github.com/felangel/6bcd4be10c046ceb33eecfeb380135dd). + +## Navegação 2.0 + +> Neste exemplo, veremos como usar a API de páginas do Navigator 2.0 para lidar com o roteamento em resposta a mudanças de estado em um bloc. + +?> Observação: usaremos [package:flow_builder](https://pub.dev/packages/flow_builder) para simplificar o trabalho com a API do Navigator 2.0. + +### Bloc + +Para mostrar as vantagens do Navigator, construiremos um exemplo um pouco mais complexo. +Vamos construir `BookBloc` que pegará `BookEvents` e os converterá em `BookStates`. + +#### BookEvent + +`BookEvent` responderá a dois eventos: selecionar um livro e desmarcar um livro. + +[book_event.dart](../_snippets/recipes_flutter_navigation/navigation2/book_event.dart.md ':include') + +#### BookState + +`BookState` conterá a lista de livros e um livro selecionado opcional se o usuário tocar em um livro. + +[book_state.dart](../_snippets/recipes_flutter_navigation/navigation2/book_state.dart.md ':include') + +#### BookBloc + +`BookBloc` responderá a cada `BookEvent` e emitirá o `BookState` apropriado em resposta: + +[book_bloc.dart](../_snippets/recipes_flutter_navigation/navigation2/book_bloc.dart.md ':include') + +### UI Layer + +Agora vamos conectar o bloc à nossa UI usando `FlowBuilder`! + +[main.dart](../_snippets/recipes_flutter_navigation/navigation2/main.dart.md ':include') + +O código completo dessa receita pode ser encontrado [aqui](https://gist.github.com/felangel/bd3cf504a10c0763a32f7a94e2649369). diff --git a/docs/ru/README.md b/docs/ru/README.md index 46e185fdf9a..13bbd1583bb 100644 --- a/docs/ru/README.md +++ b/docs/ru/README.md @@ -11,7 +11,7 @@ --- -Предсказуемая библиотека управления состоянием, которая помогает реализовать [BLoC design pattern](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +Предсказуемая библиотека управления состоянием, которая помогает реализовать BLoC design pattern. | Package | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | diff --git a/docs/zh-cn/README.md b/docs/zh-cn/README.md index a349f0ffaa2..c8e6f085208 100644 --- a/docs/zh-cn/README.md +++ b/docs/zh-cn/README.md @@ -11,7 +11,7 @@ --- -一个可预测并控制状态的库来实现 [处理组件间业务逻辑(BLoC)的设计模式](https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc). +一个可预测并控制状态的库来实现 处理组件间业务逻辑(BLoC)的设计模式. | Package | Pub | | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | @@ -68,7 +68,7 @@ - + diff --git a/examples/flutter_dynamic_form/test/new_car/bloc/new_car_bloc_test.dart b/examples/flutter_dynamic_form/test/new_car/bloc/new_car_bloc_test.dart index dc2f345e45c..92f6b046e7c 100644 --- a/examples/flutter_dynamic_form/test/new_car/bloc/new_car_bloc_test.dart +++ b/examples/flutter_dynamic_form/test/new_car/bloc/new_car_bloc_test.dart @@ -149,7 +149,7 @@ void main() { models: mockModels, model: mockModel, years: mockYears, - ).copyWith(year: mockYear) + ).copyWith(year: mockYear), ], verify: (_) => verifyInOrder([ newCarRepository.fetchBrands, diff --git a/examples/flutter_firebase_login/lib/home/view/home_page.dart b/examples/flutter_firebase_login/lib/home/view/home_page.dart index 03d30df3f24..627cb1485ec 100644 --- a/examples/flutter_firebase_login/lib/home/view/home_page.dart +++ b/examples/flutter_firebase_login/lib/home/view/home_page.dart @@ -22,7 +22,7 @@ class HomePage extends StatelessWidget { onPressed: () { context.read().add(const AppLogoutRequested()); }, - ) + ), ], ), body: Align( diff --git a/examples/flutter_firebase_login/test/app/routes/routes_test.dart b/examples/flutter_firebase_login/test/app/routes/routes_test.dart index 520bbc5089b..56c58baa5d2 100644 --- a/examples/flutter_firebase_login/test/app/routes/routes_test.dart +++ b/examples/flutter_firebase_login/test/app/routes/routes_test.dart @@ -14,7 +14,7 @@ void main() { (p) => p.child, 'child', isA(), - ) + ), ], ); }); @@ -27,7 +27,7 @@ void main() { (p) => p.child, 'child', isA(), - ) + ), ], ); }); diff --git a/examples/flutter_firebase_login/test/login/cubit/login_cubit_test.dart b/examples/flutter_firebase_login/test/login/cubit/login_cubit_test.dart index 474275e9288..62e64fcc93d 100644 --- a/examples/flutter_firebase_login/test/login/cubit/login_cubit_test.dart +++ b/examples/flutter_firebase_login/test/login/cubit/login_cubit_test.dart @@ -138,7 +138,7 @@ void main() { email: validEmail, password: validPassword, isValid: true, - ) + ), ], ); @@ -174,7 +174,7 @@ void main() { email: validEmail, password: validPassword, isValid: true, - ) + ), ], ); @@ -208,7 +208,7 @@ void main() { email: validEmail, password: validPassword, isValid: true, - ) + ), ], ); }); @@ -230,7 +230,7 @@ void main() { act: (cubit) => cubit.logInWithGoogle(), expect: () => const [ LoginState(status: FormzSubmissionStatus.inProgress), - LoginState(status: FormzSubmissionStatus.success) + LoginState(status: FormzSubmissionStatus.success), ], ); @@ -249,7 +249,7 @@ void main() { LoginState( status: FormzSubmissionStatus.failure, errorMessage: 'oops', - ) + ), ], ); @@ -265,7 +265,7 @@ void main() { act: (cubit) => cubit.logInWithGoogle(), expect: () => const [ LoginState(status: FormzSubmissionStatus.inProgress), - LoginState(status: FormzSubmissionStatus.failure) + LoginState(status: FormzSubmissionStatus.failure), ], ); }); diff --git a/examples/flutter_firebase_login/test/sign_up/cubit/sign_up_cubit_test.dart b/examples/flutter_firebase_login/test/sign_up/cubit/sign_up_cubit_test.dart index bde09286d58..bfc12e1fe03 100644 --- a/examples/flutter_firebase_login/test/sign_up/cubit/sign_up_cubit_test.dart +++ b/examples/flutter_firebase_login/test/sign_up/cubit/sign_up_cubit_test.dart @@ -245,7 +245,7 @@ void main() { password: validPassword, confirmedPassword: validConfirmedPassword, isValid: true, - ) + ), ], ); @@ -283,7 +283,7 @@ void main() { password: validPassword, confirmedPassword: validConfirmedPassword, isValid: true, - ) + ), ], ); @@ -320,7 +320,7 @@ void main() { password: validPassword, confirmedPassword: validConfirmedPassword, isValid: true, - ) + ), ], ); }); diff --git a/examples/flutter_infinite_list/test/posts/bloc/post_bloc_test.dart b/examples/flutter_infinite_list/test/posts/bloc/post_bloc_test.dart index 1f8773f1845..3d6bddc820c 100644 --- a/examples/flutter_infinite_list/test/posts/bloc/post_bloc_test.dart +++ b/examples/flutter_infinite_list/test/posts/bloc/post_bloc_test.dart @@ -19,7 +19,7 @@ void main() { group('PostBloc', () { const mockPosts = [Post(id: 1, title: 'post title', body: 'post body')]; const extraMockPosts = [ - Post(id: 2, title: 'post title', body: 'post body') + Post(id: 2, title: 'post title', body: 'post body'), ]; late http.Client httpClient; @@ -58,7 +58,7 @@ void main() { build: () => PostBloc(httpClient: httpClient), act: (bloc) => bloc.add(PostFetched()), expect: () => const [ - PostState(status: PostStatus.success, posts: mockPosts) + PostState(status: PostStatus.success, posts: mockPosts), ], verify: (_) { verify(() => httpClient.get(_postsUrl(start: 0))).called(1); @@ -80,7 +80,7 @@ void main() { ..add(PostFetched()) ..add(PostFetched()), expect: () => const [ - PostState(status: PostStatus.success, posts: mockPosts) + PostState(status: PostStatus.success, posts: mockPosts), ], verify: (_) { verify(() => httpClient.get(any())).called(1); @@ -104,7 +104,7 @@ void main() { bloc.add(PostFetched()); }, expect: () => const [ - PostState(status: PostStatus.success, posts: mockPosts) + PostState(status: PostStatus.success, posts: mockPosts), ], verify: (_) { verify(() => httpClient.get(any())).called(1); @@ -145,7 +145,7 @@ void main() { status: PostStatus.success, posts: mockPosts, hasReachedMax: true, - ) + ), ], verify: (_) { verify(() => httpClient.get(_postsUrl(start: 1))).called(1); @@ -173,7 +173,7 @@ void main() { PostState( status: PostStatus.success, posts: [...mockPosts, ...extraMockPosts], - ) + ), ], verify: (_) { verify(() => httpClient.get(_postsUrl(start: 1))).called(1); diff --git a/examples/flutter_shopping_cart/lib/app.dart b/examples/flutter_shopping_cart/lib/app.dart index 8bfe3c6d98d..eb629d4ada7 100644 --- a/examples/flutter_shopping_cart/lib/app.dart +++ b/examples/flutter_shopping_cart/lib/app.dart @@ -22,7 +22,7 @@ class App extends StatelessWidget { create: (_) => CartBloc( shoppingRepository: shoppingRepository, )..add(CartStarted()), - ) + ), ], child: MaterialApp( title: 'Flutter Bloc Shopping Cart', diff --git a/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart b/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart index e69a09194f7..035a1981c53 100644 --- a/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart +++ b/examples/flutter_shopping_cart/lib/cart/view/cart_page.dart @@ -20,7 +20,7 @@ class CartPage extends StatelessWidget { ), ), Divider(height: 4, color: Colors.black), - CartTotal() + CartTotal(), ], ), ), diff --git a/examples/flutter_shopping_cart/test/cart/bloc/cart_bloc_test.dart b/examples/flutter_shopping_cart/test/cart/bloc/cart_bloc_test.dart index 5e194d12105..6698c0e489d 100644 --- a/examples/flutter_shopping_cart/test/cart/bloc/cart_bloc_test.dart +++ b/examples/flutter_shopping_cart/test/cart/bloc/cart_bloc_test.dart @@ -76,7 +76,7 @@ void main() { seed: () => CartLoaded(cart: Cart(items: mockItems)), act: (bloc) => bloc.add(CartItemAdded(mockItemToAdd)), expect: () => [ - CartLoaded(cart: Cart(items: [...mockItems, mockItemToAdd])) + CartLoaded(cart: Cart(items: [...mockItems, mockItemToAdd])), ], verify: (_) { verify(() => shoppingRepository.addItemToCart(mockItemToAdd)).called(1); @@ -112,7 +112,7 @@ void main() { seed: () => CartLoaded(cart: Cart(items: mockItems)), act: (bloc) => bloc.add(CartItemRemoved(mockItemToRemove)), expect: () => [ - CartLoaded(cart: Cart(items: [...mockItems]..remove(mockItemToRemove))) + CartLoaded(cart: Cart(items: [...mockItems]..remove(mockItemToRemove))), ], verify: (_) { verify( diff --git a/examples/flutter_timer/lib/timer/view/timer_page.dart b/examples/flutter_timer/lib/timer/view/timer_page.dart index d9d476ff058..8817b2a3ce0 100644 --- a/examples/flutter_timer/lib/timer/view/timer_page.dart +++ b/examples/flutter_timer/lib/timer/view/timer_page.dart @@ -108,7 +108,7 @@ class Actions extends StatelessWidget { context.read().add(const TimerReset()), ), ] - } + }, ], ); }, diff --git a/examples/flutter_todos/packages/local_storage_todos_api/lib/src/local_storage_todos_api.dart b/examples/flutter_todos/packages/local_storage_todos_api/lib/src/local_storage_todos_api.dart index 48e3fd8034d..cb931aabcb8 100644 --- a/examples/flutter_todos/packages/local_storage_todos_api/lib/src/local_storage_todos_api.dart +++ b/examples/flutter_todos/packages/local_storage_todos_api/lib/src/local_storage_todos_api.dart @@ -92,7 +92,7 @@ class LocalStorageTodosApi extends TodosApi { final changedTodosAmount = todos.where((t) => t.isCompleted != isCompleted).length; final newTodos = [ - for (final todo in todos) todo.copyWith(isCompleted: isCompleted) + for (final todo in todos) todo.copyWith(isCompleted: isCompleted), ]; _todoStreamController.add(newTodos); await _setValue(kTodosCollectionKey, json.encode(newTodos)); diff --git a/examples/flutter_todos/pubspec.lock b/examples/flutter_todos/pubspec.lock index 3a304538949..78702c9e14c 100644 --- a/examples/flutter_todos/pubspec.lock +++ b/examples/flutter_todos/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "8880b4cfe7b5b17d57c052a5a3a8cc1d4f546261c7cc8fbd717bd53f48db0568" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a url: "https://pub.dev" source: hosted - version: "59.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: a89627f49b0e70e068130a36571409726b04dab12da7e5625941d2c8ec278b96 + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 url: "https://pub.dev" source: hosted - version: "5.11.1" + version: "5.13.0" args: dependency: transitive description: name: args - sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" async: dependency: transitive description: @@ -37,18 +37,18 @@ packages: dependency: "direct main" description: name: bloc - sha256: "658a5ae59edcf1e58aac98b000a71c762ad8f46f1394c34a52050cafb3e11a80" + sha256: "3820f15f502372d979121de1f6b97bfcf1630ebff8fe1d52fb2b0bfa49be5b49" url: "https://pub.dev" source: hosted - version: "8.1.1" + version: "8.1.2" bloc_test: dependency: "direct dev" description: name: bloc_test - sha256: ffbb60c17ee3d8e3784cb78071088e353199057233665541e8ac6cd438dca8ad + sha256: af0de1a1e16a7536e95dcd7491e0a6d6078e11d2d691988e862280b74f5c7968 url: "https://pub.dev" source: hosted - version: "9.1.1" + version: "9.1.4" boolean_selector: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" convert: dependency: transitive description: @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.6.4" crypto: dependency: transitive description: @@ -133,18 +133,18 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" flutter: dependency: "direct main" description: flutter @@ -154,10 +154,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: "434951eea948dbe87f737b674281465f610b8259c16c097b8163ce138749a775" + sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae url: "https://pub.dev" source: hosted - version: "8.1.2" + version: "8.1.3" flutter_localizations: dependency: "direct main" description: flutter @@ -185,10 +185,10 @@ packages: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" http_multi_server: dependency: transitive description: @@ -209,10 +209,10 @@ packages: dependency: "direct main" description: name: intl - sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.18.0" + version: "0.18.1" io: dependency: transitive description: @@ -248,26 +248,26 @@ packages: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: @@ -288,18 +288,18 @@ packages: dependency: "direct dev" description: name: mockingjay - sha256: c31b9850139a2a54d6bcfa02af022a8b15bf7c0bb83b0d5881e001e396fa91de + sha256: "9ef2c471ab3db0f19a8e9600e255297ac13d1130a9b8f1926294ee6d0cb7d68f" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.4.0" mocktail: dependency: "direct dev" description: name: mocktail - sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53" + sha256: bac151b31e4ed78bd59ab89aa4c0928f297b1180186d5daf03734519e5f596c1 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.1" nested: dependency: transitive description: @@ -336,42 +336,42 @@ packages: dependency: transitive description: name: path_provider_linux - sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.10" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.1" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.6" + version: "2.2.1" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.6" pool: dependency: transitive description: @@ -380,14 +380,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" provider: dependency: transitive description: @@ -416,58 +408,58 @@ packages: dependency: transitive description: name: shared_preferences - sha256: "858aaa72d8f61637d64e776aca82e1c67e6d9ee07979123c5d17115031c1b13b" + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.2" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "6478c6bbbecfe9aced34c483171e90d7c078f5883558b30ec3163cf18402c749" + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.1" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "0c1c16c56c9708aa9c361541a6f0e5cc6fc12a3232d866a687a7b7db30032b07" + sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.4" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "9d387433ca65717bbf1be88f4d5bb18f10508917a8fa2fb02e0fd0d7479a9afa" + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: fb5cf25c0235df2d0640ac1b1174f6466bd311f621574997ac59018a6664548d + sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "74083203a8eae241e0de4a0d597dbedab3b8fef5563f33cf3c12d7e93c655ca5" + sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.1" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "5e588e2efef56916a3b229c3bfe81e6a525665a454519ca51dbcc4236a274173" + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" shelf: dependency: transitive description: @@ -525,10 +517,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: @@ -565,26 +557,26 @@ packages: dependency: transitive description: name: test - sha256: "3dac9aecf2c3991d09b9cdde4f98ded7b30804a88a0d7e4e7e1678e78d6b97f4" + sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" url: "https://pub.dev" source: hosted - version: "1.24.1" + version: "1.24.3" test_api: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.0" test_core: dependency: transitive description: name: test_core - sha256: "5138dbffb77b2289ecb12b81c11ba46036590b72a64a7a90d6ffb880f1a29e93" + sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.5.3" todos_api: dependency: "direct main" description: @@ -603,10 +595,10 @@ packages: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" uuid: dependency: transitive description: @@ -627,18 +619,26 @@ packages: dependency: transitive description: name: vm_service - sha256: d1ba6ce3fa60807433511f943b51607bd7073f8fe5c14286d66fec8e05c8d24c + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 url: "https://pub.dev" source: hosted - version: "11.5.0" + version: "11.10.0" watcher: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" web_socket_channel: dependency: transitive description: @@ -651,26 +651,26 @@ packages: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" win32: dependency: transitive description: name: win32 - sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" + sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" url: "https://pub.dev" source: hosted - version: "4.1.4" + version: "5.0.9" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.3" yaml: dependency: transitive description: @@ -680,5 +680,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" - flutter: ">=3.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" + flutter: ">=3.7.3" diff --git a/examples/flutter_todos/pubspec.yaml b/examples/flutter_todos/pubspec.yaml index 0417e8d7698..d8452bc5fd8 100644 --- a/examples/flutter_todos/pubspec.yaml +++ b/examples/flutter_todos/pubspec.yaml @@ -26,8 +26,8 @@ dev_dependencies: bloc_test: ^9.1.0 flutter_test: sdk: flutter - mockingjay: ^0.3.0 - mocktail: ^0.3.0 + mockingjay: ^0.4.0 + mocktail: ^1.0.0 flutter: uses-material-design: true diff --git a/examples/flutter_weather/lib/search/view/search_page.dart b/examples/flutter_weather/lib/search/view/search_page.dart index 6449359c1d0..a70803ed513 100644 --- a/examples/flutter_weather/lib/search/view/search_page.dart +++ b/examples/flutter_weather/lib/search/view/search_page.dart @@ -44,7 +44,7 @@ class _SearchPageState extends State { key: const Key('searchPage_search_iconButton'), icon: const Icon(Icons.search, semanticLabel: 'Submit'), onPressed: () => Navigator.of(context).pop(_text), - ) + ), ], ), ); diff --git a/examples/flutter_weather/packages/open_meteo_api/lib/src/open_meteo_api_client.dart b/examples/flutter_weather/packages/open_meteo_api/lib/src/open_meteo_api_client.dart index 103eb517662..131461bd903 100644 --- a/examples/flutter_weather/packages/open_meteo_api/lib/src/open_meteo_api_client.dart +++ b/examples/flutter_weather/packages/open_meteo_api/lib/src/open_meteo_api_client.dart @@ -62,7 +62,7 @@ class OpenMeteoApiClient { final weatherRequest = Uri.https(_baseUrlWeather, 'v1/forecast', { 'latitude': '$latitude', 'longitude': '$longitude', - 'current_weather': 'true' + 'current_weather': 'true', }); final weatherResponse = await _httpClient.get(weatherRequest); diff --git a/examples/flutter_weather/packages/open_meteo_api/test/open_meteo_api_client_test.dart b/examples/flutter_weather/packages/open_meteo_api/test/open_meteo_api_client_test.dart index 60a36aa6e8f..a6b0aec63a6 100644 --- a/examples/flutter_weather/packages/open_meteo_api/test/open_meteo_api_client_test.dart +++ b/examples/flutter_weather/packages/open_meteo_api/test/open_meteo_api_client_test.dart @@ -129,7 +129,7 @@ void main() { Uri.https('api.open-meteo.com', 'v1/forecast', { 'latitude': '$latitude', 'longitude': '$longitude', - 'current_weather': 'true' + 'current_weather': 'true', }), ), ).called(1); diff --git a/examples/flutter_wizard/lib/main.dart b/examples/flutter_wizard/lib/main.dart index ccf2e4bb42d..968e6d289b6 100644 --- a/examples/flutter_wizard/lib/main.dart +++ b/examples/flutter_wizard/lib/main.dart @@ -122,7 +122,7 @@ class _ProfileNameFormState extends State { .add(ProfileWizardNameSubmitted(_name)) : null, child: const Text('Continue'), - ) + ), ], ), ), @@ -164,7 +164,7 @@ class _ProfileAgeFormState extends State { .add(ProfileWizardAgeSubmitted(_age)) : null, child: const Text('Continue'), - ) + ), ], ), ), diff --git a/packages/bloc/test/bloc_test.dart b/packages/bloc/test/bloc_test.dart index 1f88bc6ecc7..e6205412bf7 100644 --- a/packages/bloc/test/bloc_test.dart +++ b/packages/bloc/test/bloc_test.dart @@ -277,7 +277,7 @@ void main() { test('single Increment event updates state to 1', () { final expectedStates = [1, emitsDone]; final expectedTransitions = [ - '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''' + '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''', ]; final counterBloc = CounterBloc( onEventCallback: events.add, @@ -469,7 +469,7 @@ void main() { expect( transitions, const [ - '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''' + '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''', ], ); }); diff --git a/packages/bloc/test/bloc_test_legacy.dart b/packages/bloc/test/bloc_test_legacy.dart index 0eacf16b1ff..d3959722bf2 100644 --- a/packages/bloc/test/bloc_test_legacy.dart +++ b/packages/bloc/test/bloc_test_legacy.dart @@ -303,7 +303,7 @@ void main() { () { final expectedStates = [1, emitsDone]; final expectedTransitions = [ - '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''' + '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''', ]; final counterBloc = CounterBloc( onEventCallback: events.add, @@ -503,7 +503,7 @@ void main() { expect( transitions, const [ - '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''' + '''Transition { currentState: 0, event: CounterEvent.increment, nextState: 1 }''', ], ); }); diff --git a/packages/bloc_concurrency/test/src/restartable_test.dart b/packages/bloc_concurrency/test/src/restartable_test.dart index 128521c960f..cf1a50d99ba 100644 --- a/packages/bloc_concurrency/test/src/restartable_test.dart +++ b/packages/bloc_concurrency/test/src/restartable_test.dart @@ -43,7 +43,7 @@ void main() { Increment(), Increment(), Increment(), - Increment() + Increment(), ]), ); @@ -70,7 +70,7 @@ void main() { Increment(), Increment(), Increment(), - Increment() + Increment(), ]), ); diff --git a/packages/flutter_bloc/test/bloc_builder_test.dart b/packages/flutter_bloc/test/bloc_builder_test.dart index 17f9c4cc0c3..a6c29f44512 100644 --- a/packages/flutter_bloc/test/bloc_builder_test.dart +++ b/packages/flutter_bloc/test/bloc_builder_test.dart @@ -120,7 +120,7 @@ class MyCounterAppState extends State { key: const Key('myCounterAppIncrementButton'), onPressed: _cubit.increment, child: const SizedBox(), - ) + ), ], ), ), diff --git a/packages/flutter_bloc/test/bloc_provider_test.dart b/packages/flutter_bloc/test/bloc_provider_test.dart index 36579a33d11..f84172a93eb 100644 --- a/packages/flutter_bloc/test/bloc_provider_test.dart +++ b/packages/flutter_bloc/test/bloc_provider_test.dart @@ -81,7 +81,7 @@ class _MyStatefulAppState extends State { onPressed: () { setState(() => cubit = CounterCubit()); }, - ) + ), ], ), body: widget.child, diff --git a/packages/flutter_bloc/test/multi_bloc_provider_test.dart b/packages/flutter_bloc/test/multi_bloc_provider_test.dart index d0f3809accb..61469cd53ba 100644 --- a/packages/flutter_bloc/test/multi_bloc_provider_test.dart +++ b/packages/flutter_bloc/test/multi_bloc_provider_test.dart @@ -165,7 +165,7 @@ void main() { MultiBlocProvider( providers: [ BlocProvider(create: (_) => CounterCubit()), - BlocProvider(create: (_) => ThemeCubit()) + BlocProvider(create: (_) => ThemeCubit()), ], child: const MyApp(), ), @@ -187,7 +187,7 @@ void main() { MultiBlocProvider( providers: [ BlocProvider(create: (_) => CounterCubit()), - BlocProvider(create: (_) => ThemeCubit()) + BlocProvider(create: (_) => ThemeCubit()), ], child: const MyApp(), ), diff --git a/packages/flutter_bloc/test/repository_provider_test.dart b/packages/flutter_bloc/test/repository_provider_test.dart index 5e33383cb44..294d9d6f3d9 100644 --- a/packages/flutter_bloc/test/repository_provider_test.dart +++ b/packages/flutter_bloc/test/repository_provider_test.dart @@ -65,7 +65,7 @@ class _MyStatefulAppState extends State { onPressed: () { setState(() => _repository = const Repository(0)); }, - ) + ), ], ), body: widget.child, diff --git a/packages/hydrated_bloc/test/cubits/list_cubit.dart b/packages/hydrated_bloc/test/cubits/list_cubit.dart index d184d254b6b..77016674ba8 100644 --- a/packages/hydrated_bloc/test/cubits/list_cubit.dart +++ b/packages/hydrated_bloc/test/cubits/list_cubit.dart @@ -33,7 +33,7 @@ class ListCubitMap, E> extends HydratedCubit> { (x) => x.toJson(), ), ) - : state + : state, }; return map; } @@ -65,7 +65,7 @@ class ListCubitList, E> extends HydratedCubit> { (x) => x.toJson(), ), ) - : state + : state, }; return map; } diff --git a/packages/hydrated_bloc/test/hydrated_bloc_test.dart b/packages/hydrated_bloc/test/hydrated_bloc_test.dart index bc5eeab8b3d..252eda061b9 100644 --- a/packages/hydrated_bloc/test/hydrated_bloc_test.dart +++ b/packages/hydrated_bloc/test/hydrated_bloc_test.dart @@ -191,7 +191,7 @@ void main() { bloc.add(Increment()); await expectLater(bloc.stream, emitsInOrder(const [43])); expect(fromJsonCalls, [ - {'value': 42} + {'value': 42}, ]); }); diff --git a/packages/hydrated_bloc/test/hydrated_cubit_test.dart b/packages/hydrated_bloc/test/hydrated_cubit_test.dart index 50668d222d5..11ec154e321 100644 --- a/packages/hydrated_bloc/test/hydrated_cubit_test.dart +++ b/packages/hydrated_bloc/test/hydrated_cubit_test.dart @@ -151,7 +151,7 @@ void main() { cubit.increment(); expect(cubit.state, 43); expect(fromJsonCalls, [ - {'value': 42} + {'value': 42}, ]); }); diff --git a/packages/hydrated_bloc/test/hydrated_storage_test.dart b/packages/hydrated_bloc/test/hydrated_storage_test.dart index 5b3da538a5f..84c006bd7e5 100644 --- a/packages/hydrated_bloc/test/hydrated_storage_test.dart +++ b/packages/hydrated_bloc/test/hydrated_storage_test.dart @@ -30,7 +30,7 @@ void main() { test('returns correct value when file exists', () async { File('${storageDirectory.path}/.hydrated_bloc.json').writeAsStringSync( json.encode({ - 'CounterBloc': json.encode({'value': 4}) + 'CounterBloc': json.encode({'value': 4}), }), ); storage = await HydratedStorage.build(