From 9ac4b4542203a0a7d436d4643a61dbfc87a960ec Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Tue, 5 Sep 2023 20:12:33 -0700 Subject: [PATCH] Mild fixes to issues I noticed on push --- README.md | 15 +-------------- lib/assets.dart | 5 ++--- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0aaa847..0102b1a 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,3 @@ # dartterm -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +Roguelike stuff in Dart. \ No newline at end of file diff --git a/lib/assets.dart b/lib/assets.dart index 413853a..22ce6ef 100644 --- a/lib/assets.dart +++ b/lib/assets.dart @@ -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 _loaded = {}; final Set _waiting = {}; - Future getImageAsync(String name) async { + Future _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]; }