Don't validate image status
This commit is contained in:
parent
d0ff5a0616
commit
c52f06dc00
4 changed files with 5 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import "package:cross_cache/cross_cache.dart";
|
||||
import "package:dio/dio.dart";
|
||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||
|
||||
class CrossCacheController extends Notifier<CrossCache> {
|
||||
|
|
@ -6,7 +7,8 @@ class CrossCacheController extends Notifier<CrossCache> {
|
|||
static const String roomKey = "room";
|
||||
|
||||
@override
|
||||
CrossCache build() => CrossCache();
|
||||
CrossCache build() =>
|
||||
CrossCache(options: BaseOptions(validateStatus: (_) => false));
|
||||
|
||||
static final provider = NotifierProvider<CrossCacheController, CrossCache>(
|
||||
CrossCacheController.new,
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ New Value: ${newValue is AsyncData ? newValue.value : newValue}
|
|||
}
|
||||
|
||||
void showError(Object error, [StackTrace? stackTrace]) {
|
||||
if (error.toString().contains("DioException")) return;
|
||||
if (error.toString().contains("UTF-16")) return;
|
||||
if (error.toString().contains("HTTP request failed")) return;
|
||||
if (error.toString().contains("Invalid image data")) return;
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ packages:
|
|||
source: hosted
|
||||
version: "4.0.1"
|
||||
dio:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ dependencies:
|
|||
dynamic_polls: ^0.0.6
|
||||
flutter_hooks: ^0.21.3+1
|
||||
cross_cache: ^1.1.0
|
||||
dio: ^5.9.0
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.4.11
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue