Skip to content
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: handle package name for fonts #567

Merged
Prev Previous commit
Next Next commit
feat: added unit test
  • Loading branch information
TesteurManiak committed Sep 7, 2024
commit 2cce52c077e6be7ce3f670c2c3c0ec01c9476c1f
10 changes: 10 additions & 0 deletions packages/core/test/fonts_gen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,15 @@ void main() {

await expectedFontsGen(pubspec, generated, fact);
});

test('Package parameter enabled', () async {
const pubspec = 'test_resources/pubspec_fonts_package_parameter.yaml';
const fact =
'test_resources/actual_data/fonts_package_parameter.gen.dart';
const generated =
'test_resources/lib/gen/fonts_package_parameter.gen.dart';

await expectedFontsGen(pubspec, generated, fact);
});
});
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: test

flutter_gen:
output: lib/gen/ # Optional (default: lib/gen/)
line_length: 80 # Optional (default: 80)

fonts:
outputs:
package_parameter_enabled: true

flutter:
fonts:
- family: Raleway
fonts:
- asset: assets/fonts/Raleway-Regular.ttf
- asset: assets/fonts/Raleway-Italic.ttf
style: italic
Loading