readImageByByteData static method

Future<ByteData> readImageByByteData(
  1. String fileName
)

读取assert里的文件, 返回ByteData类型数据

Implementation

static Future<ByteData> readImageByByteData(String fileName) async {
  final ByteData data = await rootBundle.load(fileName);
  return data;
}