mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #1335 from krisgiesing/asset_close
Remove unused close method from AssetBundle
This commit is contained in:
commit
740b612205
@ -19,7 +19,6 @@ import 'image_resource.dart';
|
||||
import 'shell.dart';
|
||||
|
||||
abstract class AssetBundle {
|
||||
void close();
|
||||
ImageResource loadImage(String key);
|
||||
Future<String> loadString(String key);
|
||||
Future<core.MojoDataPipeConsumer> load(String key);
|
||||
@ -30,8 +29,6 @@ class NetworkAssetBundle extends AssetBundle {
|
||||
|
||||
final Uri _baseUrl;
|
||||
|
||||
void close() { }
|
||||
|
||||
String _urlFromKey(String key) => _baseUrl.resolve(key).toString();
|
||||
|
||||
Future<core.MojoDataPipeConsumer> load(String key) async {
|
||||
@ -66,12 +63,6 @@ class MojoAssetBundle extends AssetBundle {
|
||||
Map<String, ImageResource> _imageCache = new Map<String, ImageResource>();
|
||||
Map<String, Future<String>> _stringCache = new Map<String, Future<String>>();
|
||||
|
||||
void close() {
|
||||
_bundle.close();
|
||||
_bundle = null;
|
||||
_imageCache = null;
|
||||
}
|
||||
|
||||
Future<ui.Image> _fetchImage(String key) async {
|
||||
return await decodeImageFromDataPipe(await load(key));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user