FormatterException when running build_runner build on flutter 3
Closed this issue · 0 comments
maximveksler commented
m@m-inspiron5567:~/code/flutter_firebase_phone_auth_riverpod$ git log -1
commit f951d8818361e7ce80a5703714e58af9652c03d7 (HEAD -> main, origin/main, origin/HEAD)
Author: Julien LE BREN <julien@lebren.fr>
Date: Tue May 31 09:17:00 2022 +0200
Upgraded some packages
m@m-inspiron5567:~/code/flutter_firebase_phone_auth_riverpod$ git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
m@m-inspiron5567:~/code/flutter_firebase_phone_auth_riverpod$ flutter pub run build_runner build --delete-conflicting-outputs
[INFO] Generating build script...
[INFO] Generating build script completed, took 379ms
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 73ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 724ms
[INFO] Running build...
[INFO] Running build completed, took 22ms
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 37ms
[SEVERE] freezed:freezed on lib/state/auth_state.dart (cached):
An error `FormatterException` occurred while formatting the generated source for
`package:flutter_firebase_phone_auth_riverpod/state/auth_state.dart`
which was output to
`lib/state/auth_state.freezed.dart`.
This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:
line 21, column 147 of .: Expected to find ')'.
╷
21 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() initializing,required TResult Function( CountryWithPhoneCode* country) ready,required TResult Function( String* errorText) error,}) => throw _privateConstructorUsedError;
│ ^
╵
line 21, column 198 of .: Expected to find ')'.
╷
21 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() initializing,required TResult Function( CountryWithPhoneCode* country) ready,required TResult Function( String* errorText) error,}) => throw _privateConstructorUsedError;
│ ^
╵
line 22, column 137 of .: Expected to find ')'.
╷
22 │ @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult Function()? initializing,TResult Function( CountryWithPhoneCode* country)? ready,TResult Function( String* errorText)? error,}) => throw _privateConstructorUsedError;
│ ^
╵
line 22, column 180 of .: Expected to find ')'.
╷
22 │ @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult Function()? initializing,TResult Function( CountryWithPhoneCode* country)? ready,TResult Function( String* errorText)? error,}) => throw _privateConstructorUsedError;
│ ^
╵
line 23, column 135 of .: Expected to find ')'.
╷
23 │ @optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? initializing,TResult Function( CountryWithPhoneCode* country)? ready,TResult Function( String* errorText)? error,required TResult orElse(),}) => throw _privateConstructorUsedError;
│ ^
╵
line 23, column 178 of .: Expected to find ')'.
╷
23 │ @optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? initializing,TResult Function( CountryWithPhoneCode* country)? ready,TResult Function( String* errorText)? error,required TResult orElse(),}) => throw _privateConstructorUsedError;
│ ^
╵
line 100, column 147 of .: Expected to find ')'.
╷
100 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() initializing,required TResult Function( CountryWithPhoneCode* country) ready,required TResult Function( String* errorText) error,}) {
│ ^
╵
line 100, column 198 of .: Expected to find ')'.
╷
100 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() initializing,required TResult Function( CountryWithPhoneCode* country) ready,required TResult Function( String* errorText) error,}) {
│ ^
╵
line 104, column 137 of .: Expected to find ')'.
╷
104 │ @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult Function()? initializing,TResult Function( CountryWithPhoneCode* country)? ready,TResult Function( String* errorText)? error,}) {
│ ^
╵
line 104, column 180 of .: Expected to find ')'.
╷
104 │ @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult Function()? initializing,TResult Function( CountryWithPhoneCode* country)? ready,TResult Function( String* errorText)? error,}) {
│ ^
╵
(40 more errors...)
[SEVERE] freezed:freezed on lib/state/sign_in_state.dart (cached):
An error `FormatterException` occurred while formatting the generated source for
`package:flutter_firebase_phone_auth_riverpod/state/sign_in_state.dart`
which was output to
`lib/state/sign_in_state.freezed.dart`.
This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:
line 21, column 242 of .: Expected to find ')'.
╷
21 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() notValid,required TResult Function() canSubmit,required TResult Function() loading,required TResult Function() success,required TResult Function( String* errorText) error,}) => throw _privateConstructorUsedError;
│ ^
╵
line 22, column 208 of .: Expected to find ')'.
╷
22 │ @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult Function()? notValid,TResult Function()? canSubmit,TResult Function()? loading,TResult Function()? success,TResult Function( String* errorText)? error,}) => throw _privateConstructorUsedError;
│ ^
╵
line 23, column 206 of .: Expected to find ')'.
╷
23 │ @optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? notValid,TResult Function()? canSubmit,TResult Function()? loading,TResult Function()? success,TResult Function( String* errorText)? error,required TResult orElse(),}) => throw _privateConstructorUsedError;
│ ^
╵
line 107, column 242 of .: Expected to find ')'.
╷
107 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() notValid,required TResult Function() canSubmit,required TResult Function() loading,required TResult Function() success,required TResult Function( String* errorText) error,}) {
│ ^
╵
line 111, column 208 of .: Expected to find ')'.
╷
111 │ @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult Function()? notValid,TResult Function()? canSubmit,TResult Function()? loading,TResult Function()? success,TResult Function( String* errorText)? error,}) {
│ ^
╵
line 115, column 206 of .: Expected to find ')'.
╷
115 │ @optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? notValid,TResult Function()? canSubmit,TResult Function()? loading,TResult Function()? success,TResult Function( String* errorText)? error,required TResult orElse(),}) {
│ ^
╵
line 205, column 242 of .: Expected to find ')'.
╷
205 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() notValid,required TResult Function() canSubmit,required TResult Function() loading,required TResult Function() success,required TResult Function( String* errorText) error,}) {
│ ^
╵
line 209, column 208 of .: Expected to find ')'.
╷
209 │ @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult Function()? notValid,TResult Function()? canSubmit,TResult Function()? loading,TResult Function()? success,TResult Function( String* errorText)? error,}) {
│ ^
╵
line 213, column 206 of .: Expected to find ')'.
╷
213 │ @optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? notValid,TResult Function()? canSubmit,TResult Function()? loading,TResult Function()? success,TResult Function( String* errorText)? error,required TResult orElse(),}) {
│ ^
╵
line 303, column 242 of .: Expected to find ')'.
╷
303 │ @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() notValid,required TResult Function() canSubmit,required TResult Function() loading,required TResult Function() success,required TResult Function( String* errorText) error,}) {
│ ^
╵
(21 more errors...)
[SEVERE] Failed after 81ms
pub finished with exit code 1