Skip to content

Commit 14437d6

Browse files
authored
fix _getArrayBuffer signature (flutter#22251)
1 parent 46e3bba commit 14437d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web_ui/lib/src/engine/canvaskit/fonts.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class SkiaFontCollection {
123123
try {
124124
buffer = await html.window
125125
.fetch(url)
126-
.then(_getArrayBuffer as FutureOr<ByteBuffer> Function(dynamic));
126+
.then(_getArrayBuffer);
127127
} catch (e) {
128128
html.window.console.warn('Failed to load font $family at $url');
129129
html.window.console.warn(e);
@@ -149,7 +149,7 @@ class SkiaFontCollection {
149149
return actualFamily;
150150
}
151151

152-
Future<ByteBuffer>? _getArrayBuffer(dynamic fetchResult) {
152+
Future<ByteBuffer> _getArrayBuffer(dynamic fetchResult) {
153153
// TODO(yjbanov): fetchResult.arrayBuffer is a dynamic invocation. Clean it up.
154154
return fetchResult
155155
.arrayBuffer()

0 commit comments

Comments
 (0)