File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ android {
4747 applicationId " com.islamdidarmd.example.adblockerwebview.flutter.example"
4848 // You can update the following values to match your application needs.
4949 // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
50- minSdkVersion 19
50+ minSdkVersion flutter . minSdkVersion
5151 targetSdkVersion flutter. targetSdkVersion
5252 versionCode flutterVersionCode. toInteger()
5353 versionName flutterVersionName
Original file line number Diff line number Diff line change 11import 'dart:convert' ;
2- import 'dart:isolate' ;
32
43import 'package:adblocker_webview/src/domain/entity/host.dart' ;
54import 'package:adblocker_webview/src/domain/repository/adblocker_repository.dart' ;
65import 'package:flutter/foundation.dart' ;
7- import 'package:flutter/services.dart' ;
86import 'package:flutter_cache_manager/flutter_cache_manager.dart' ;
97
108class AdBlockerRepositoryImpl implements AdBlockerRepository {
@@ -29,14 +27,8 @@ class AdBlockerRepositoryImpl implements AdBlockerRepository {
2927 }
3028
3129 Future <String > _getDataWithCache (String url) async {
32- final isolateToken = ServicesBinding .rootIsolateToken! ;
33- return Isolate .run (
34- () async {
35- BackgroundIsolateBinaryMessenger .ensureInitialized (isolateToken);
36- final cacheManager = DefaultCacheManager ();
37- final file = await cacheManager.getSingleFile (url);
38- return file.readAsString ();
39- },
40- );
30+ final cacheManager = DefaultCacheManager ();
31+ final file = await cacheManager.getSingleFile (url);
32+ return file.readAsString ();
4133 }
4234}
You can’t perform that action at this time.
0 commit comments