refactor: update color definitions and improve UI component structure; handle null safety in repository data fetching
This commit is contained in:
@@ -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!,
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user