Updates SectionHeader text styles, border, and radius, and reduces vertical spacing in WorkerHomePage.
This commit is contained in:
@@ -154,7 +154,7 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: UiConstants.space6),
|
const SizedBox(height: UiConstants.space3),
|
||||||
|
|
||||||
// Tomorrow's Shifts
|
// Tomorrow's Shifts
|
||||||
BlocBuilder<HomeCubit, HomeState>(
|
BlocBuilder<HomeCubit, HomeState>(
|
||||||
@@ -182,7 +182,7 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: UiConstants.space6),
|
const SizedBox(height: UiConstants.space3),
|
||||||
|
|
||||||
// Recommended Shifts
|
// Recommended Shifts
|
||||||
SectionHeader(title: sectionsI18n.recommended_for_you),
|
SectionHeader(title: sectionsI18n.recommended_for_you),
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
|
|
||||||
/// Section header widget for home page sections, using design system tokens.
|
/// Section header widget for home page sections, using design system tokens.
|
||||||
class SectionHeader extends StatelessWidget {
|
class SectionHeader extends StatelessWidget {
|
||||||
/// Section title
|
/// Section title
|
||||||
final String title;
|
final String title;
|
||||||
|
|
||||||
/// Optional action label
|
/// Optional action label
|
||||||
final String? action;
|
final String? action;
|
||||||
|
|
||||||
/// Optional action callback
|
/// Optional action callback
|
||||||
final VoidCallback? onAction;
|
final VoidCallback? onAction;
|
||||||
|
|
||||||
/// Creates a [SectionHeader].
|
/// Creates a [SectionHeader].
|
||||||
const SectionHeader({super.key, required this.title, this.action, this.onAction});
|
const SectionHeader({
|
||||||
|
super.key,
|
||||||
|
required this.title,
|
||||||
|
this.action,
|
||||||
|
this.onAction,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -27,19 +33,13 @@ class SectionHeader extends StatelessWidget {
|
|||||||
? Row(
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(title, style: UiTypography.body1b),
|
||||||
title,
|
|
||||||
style: UiTypography.body2m.textPrimary,
|
|
||||||
),
|
|
||||||
if (onAction != null)
|
if (onAction != null)
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: onAction,
|
onTap: onAction,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(action ?? '', style: UiTypography.body3r),
|
||||||
action ?? '',
|
|
||||||
style: UiTypography.body3r.textPrimary,
|
|
||||||
),
|
|
||||||
const Icon(
|
const Icon(
|
||||||
UiIcons.chevronRight,
|
UiIcons.chevronRight,
|
||||||
size: UiConstants.space4,
|
size: UiConstants.space4,
|
||||||
@@ -56,23 +56,20 @@ class SectionHeader extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: UiColors.primary.withValues(alpha: 0.08),
|
color: UiColors.primary.withValues(alpha: 0.08),
|
||||||
borderRadius:
|
borderRadius: UiConstants.radiusMd,
|
||||||
BorderRadius.circular(UiConstants.radiusBase),
|
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: UiColors.primary.withValues(alpha: 0.2),
|
color: UiColors.primary,
|
||||||
|
width: 0.5,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
action!,
|
action!,
|
||||||
style: UiTypography.body3r.textPrimary,
|
style: UiTypography.body3r.primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Text(
|
: Text(title, style: UiTypography.body1b),
|
||||||
title,
|
|
||||||
style: UiTypography.body2m.textPrimary,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user