App error entity

PHOTO EMBED

Tue Jan 09 2024 10:06:00 GMT+0000 (Coordinated Universal Time)

Saved by @Samuel1347 #flutter #dart

import 'package:equatable/equatable.dart';

class AppError extends Equatable {
  final AppErrorType appErrorType;
  final String errorMessage;
  const AppError( {required this.appErrorType, this.errorMessage = ''});

  @override
  List<Object> get props => [appErrorType];
}

enum AppErrorType {
  api,
  network,
  database,
  unauthorised,
  sessionDenied,
  msgError,
  emailValidation
}
content_copyCOPY