refactor: update color definitions and improve UI component structure; handle null safety in repository data fetching

This commit is contained in:
Achintha Isuru
2026-03-17 13:20:04 -04:00
parent a0d5a18e6f
commit e83b8fff1c
13 changed files with 49 additions and 43 deletions

View File

@@ -67,39 +67,45 @@ class UiNoticeBanner extends StatelessWidget {
color: backgroundColor ?? UiColors.primary.withValues(alpha: 0.08),
borderRadius: borderRadius ?? UiConstants.radiusLg,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
child: Column(
children: <Widget>[
if (leading != null) ...<Widget>[
leading!,
const SizedBox(width: UiConstants.space3),
] else if (icon != null) ...<Widget>[
Icon(icon, color: iconColor ?? UiColors.primary, size: 24),
const SizedBox(width: UiConstants.space3),
],
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (leading != null) ...<Widget>[
leading!,
const SizedBox(width: UiConstants.space3),
] else if (icon != null) ...<Widget>[
Icon(icon, color: iconColor ?? UiColors.primary, size: 24),
const SizedBox(width: UiConstants.space3),
Text(
title,
style: UiTypography.body2b.copyWith(color: titleColor),
),
if (description != null) ...<Widget>[
const SizedBox(height: 2),
Text(
description!,
style: UiTypography.body3r.copyWith(
color: descriptionColor,
),
style: UiTypography.body2b.copyWith(
color: titleColor ?? UiColors.primary,
),
],
if (action != null) ...<Widget>[
const SizedBox(height: UiConstants.space2),
action!,
],
),
],
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (description != null) ...<Widget>[
const SizedBox(height: UiConstants.space2),
Text(
description!,
style: UiTypography.body3r.copyWith(
//color: descriptionColor ?? UiColors.textSecondary,
color: descriptionColor ?? UiColors.primary,
),
),
],
if (action != null) ...<Widget>[
const SizedBox(height: UiConstants.space2),
action!,
],
],
),
],
),