fb_auth icon indicating copy to clipboard operation
fb_auth copied to clipboard

Example does not work

Open brunofgs opened this issue 6 years ago • 2 comments

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.

brunofgs avatar Nov 28 '19 23:11 brunofgs

https://github.com/felangel/bloc/issues/603#issuecomment-545305975

replace dispatch with add.

sallaben avatar Feb 14 '20 01:02 sallaben

Please feel free to make a PR. firebase_auth now supports the web.

rodydavis avatar Feb 14 '20 03:02 rodydavis