New Gallery UI reprise (#17031)

This commit is contained in:
Hans Muller
2018-04-27 08:11:20 -07:00
committed by GitHub
parent 4033937c89
commit bf3bd7667f
38 changed files with 2094 additions and 1253 deletions

View File

@@ -67,8 +67,8 @@ abstract class AssetBundle {
final ByteData data = await load(key);
if (data == null)
throw new FlutterError('Unable to load asset: $key');
if (data.lengthInBytes < 10 * 1024) {
// 10KB takes about 3ms to parse on a Pixel 2 XL.
if (data.lengthInBytes < 20 * 1024) {
// 20KB takes about 6ms to parse on a Pixel 2 XL.
// See: https://github.com/dart-lang/sdk/issues/31954
return utf8.decode(data.buffer.asUint8List());
}