Mild fixes to issues I noticed on push

This commit is contained in:
2023-09-05 20:12:33 -07:00
parent 4bbf42db88
commit 9ac4b45422
2 changed files with 3 additions and 17 deletions

View File

@ -1,4 +1,3 @@
import 'dart:developer';
import 'dart:ui' as ui;
import 'package:flutter/services.dart';
@ -7,7 +6,7 @@ class Assets {
final Map<String, ui.Image> _loaded = {};
final Set<String> _waiting = {};
Future<ui.Image> getImageAsync(String name) async {
Future<ui.Image> _getImageAsync(String name) async {
final assetImageByteData = await rootBundle.load(name);
final codec =
await ui.instantiateImageCodec(assetImageByteData.buffer.asUint8List());
@ -20,7 +19,7 @@ class Assets {
ui.Image? getImageIfAvailable(String name) {
if (!_waiting.contains(name)) {
_waiting.add(name);
getImageAsync(name);
_getImageAsync(name);
}
return _loaded[name];
}