Skip to content

Instantly share code, notes, and snippets.

☕️
coding

Felix Angelov felangel

Block or report user

Report or block felangel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@felangel
felangel / login_event.dart
Created Apr 27, 2019
[flutter_firebase_login] Login Events
View login_event.dart
import 'package:meta/meta.dart';
import 'package:equatable/equatable.dart';
@immutable
abstract class LoginEvent extends Equatable {
LoginEvent([List props = const []]) : super(props);
}
class EmailChanged extends LoginEvent {
final String email;
@felangel
felangel / login_state.dart
Created Apr 27, 2019
[flutter_firebase_login] Login States
View login_state.dart
import 'package:meta/meta.dart';
@immutable
class LoginState {
final bool isEmailValid;
final bool isPasswordValid;
final bool isSubmitting;
final bool isSuccess;
final bool isFailure;
@felangel
felangel / main.dart
Created Apr 27, 2019
[flutter_firbase_login] App (5)
View main.dart
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_firebase_login/authentication_bloc/bloc.dart';
import 'package:flutter_firebase_login/user_repository.dart';
import 'package:flutter_firebase_login/home_screen.dart';
import 'package:flutter_firebase_login/splash_screen.dart';
import 'package:flutter_firebase_login/simple_bloc_delegate.dart';
main() {
@felangel
felangel / home_screen.dart
Created Apr 27, 2019
[flutter_firebase_login] Home Screen
View home_screen.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_firebase_login/authentication_bloc/bloc.dart';
class HomeScreen extends StatelessWidget {
final String name;
HomeScreen({Key key, @required this.name}) : super(key: key);
@override
@felangel
felangel / main.dart
Created Apr 27, 2019
[flutter_firebase_login] App (4)
View main.dart
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_firebase_login/authentication_bloc/bloc.dart';
import 'package:flutter_firebase_login/user_repository.dart';
import 'package:flutter_firebase_login/splash_screen.dart';
import 'package:flutter_firebase_login/simple_bloc_delegate.dart';
main() {
BlocSupervisor().delegate = SimpleBlocDelegate();
@felangel
felangel / splash_screen.dart
Created Apr 27, 2019
[flutter_firebase_login] Splash Screen
View splash_screen.dart
import 'package:flutter/material.dart';
class SplashScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(child: Text('Splash Screen')),
);
}
}
@felangel
felangel / main.dart
Created Apr 27, 2019
[flutter_firebase_login] App (3)
View main.dart
import 'package:flutter_firebase_login/simple_bloc_delegate.dart';
main() {
BlocSupervisor().delegate = SimpleBlocDelegate();
runApp(App());
}
@felangel
felangel / simple_bloc_delegate.dart
Created Apr 27, 2019
[flutter_firebase_login] Bloc Delegate
View simple_bloc_delegate.dart
import 'package:bloc/bloc.dart';
class SimpleBlocDelegate extends BlocDelegate {
@override
void onError(Object error, StackTrace stacktrace) {
super.onError(error, stacktrace);
print(error);
}
@override
@felangel
felangel / main.dart
Created Apr 27, 2019
[flutter_firebase_login] App (2)
View main.dart
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_firebase_login/authentication_bloc/bloc.dart';
import 'package:flutter_firebase_login/user_repository.dart';
main() {
runApp(App());
}
@felangel
felangel / main.dart
Created Apr 27, 2019
[flutter_firebase_login] App (1)
View main.dart
import 'package:flutter/material.dart';
main() {
runApp(App());
}
You can’t perform that action at this time.