-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add custom font icons support #28
base: main
Are you sure you want to change the base?
Conversation
/// * Create a flutter_test_config.dart file. See: | ||
/// https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html | ||
/// * add `await loadAppFonts();` in the `testExecutable` function. | ||
Future<void> loadAppFonts() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le mot "app" fait un peu four tout.
- Soit on trouve un meilleure naming, genre
loadFontFromManifest
ou autre. - Soit on fait un breaking change. Est-ce que loadFont est encore pertinent ? Sinon est-ce qu'on a besoin de maintenir cette fonction ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
À priori, je ne vois pas d'utilisation de loadFonts
que loadAppFonts
ne couvre pas ; le breaking change me semble mieux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaximeRougieux un avis sur la question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go breaking change, le package est en beta donc c'est ok
); | ||
final waitList = <Future<void>>[]; | ||
for (final Map<String, dynamic> font in fontManifest) { | ||
final fontLoader = FontLoader(font['family']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I don't understand what you're refering to. Is derivedFontFamily
a function from a package? Or is it a proposition to extract some logic?
If it is the first, can you link a doc link to the function, because I couldn't find it anywhere I looked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is here: font_loader.dart
Method loadAppFonts
is moved from flutter_glove_box
project.
Why
Inspired by Golden toolkit font_loader.dart use of
FontManifest.json
that references all fonts by packages inbuild/unit_test/assets
folderUse
loadAppFonts
instead ofloadFonts
orloadFontsFromPackage
Todo