Last active
January 24, 2021 16:19
-
-
Save CoderJava/004e9be370c8abba2f55d87ebcf43541 to your computer and use it in GitHub Desktop.
profile_state.dart flutter crud cubit
This file contains hidden or 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_crud_cubit/model/profile_data.dart'; | |
abstract class ProfileState {} | |
class InitialProfileState extends ProfileState {} | |
class LoadingProfileState extends ProfileState {} | |
class FailureLoadAllProfileState extends ProfileState { | |
final String errorMessage; | |
FailureLoadAllProfileState(this.errorMessage); | |
@override | |
String toString() { | |
return 'FailureLoadAllProfileState{errorMessage: $errorMessage}'; | |
} | |
} | |
class SuccessLoadAllProfileState extends ProfileState { | |
final List<ProfileData> listProfiles; | |
final String message; | |
SuccessLoadAllProfileState(this.listProfiles, {this.message}); | |
@override | |
String toString() { | |
return 'SuccessLoadAllProfileState{listProfiles: $listProfiles, message: $message}'; | |
} | |
} | |
class FailureSubmitProfileState extends ProfileState { | |
final String errorMessage; | |
FailureSubmitProfileState(this.errorMessage); | |
@override | |
String toString() { | |
return 'FailureSubmitProfileState{errorMessage: $errorMessage}'; | |
} | |
} | |
class SuccessSubmitProfileState extends ProfileState {} | |
class FailureDeleteProfileState extends ProfileState { | |
final String errorMessage; | |
FailureDeleteProfileState(this.errorMessage); | |
@override | |
String toString() { | |
return 'FailureDeleteProfileState{errorMessage: $errorMessage}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment