Skip to content

Commit

Permalink
change text style setting (#61)
Browse files Browse the repository at this point in the history
* change text style setting

* minor change

* correct letter spacing
  • Loading branch information
cp-sidhdhi-p authored Jun 28, 2024
1 parent ecd4c67 commit 11a7927
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,13 @@ class _SelectWicketTypeSheetState extends ConsumerState<SelectWicketTypeSheet> {
final state = ref.watch(scoreBoardStateProvider);

return BottomSheetWrapper(
content: _wicketTypeContent(context, state),
action: [
PrimaryButton(
context.l10n.common_okay_title,
enabled: selectedType != null,
onPressed: () => context.pop(selectedType),
)
]);
}

Widget _wicketTypeContent(BuildContext context, ScoreBoardViewState state) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
context.l10n.score_board_inning_complete_title,
style: AppTextStyle.header3
.copyWith(color: context.colorScheme.textPrimary),
),
const SizedBox(height: 16),
_typeList(context, state),
content: _typeList(context, state),
action: [
PrimaryButton(
context.l10n.common_okay_title,
enabled: selectedType != null,
onPressed: () => context.pop(selectedType),
)
],
);
}
Expand All @@ -86,21 +72,17 @@ class _SelectWicketTypeSheetState extends ConsumerState<SelectWicketTypeSheet> {
style: AppTextStyle.body2.copyWith(
color: isSelected
? context.colorScheme.onPrimary
: context.colorScheme.textPrimary,
: context.colorScheme.textSecondary,
),
),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
side: BorderSide(
color: isSelected
? context.colorScheme.primary
: context.colorScheme.outline,
),
side: const BorderSide(color: Colors.transparent),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
backgroundColor: isSelected
? context.colorScheme.primary
: context.colorScheme.surface,
: context.colorScheme.containerLowOnSurface,
),
);
},
Expand Down
18 changes: 14 additions & 4 deletions style/lib/text/app_text_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ class AppTextStyle {

static const TextStyle header1 = TextStyle(
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w600,
fontSize: 26,
letterSpacing: -0.64,
height: 1.2,
package: 'style',
);
Expand All @@ -15,23 +16,26 @@ class AppTextStyle {
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.w600,
fontSize: 22,
height: 1.4,
height: 1.2,
letterSpacing: -0.64,
package: 'style',
);

static const TextStyle header3 = TextStyle(
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.w600,
fontSize: 20,
height: 1.4,
height: 1.2,
letterSpacing: -0.64,
package: 'style',
);

static const TextStyle header4 = TextStyle(
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.w600,
fontSize: 18,
height: 1.4,
height: 1.2,
letterSpacing: -0.64,
package: 'style',
);

Expand All @@ -48,6 +52,7 @@ class AppTextStyle {
fontWeight: FontWeight.w500,
fontSize: 16,
height: 1.3,
letterSpacing: -0.32,
package: 'style',
);

Expand All @@ -56,34 +61,39 @@ class AppTextStyle {
fontWeight: FontWeight.normal,
fontSize: 16,
height: 1.3,
letterSpacing: -0.32,
package: 'style',
);

static const TextStyle body1 = TextStyle(
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.normal,
fontSize: 15,
height: 1.5,
package: 'style',
);

static const TextStyle body2 = TextStyle(
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.normal,
fontSize: 14,
height: 1.5,
package: 'style',
);

static const TextStyle button = TextStyle(
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.w600,
fontSize: 14,
height: 1.5,
package: 'style',
);

static const TextStyle caption = TextStyle(
fontFamily: poppinsFontFamily,
fontWeight: FontWeight.w500,
fontSize: 12,
height: 1.5,
package: 'style',
);
}

0 comments on commit 11a7927

Please sign in to comment.