Skip to content

Instantly share code, notes, and snippets.

@karabanovbs
Created September 2, 2022 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karabanovbs/70358b64eff9eaf5a945072debb4ec57 to your computer and use it in GitHub Desktop.
Save karabanovbs/70358b64eff9eaf5a945072debb4ec57 to your computer and use it in GitHub Desktop.
fontFamilyFallback incorrect after TextStyle merge
import 'package:flutter/material.dart';
void main() {
final originalTextStyle = TextStyle(
package: 'myFontPack',
fontFamily: 'myFontFamily',
fontFamilyFallback: ['myFontFamilyFallback'],
);
print(originalTextStyle.fontFamilyFallback); // [packages/myFontPack/myFontFamilyFallback]
print(TextStyle().merge(originalTextStyle).fontFamilyFallback); // [packages/myFontPack/packages/myFontPack/myFontFamilyFallback]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment