This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:flutter_login/authentication/authentication.dart'; | |
import 'package:flutter_login/login/login.dart'; | |
class LoginForm extends StatefulWidget { | |
final LoginBloc loginBloc; | |
final AuthenticationBloc authenticationBloc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:bloc/bloc.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:user_repository/user_repository.dart'; | |
import 'package:flutter_login/authentication/authentication.dart'; | |
import 'package:flutter_login/splash/splash.dart'; | |
import 'package:flutter_login/login/login.dart'; | |
import 'package:flutter_login/home/home.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:mockito/mockito.dart'; | |
import 'package:user_repository/user_repository.dart'; | |
import 'package:flutter_login/authentication/authentication.dart'; | |
class MockUserRepository extends Mock implements UserRepository {} | |
void main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:meta/meta.dart'; | |
import 'package:equatable/equatable.dart'; | |
abstract class AuthenticationState extends Equatable { | |
AuthenticationState([Iterable props]) : super(props); | |
} | |
class AuthenticationUninitialized extends AuthenticationState { | |
@override | |
String toString() => 'AuthenticationUninitialized'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:mockito/mockito.dart'; | |
import 'package:user_repository/user_repository.dart'; | |
import 'package:flutter_login/authentication/authentication.dart'; | |
class MockUserRepository extends Mock implements UserRepository {} | |
void main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:meta/meta.dart'; | |
import 'package:equatable/equatable.dart'; | |
class LoginState extends Equatable { | |
final bool isLoading; | |
final bool isLoginButtonEnabled; | |
final String error; | |
final String token; | |
LoginState({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:mockito/mockito.dart'; | |
import 'package:user_repository/user_repository.dart'; | |
import 'package:flutter_login/authentication/authentication.dart'; | |
import 'package:flutter_login/login/login.dart'; | |
class MockUserRepository extends Mock implements UserRepository {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:bloc/bloc.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:meta/meta.dart'; | |
import 'package:bloc/bloc.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
void main() => runApp(MyApp()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:bloc/bloc.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
class SimpleBlocDelegate extends BlocDelegate { | |
@override | |
void onTransition(Transition transition) { |