Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Turn @staticInterop tear-off into closure #41643

Merged
merged 1 commit into from
May 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/web_ui/lib/src/engine/text/font_collection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ class FontManager {
if (_downloadedFonts.isEmpty) {
return;
}
_downloadedFonts.forEach(domDocument.fonts!.add);
// Since we can't use tear-offs for interop members, this code is faster and
// easier to read with a for loop instead of forEach.
// ignore: prefer_foreach
for (final DomFontFace font in _downloadedFonts) {
domDocument.fonts!.add(font);
}
}


Expand Down