Skip to content

Commit 7ab3912

Browse files
author
Emmanuel Garcia
authored
loadFontFromList returns void instead of string (flutter#22373)
1 parent f042181 commit 7ab3912

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/ui/text.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,9 @@ class ParagraphBuilder extends NativeFieldWrapperClass2 {
22642264
/// If this is not provided, then the family name will be extracted from the font file.
22652265
Future<void> loadFontFromList(Uint8List list, {String? fontFamily}) {
22662266
return _futurize(
2267-
(_Callback<void> callback) => _loadFontFromList(list, callback, fontFamily)
2267+
(_Callback<void> callback) {
2268+
_loadFontFromList(list, callback, fontFamily);
2269+
}
22682270
).then((_) => _sendFontChangeMessage());
22692271
}
22702272

@@ -2299,4 +2301,4 @@ FutureOr<void> _sendFontChangeMessage() async {
22992301
/// default ascent will be used.
23002302
/// {@endtemplate}
23012303
2302-
String _loadFontFromList(Uint8List list, _Callback<void> callback, String? fontFamily) native 'loadFontFromList';
2304+
void _loadFontFromList(Uint8List list, _Callback<void> callback, String? fontFamily) native 'loadFontFromList';

0 commit comments

Comments
 (0)