diff --git a/README.md b/README.md index e956f2f..ab3b499 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Essa lógica vive num Cubit dedicado por calculadora, reagindo em tempo real a c | `Dio` | Cliente HTTP | | `equatable` | Comparação de estados e objetos | | `intl` | Formatação de valores e datas | -| `google_fonts` | Tipografia (Manrope) | +| Manrope e Bricolage Grotesque | Tipografia empacotada no app para uso offline | | `mocktail` e `bloc_test` | Testes | **API de terceiros:** [API do Banco Central do Brasil](https://dadosabertos.bcb.gov.br/), usada como fonte de dados da taxa Selic. diff --git a/assets/fonts/Bricolage-Grotesque-OFL.txt b/assets/fonts/Bricolage-Grotesque-OFL.txt new file mode 100644 index 0000000..a397658 --- /dev/null +++ b/assets/fonts/Bricolage-Grotesque-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2022 The Bricolage Grotesque Project Authors (https://github.com/ateliertriay/bricolage) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/BricolageGrotesque-ExtraBold.ttf b/assets/fonts/BricolageGrotesque-ExtraBold.ttf new file mode 100644 index 0000000..74950f2 Binary files /dev/null and b/assets/fonts/BricolageGrotesque-ExtraBold.ttf differ diff --git a/assets/fonts/Manrope-Bold.ttf b/assets/fonts/Manrope-Bold.ttf new file mode 100644 index 0000000..746764d Binary files /dev/null and b/assets/fonts/Manrope-Bold.ttf differ diff --git a/assets/fonts/Manrope-ExtraBold.ttf b/assets/fonts/Manrope-ExtraBold.ttf new file mode 100644 index 0000000..d324b62 Binary files /dev/null and b/assets/fonts/Manrope-ExtraBold.ttf differ diff --git a/assets/fonts/Manrope-Medium.ttf b/assets/fonts/Manrope-Medium.ttf new file mode 100644 index 0000000..2a169e6 Binary files /dev/null and b/assets/fonts/Manrope-Medium.ttf differ diff --git a/assets/fonts/Manrope-OFL.txt b/assets/fonts/Manrope-OFL.txt new file mode 100644 index 0000000..e271172 --- /dev/null +++ b/assets/fonts/Manrope-OFL.txt @@ -0,0 +1,93 @@ +Copyright 2018 The Manrope Project Authors (https://github.com/googlefonts/manrope) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/Manrope-SemiBold.ttf b/assets/fonts/Manrope-SemiBold.ttf new file mode 100644 index 0000000..595e7dc Binary files /dev/null and b/assets/fonts/Manrope-SemiBold.ttf differ diff --git a/lib/core/themes/app_theme.dart b/lib/core/themes/app_theme.dart index 8e89bb0..007ec80 100644 --- a/lib/core/themes/app_theme.dart +++ b/lib/core/themes/app_theme.dart @@ -24,6 +24,7 @@ class AppTheme { return ThemeData( brightness: Brightness.dark, useMaterial3: true, + fontFamily: AppTextStyles.manropeFamily, // Cores base scaffoldBackgroundColor: colors.background, diff --git a/lib/core/themes/extensions/menu_card_theme.dart b/lib/core/themes/extensions/menu_card_theme.dart index 3d4215f..a91424e 100644 --- a/lib/core/themes/extensions/menu_card_theme.dart +++ b/lib/core/themes/extensions/menu_card_theme.dart @@ -37,7 +37,10 @@ class MenuCardTheme extends ThemeExtension { this.iconSizeCompact = 20, this.borderRadius = 20, this.padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 10), - this.compactPadding = const EdgeInsets.all(8), + this.compactPadding = const EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), this.heightThreshold = 100, }); diff --git a/lib/core/themes/radius.dart b/lib/core/themes/radius.dart new file mode 100644 index 0000000..ef114dd --- /dev/null +++ b/lib/core/themes/radius.dart @@ -0,0 +1,7 @@ +abstract class AppRadius { + static const double button = 28; + static const double sheet = 28; + static const double iconTile = 12; + static const double search = 14; + static const double pill = 999; +} \ No newline at end of file diff --git a/lib/core/themes/spacing.dart b/lib/core/themes/spacing.dart index 9fee8bd..38c5d0c 100644 --- a/lib/core/themes/spacing.dart +++ b/lib/core/themes/spacing.dart @@ -7,6 +7,13 @@ abstract class AppSpacing { static const double lg = 24; static const double xl = 32; static const double xxl = 48; + + // Vibrante minimalista layout tokens. + static const double screen = 24; + static const double rowHeight = 58; + static const double rowHeightWithSecondLine = 64; + static const double homeRowHeight = 72; + static const double sectionGap = 26; // Padding padrão de tela static const EdgeInsets screenPadding = EdgeInsets.all(md); diff --git a/lib/core/themes/text_styles.dart b/lib/core/themes/text_styles.dart index 87433e2..688bacf 100644 --- a/lib/core/themes/text_styles.dart +++ b/lib/core/themes/text_styles.dart @@ -1,13 +1,135 @@ import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; import 'color_tokens.dart'; class AppTextStyles { - static final TextStyle _base = GoogleFonts.manrope(); + static const String manropeFamily = 'Manrope'; + static const String bricolageGrotesqueFamily = 'Bricolage Grotesque'; + + static final TextStyle _base = const TextStyle( + fontFamily: manropeFamily, + fontWeight: FontWeight.w500, + ); static final TextStyle _baseWhite = _base.copyWith(color: Colors.white); - // Headlines — mantidos, ainda usados pela TextTheme padrão do Material - // (dialogs, snackbars etc.) mesmo com o header customizado nas telas. + // Estilos de destaque e componentes da direção Vibrante minimalista. + // As cores são definidas pelo componente ou tema que utiliza cada estilo. + static final TextStyle bandStatement = const TextStyle( + fontFamily: bricolageGrotesqueFamily, + fontSize: 48, + fontWeight: FontWeight.w800, + letterSpacing: -1.8, + ); + static final TextStyle screenTitle = const TextStyle( + fontFamily: bricolageGrotesqueFamily, + fontSize: 28, + fontWeight: FontWeight.w800, + letterSpacing: -0.9, + ); + static final TextStyle sheetTitle = const TextStyle( + fontFamily: bricolageGrotesqueFamily, + fontSize: 28, + fontWeight: FontWeight.w800, + letterSpacing: -0.8, + ); + static final TextStyle exampleValue = const TextStyle( + fontFamily: bricolageGrotesqueFamily, + fontSize: 30, + fontWeight: FontWeight.w800, + letterSpacing: -0.8, + ); + static final TextStyle wordmark = const TextStyle( + fontFamily: bricolageGrotesqueFamily, + fontSize: 21, + fontWeight: FontWeight.w800, + letterSpacing: -0.5, + ); + + static final TextStyle bandKicker = const TextStyle( + fontFamily: manropeFamily, + fontSize: 15, + fontWeight: FontWeight.w600, + ); + static final TextStyle bandSub = const TextStyle( + fontFamily: manropeFamily, + fontSize: 15, + fontWeight: FontWeight.w500, + ); + static final TextStyle headerTitle = const TextStyle( + fontFamily: manropeFamily, + fontSize: 16, + fontWeight: FontWeight.w700, + ); + static final TextStyle rowLabel = const TextStyle( + fontFamily: manropeFamily, + fontSize: 16, + fontWeight: FontWeight.w500, + ); + static final TextStyle rowValue = TextStyle( + fontFamily: manropeFamily, + fontSize: 17, + fontWeight: FontWeight.w700, + fontFeatures: const [FontFeature.tabularFigures()], + ); + static final TextStyle rowUnit = const TextStyle( + fontFamily: manropeFamily, + fontSize: 14, + fontWeight: FontWeight.w500, + ); + static final TextStyle rowState = const TextStyle( + fontFamily: manropeFamily, + fontSize: 12, + fontWeight: FontWeight.w700, + ); + static final TextStyle listTitle = const TextStyle( + fontFamily: manropeFamily, + fontSize: 17, + fontWeight: FontWeight.w700, + ); + static final TextStyle listDesc = const TextStyle( + fontFamily: manropeFamily, + fontSize: 13, + fontWeight: FontWeight.w500, + ); + static final TextStyle sectionLabel = const TextStyle( + fontFamily: manropeFamily, + fontSize: 13, + fontWeight: FontWeight.w600, + ); + static final TextStyle detailLabel = const TextStyle( + fontFamily: manropeFamily, + fontSize: 14, + fontWeight: FontWeight.w500, + ); + static final TextStyle detailValue = TextStyle( + fontFamily: manropeFamily, + fontSize: 15, + fontWeight: FontWeight.w700, + fontFeatures: const [FontFeature.tabularFigures()], + ); + static final TextStyle button = const TextStyle( + fontFamily: manropeFamily, + fontSize: 16, + fontWeight: FontWeight.w800, + ); + static final TextStyle pill = const TextStyle( + fontFamily: manropeFamily, + fontSize: 13, + fontWeight: FontWeight.w800, + ); + static final TextStyle body = const TextStyle( + fontFamily: manropeFamily, + fontSize: 15, + fontWeight: FontWeight.w500, + height: 1.5, + ); + static final TextStyle caption = const TextStyle( + fontFamily: manropeFamily, + fontSize: 12, + fontWeight: FontWeight.w500, + ); + + // Títulos mantidos para uso no TextTheme padrão do Material + // (caixas de diálogo, mensagens etc.), além dos cabeçalhos personalizados. static final TextStyle headlineLarge = _base.copyWith( fontSize: 32, fontWeight: FontWeight.bold, @@ -18,8 +140,8 @@ class AppTextStyles { fontWeight: FontWeight.bold, ); - // Body — mantidos sem alteração, `bodyLarge` já é o tamanho correto - // usado nos valores de input pelo InputForms. + // Estilos de texto mantidos sem alteração. `bodyLarge` já tem o tamanho + // correto para os valores de entrada dos formulários. static final TextStyle bodyLarge = _base.copyWith(fontSize: 16); static final TextStyle bodyMedium = _base.copyWith(fontSize: 14); static final TextStyle labelLarge = _base.copyWith( @@ -28,12 +150,12 @@ class AppTextStyles { letterSpacing: 0.5, ); - // Componentes gerais — mantidos. errorBannerText já usa ColorTokens.error, - // só depende da cor em si ser atualizada (ColorTokens), não do estilo. + // Estilos gerais mantidos. `errorBannerText` já usa ColorTokens.error; + // a cor é definida em ColorTokens, sem alterar o estilo. static final TextStyle helpCardMessage = _base.copyWith( fontSize: 14, color: ColorTokens.textPrimary, - fontWeight: FontWeight.w400, + fontWeight: FontWeight.w500, ); static final TextStyle inputHelperText = _base.copyWith( fontSize: 12, @@ -45,11 +167,9 @@ class AppTextStyles { color: ColorTokens.error, ); - // Card de métrica (Selic) — NOVO. Substitui highlightCardTitle/ - // highlightCardSubtitle/highlightCardButton, que eram específicos do - // HighlightCard antigo (removido). Cor não é fixada aqui porque muda - // conforme o estado (amber padrão, verde/vermelho em variação futura); - // aplicar via .copyWith(color: ...) no componente. + // Cartão de métrica (Selic). Substitui os estilos específicos do antigo + // cartão de destaque, que foi removido. A cor varia conforme o estado + // (âmbar, verde ou vermelho) e é aplicada no componente com `.copyWith`. static final TextStyle metricLabel = _base.copyWith( fontSize: 12, color: ColorTokens.textSecondary, @@ -61,38 +181,36 @@ class AppTextStyles { fontFeatures: const [FontFeature.tabularFigures()], ); static final TextStyle metricCaption = _base.copyWith( - fontSize: 11, + fontSize: 12, color: ColorTokens.textHint, ); - // Badge de estado do campo ("vazio" / "calculado" / "resultado") — NOVO. - // Sem cor fixa: cada estado (amber/verde/vermelho) aplica a própria cor. + // Indicador de estado do campo ("vazio", "calculado" ou "resultado"). + // Sem cor fixa: cada estado aplica sua própria cor. static final TextStyle stateBadge = _base.copyWith( - fontSize: 11, + fontSize: 12, fontWeight: FontWeight.w500, ); - // MenuCard + // Cartão do menu. static final TextStyle menuCardTitle = _baseWhite.copyWith( fontSize: 13, fontWeight: FontWeight.bold, ); static final TextStyle menuCardTitleCompact = _baseWhite.copyWith( - fontSize: 11, + fontSize: 12, fontWeight: FontWeight.bold, ); static final TextStyle menuCardDescription = _baseWhite.copyWith( - fontSize: 10, - height: 1.1, + fontSize: 12, + height: 1.2, ); - // Corrigido: estava em 9px, abaixo do mínimo legível (11px). static final TextStyle menuCardDescriptionCompact = _baseWhite.copyWith( - fontSize: 11, - height: 1.1, + fontSize: 12, + height: 1.2, ); - // MenuCard — variante featured (tile full-width, texto um pouco maior - // por ter mais espaço horizontal disponível). NOVO. + // Cartão do menu em destaque, com texto maior por ter mais espaço. static final TextStyle menuCardTitleFeatured = _baseWhite.copyWith( fontSize: 14, fontWeight: FontWeight.bold, @@ -102,14 +220,13 @@ class AppTextStyles { color: ColorTokens.textSecondary, ); - // Home + // Tela inicial. static final TextStyle appName = _baseWhite.copyWith( fontSize: 20, fontWeight: FontWeight.bold, ); - // Cor movida pra dentro do estilo (era aplicada com .withValues(alpha: 0.4) - // no call site em home_page.dart) — evita repetir o ajuste de opacidade - // toda vez que o label for usado. + // Cor definida no próprio estilo, antes aplicada no local de uso da tela + // inicial. Isso evita repetir o ajuste de opacidade em cada utilização. static final TextStyle sectionHeader = _base.copyWith( fontSize: 12, fontWeight: FontWeight.bold, diff --git a/lib/main.dart b/lib/main.dart index acc26b9..58db7a0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,12 +1,25 @@ import 'package:flutter/material.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:intl/date_symbol_data_local.dart'; import 'modules/app_module.dart'; import 'modules/app_widget.dart'; -void main() { - initializeDateFormatting('pt_BR', null); +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + LicenseRegistry.addLicense(() async* { + yield LicenseEntryWithLineBreaks( + ['Manrope'], + await rootBundle.loadString('assets/fonts/Manrope-OFL.txt'), + ); + yield LicenseEntryWithLineBreaks( + ['Bricolage Grotesque'], + await rootBundle.loadString('assets/fonts/Bricolage-Grotesque-OFL.txt'), + ); + }); + await initializeDateFormatting('pt_BR', null); runApp( ModularApp( diff --git a/lib/modules/value_correction/presentation/pages/value_correction_result_page.dart b/lib/modules/value_correction/presentation/pages/value_correction_result_page.dart index 242cbac..caa8112 100644 --- a/lib/modules/value_correction/presentation/pages/value_correction_result_page.dart +++ b/lib/modules/value_correction/presentation/pages/value_correction_result_page.dart @@ -202,7 +202,7 @@ class _SpotlightBadge extends StatelessWidget { ), child: Text( 'calculado', - style: theme.spotlightVariationStyle.copyWith(fontSize: 10), + style: theme.spotlightVariationStyle.copyWith(fontSize: 12), ), ); } diff --git a/pubspec.lock b/pubspec.lock index 04bd3c0..3ba6073 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -285,14 +285,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - google_fonts: - dependency: "direct main" - description: - name: google_fonts - sha256: e3cb3ee6b47fd2472c23de6da5744796a4da195137759ddb3fbcc9467b7b3c7d - url: "https://pub.dev" - source: hosted - version: "8.2.1" hooks: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1e49580..391a80e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,7 +35,6 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.9 - google_fonts: ^8.2.1 flutter_bloc: ^9.1.1 flutter_modular: ^6.4.1 equatable: ^2.1.0 @@ -71,6 +70,23 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - assets/branding/app_icon.svg + - assets/fonts/ + + fonts: + - family: Manrope + fonts: + - asset: assets/fonts/Manrope-Medium.ttf + weight: 500 + - asset: assets/fonts/Manrope-SemiBold.ttf + weight: 600 + - asset: assets/fonts/Manrope-Bold.ttf + weight: 700 + - asset: assets/fonts/Manrope-ExtraBold.ttf + weight: 800 + - family: Bricolage Grotesque + fonts: + - asset: assets/fonts/BricolageGrotesque-ExtraBold.ttf + weight: 800 # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images diff --git a/test/core/widgets/help_card_test.dart b/test/core/widgets/help_card_test.dart index 40bb6f8..d46be76 100644 --- a/test/core/widgets/help_card_test.dart +++ b/test/core/widgets/help_card_test.dart @@ -40,7 +40,7 @@ void main() { expect(theme.messageStyle.color, ColorTokens.textPrimary); expect(theme.messageStyle.fontSize, 14); - expect(theme.messageStyle.fontWeight, FontWeight.w400); + expect(theme.messageStyle.fontWeight, FontWeight.w500); }); testWidgets('Deve exibir o texto da mensagem e o ícone de lâmpada', (tester) async { @@ -54,7 +54,7 @@ void main() { expect(resolvedStyle?.color, ColorTokens.textPrimary); expect(resolvedStyle?.fontSize, 14); - expect(resolvedStyle?.fontWeight, FontWeight.w400); + expect(resolvedStyle?.fontWeight, FontWeight.w500); expect(find.byIcon(Icons.lightbulb), findsOneWidget); }); diff --git a/test/flutter_test_config.dart b/test/flutter_test_config.dart index 9d5b0a5..c24855e 100644 --- a/test/flutter_test_config.dart +++ b/test/flutter_test_config.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:google_fonts/google_fonts.dart'; import 'package:mocktail/mocktail.dart'; import 'package:real_calc/modules/financial_calculators/domain/enum/financial_calculation_target.dart'; @@ -9,8 +8,6 @@ import 'fake_financing.dart'; Future testExecutable(FutureOr Function() testMain) async { - GoogleFonts.config.allowRuntimeFetching = false; - registerFallbackValue(FinancialCalculationTarget.initialValue); registerFallbackValue(FakeFinancing()); registerFallbackValue(FakeFinancialCalculation()); diff --git a/test/modules/app_widget_test.dart b/test/modules/app_widget_test.dart index 1d64759..408b2c3 100644 --- a/test/modules/app_widget_test.dart +++ b/test/modules/app_widget_test.dart @@ -1,15 +1,10 @@ import 'package:flutter_modular/flutter_modular.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:google_fonts/google_fonts.dart'; import 'package:real_calc/modules/app_module.dart'; import 'package:real_calc/modules/app_widget.dart'; import 'package:real_calc/modules/home/presentation/page/page.dart'; void main() { - setUpAll(() { - GoogleFonts.config.allowRuntimeFetching = false; - }); - tearDown(() { Modular.destroy(); }); diff --git a/test/modules/home/presentation/components/menu_card_test.dart b/test/modules/home/presentation/components/menu_card_test.dart index 92d8472..b4c9815 100644 --- a/test/modules/home/presentation/components/menu_card_test.dart +++ b/test/modules/home/presentation/components/menu_card_test.dart @@ -17,14 +17,14 @@ void main() { const double heightThreshold = 100; const double normalIconSize = 24; const double compactIconSize = 20; - const double compactTitleFontSize = 11; - const double compactDescriptionFontSize = 9; + const double compactTitleFontSize = 12; + const double compactDescriptionFontSize = 12; const featuredBorderColor = Color(0xFFD4A657); const disabledLabelColor = Color(0xFF6C7480); const titleStyle = TextStyle(fontSize: 14, fontWeight: FontWeight.w500); const descriptionStyle = TextStyle(fontSize: 16, fontWeight: FontWeight.w600); - const titleStyleCompact = TextStyle(fontSize: 11, fontWeight: FontWeight.w500); - const descriptionStyleCompact = TextStyle(fontSize: 9, fontWeight: FontWeight.w600); + const titleStyleCompact = TextStyle(fontSize: 12, fontWeight: FontWeight.w500); + const descriptionStyleCompact = TextStyle(fontSize: 12, fontWeight: FontWeight.w600); const titleStyleFeatured = TextStyle(fontSize: 14, fontWeight: FontWeight.w500); const descriptionStyleFeatured = TextStyle(fontSize: 16, fontWeight: FontWeight.w600); const disabledTextStyle = TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: disabledLabelColor); diff --git a/test/modules/home/presentation/components/metric_card_test.dart b/test/modules/home/presentation/components/metric_card_test.dart index b650847..5c7ce13 100644 --- a/test/modules/home/presentation/components/metric_card_test.dart +++ b/test/modules/home/presentation/components/metric_card_test.dart @@ -16,8 +16,8 @@ void main() { labelStyle: TextStyle(fontSize: 12), valueStyle: TextStyle(fontSize: 30, fontWeight: FontWeight.w500), valueUnitStyle: TextStyle(fontSize: 15), - captionStyle: TextStyle(fontSize: 11), - variationTextStyle: TextStyle(fontSize: 11, fontWeight: FontWeight.w500), + captionStyle: TextStyle(fontSize: 12), + variationTextStyle: TextStyle(fontSize: 12, fontWeight: FontWeight.w500), variationPositiveColor: positiveColor, variationNegativeColor: negativeColor, variationNeutralColor: neutralColor,