fb_auth
fb_auth copied to clipboard
Example does not work
the example doesnt work:
packages/padel/main.dart:27:27: Error: Too few positional arguments: 1 required, 0 given. final _fbAuth = FBAuth(); ^ packages/padel/main.dart:26:11: Error: The method 'dispatch' isn't defined for the class 'AuthBloc'.
- 'AuthBloc' is from 'package:fb_auth/data/blocs/auth/auth_bloc.dart' ('packages/fb_auth/data/blocs/auth/auth_bloc.dart'). Try correcting the name to the name of an existing method, or defining a method named 'dispatch'. _auth.dispatch(CheckUser()); ^^^^^^^^ packages/padel/main.dart:29:13: Error: The method 'dispatch' isn't defined for the class 'AuthBloc'.
- 'AuthBloc' is from 'package:fb_auth/data/blocs/auth/auth_bloc.dart' ('packages/fb_auth/data/blocs/auth/auth_bloc.dart'). Try correcting the name to the name of an existing method, or defining a method named 'dispatch'. _auth.dispatch(UpdateUser(user)); ^^^^^^^^ packages/padel/main.dart:36:11: Error: The method 'dispose' isn't defined for the class 'AuthBloc'.
- 'AuthBloc' is from 'package:fb_auth/data/blocs/auth/auth_bloc.dart' ('packages/fb_auth/data/blocs/auth/auth_bloc.dart'). Try correcting the name to the name of an existing method, or defining a method named 'dispose'. _auth.dispose(); ^^^^^^^ packages/padel/main.dart:125:35: Error: The method 'dispatch' isn't defined for the class 'AuthBloc'.
- 'AuthBloc' is from 'package:fb_auth/data/blocs/auth/auth_bloc.dart' ('packages/fb_auth/data/blocs/auth/auth_bloc.dart'). Try correcting the name to the name of an existing method, or defining a method named 'dispatch'. _auth.dispatch(CreateAccount(_email, _password, ^^^^^^^^ packages/padel/main.dart:137:35: Error: The method 'dispatch' isn't defined for the class 'AuthBloc'.
- 'AuthBloc' is from 'package:fb_auth/data/blocs/auth/auth_bloc.dart' ('packages/fb_auth/data/blocs/auth/auth_bloc.dart'). Try correcting the name to the name of an existing method, or defining a method named 'dispatch'. _auth.dispatch(LoginEvent(_email, _password)); ^^^^^^^^ packages/padel/main.dart:180:48: Error: The method 'dispatch' isn't defined for the class 'AuthBloc'.
- 'AuthBloc' is from 'package:fb_auth/data/blocs/auth/auth_bloc.dart' ('packages/fb_auth/data/blocs/auth/auth_bloc.dart'). Try correcting the name to the name of an existing method, or defining a method named 'dispatch'. BlocProvider.of<AuthBloc>(context).dispatch(LogoutEvent(_user)); ^^^^^^^^
But otherwise, thank you for porting this to web flutter.
https://github.com/felangel/bloc/issues/603#issuecomment-545305975
replace dispatch with add.
Please feel free to make a PR. firebase_auth now supports the web.