mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
15 lines
378 B
Dart
15 lines
378 B
Dart
import 'dart:convert';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
class TestAssetBundle extends CachingAssetBundle {
|
|
@override
|
|
Future<String> loadString(String key, {bool cache = true}) async {
|
|
final ByteData data = await load(key);
|
|
|
|
return utf8.decode(data.buffer.asUint8List());
|
|
}
|
|
|
|
@override
|
|
Future<ByteData> load(String key) async => rootBundle.load(key);
|
|
}
|