File tree Expand file tree Collapse file tree
lib/features/bitcoin_price/presentation/cubit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ import 'package:freezed_annotation/freezed_annotation.dart';
88part 'price_chart_cubit.freezed.dart' ;
99part 'price_chart_state.dart' ;
1010
11+ class PriceHistoryLoadException implements Exception {
12+ const PriceHistoryLoadException ();
13+
14+ @override
15+ String toString () => 'PriceHistoryLoadException' ;
16+ }
17+
1118class PriceChartCubit extends Cubit <PriceChartState > {
1219 PriceChartCubit ({
1320 required GetPriceHistoryUsecase getPriceHistoryUsecase,
@@ -103,7 +110,7 @@ class PriceChartCubit extends Cubit<PriceChartState> {
103110 isLoading: false ,
104111 prices: [],
105112 currency: selectedCurrency,
106- error: Exception ( 'Failed to load price history' ),
113+ error: const PriceHistoryLoadException ( ),
107114 ),
108115 );
109116 }
You can’t perform that action at this time.
0 commit comments