Created
January 23, 2022 15:14
-
-
Save mariopepe/57443c1bd35caf7765e70288f0bc64cc to your computer and use it in GitHub Desktop.
failures.dart
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:freezed_annotation/freezed_annotation.dart'; | |
part 'failures.freezed.dart'; | |
@freezed | |
class FailureEntity with _$FailureEntity { | |
const FailureEntity._(); // This constructor is needed to have custom methods in Freezed. | |
const factory FailureEntity.serverFailure() = ServerFailure; | |
const factory FailureEntity.dataParsingFailure() = DataParsingFailure; | |
const factory FailureEntity.noConnectionFailure() = NoConnectionFailure; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment