fix: Correct primaryInverse color value and improve code formatting in WorkerHomePage
This commit is contained in:
@@ -22,7 +22,7 @@ class UiColors {
|
|||||||
static const Color primaryForeground = Color(0xFFF7FAFC);
|
static const Color primaryForeground = Color(0xFFF7FAFC);
|
||||||
|
|
||||||
/// Inverse primary color (#0A39DF)
|
/// Inverse primary color (#0A39DF)
|
||||||
static const Color primaryInverse = Color.fromARGB(29, 10, 56, 223);
|
static const Color primaryInverse = Color.fromARGB(23, 10, 56, 223);
|
||||||
|
|
||||||
/// Secondary background color (#F1F3F5)
|
/// Secondary background color (#F1F3F5)
|
||||||
static const Color secondary = Color(0xFFF1F3F5);
|
static const Color secondary = Color(0xFFF1F3F5);
|
||||||
|
|||||||
@@ -49,13 +49,17 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
BlocBuilder<HomeCubit, HomeState>(
|
BlocBuilder<HomeCubit, HomeState>(
|
||||||
buildWhen: (previous, current) => previous.staffName != current.staffName,
|
buildWhen: (previous, current) =>
|
||||||
|
previous.staffName != current.staffName,
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return HomeHeader(userName: state.staffName);
|
return HomeHeader(userName: state.staffName);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: UiConstants.space4),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: UiConstants.space4,
|
||||||
|
vertical: UiConstants.space4,
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
BlocBuilder<HomeCubit, HomeState>(
|
BlocBuilder<HomeCubit, HomeState>(
|
||||||
@@ -135,7 +139,8 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
EmptyStateWidget(
|
EmptyStateWidget(
|
||||||
message: emptyI18n.no_shifts_today,
|
message: emptyI18n.no_shifts_today,
|
||||||
actionLink: emptyI18n.find_shifts_cta,
|
actionLink: emptyI18n.find_shifts_cta,
|
||||||
onAction: () => Modular.to.toShifts(initialTab: 'find'),
|
onAction: () =>
|
||||||
|
Modular.to.toShifts(initialTab: 'find'),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
Column(
|
Column(
|
||||||
@@ -183,9 +188,7 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
const SizedBox(height: UiConstants.space6),
|
const SizedBox(height: UiConstants.space6),
|
||||||
|
|
||||||
// Recommended Shifts
|
// Recommended Shifts
|
||||||
SectionHeader(
|
SectionHeader(title: sectionsI18n.recommended_for_you),
|
||||||
title: sectionsI18n.recommended_for_you,
|
|
||||||
),
|
|
||||||
BlocBuilder<HomeCubit, HomeState>(
|
BlocBuilder<HomeCubit, HomeState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state.recommendedShifts.isEmpty) {
|
if (state.recommendedShifts.isEmpty) {
|
||||||
@@ -201,7 +204,8 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
itemBuilder: (context, index) => Padding(
|
itemBuilder: (context, index) => Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
right: UiConstants.space3),
|
right: UiConstants.space3,
|
||||||
|
),
|
||||||
child: RecommendedShiftCard(
|
child: RecommendedShiftCard(
|
||||||
shift: state.recommendedShifts[index],
|
shift: state.recommendedShifts[index],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user