feat: Update color definitions and improve PlaceholderBanner widget styling
This commit is contained in:
@@ -21,8 +21,8 @@ class UiColors {
|
|||||||
/// Foreground color on primary background (#F7FAFC)
|
/// Foreground color on primary background (#F7FAFC)
|
||||||
static const Color primaryForeground = Color(0xFFF7FAFC);
|
static const Color primaryForeground = Color(0xFFF7FAFC);
|
||||||
|
|
||||||
/// Inverse primary color (#9FABF1)
|
/// Inverse primary color (#0A39DF)
|
||||||
static const Color primaryInverse = Color(0xFF9FABF1);
|
static const Color primaryInverse = Color.fromARGB(29, 10, 56, 223);
|
||||||
|
|
||||||
/// Secondary background color (#F1F3F5)
|
/// Secondary background color (#F1F3F5)
|
||||||
static const Color secondary = Color(0xFFF1F3F5);
|
static const Color secondary = Color(0xFFF1F3F5);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
return PlaceholderBanner(
|
return PlaceholderBanner(
|
||||||
title: bannersI18n.complete_profile_title,
|
title: bannersI18n.complete_profile_title,
|
||||||
subtitle: bannersI18n.complete_profile_subtitle,
|
subtitle: bannersI18n.complete_profile_subtitle,
|
||||||
bg: UiColors.bgHighlight,
|
bg: UiColors.primaryInverse,
|
||||||
accent: UiColors.primary,
|
accent: UiColors.primary,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Modular.to.toProfile();
|
Modular.to.toProfile();
|
||||||
|
|||||||
@@ -1,24 +1,33 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
|
|
||||||
|
|
||||||
/// Banner widget for placeholder actions, using design system tokens.
|
/// Banner widget for placeholder actions, using design system tokens.
|
||||||
class PlaceholderBanner extends StatelessWidget {
|
class PlaceholderBanner extends StatelessWidget {
|
||||||
/// Banner title
|
/// Banner title
|
||||||
final String title;
|
final String title;
|
||||||
|
|
||||||
/// Banner subtitle
|
/// Banner subtitle
|
||||||
final String subtitle;
|
final String subtitle;
|
||||||
|
|
||||||
/// Banner background color
|
/// Banner background color
|
||||||
final Color bg;
|
final Color bg;
|
||||||
|
|
||||||
/// Banner accent color
|
/// Banner accent color
|
||||||
final Color accent;
|
final Color accent;
|
||||||
|
|
||||||
/// Optional tap callback
|
/// Optional tap callback
|
||||||
final VoidCallback? onTap;
|
final VoidCallback? onTap;
|
||||||
|
|
||||||
/// Creates a [PlaceholderBanner].
|
/// Creates a [PlaceholderBanner].
|
||||||
const PlaceholderBanner({super.key, required this.title, required this.subtitle, required this.bg, required this.accent, this.onTap});
|
const PlaceholderBanner({
|
||||||
|
super.key,
|
||||||
|
required this.title,
|
||||||
|
required this.subtitle,
|
||||||
|
required this.bg,
|
||||||
|
required this.accent,
|
||||||
|
this.onTap,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -29,7 +38,7 @@ class PlaceholderBanner extends StatelessWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: bg,
|
color: bg,
|
||||||
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
|
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
|
||||||
border: Border.all(color: accent.withValues(alpha: 0.3)),
|
border: Border.all(color: accent, width: 1),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@@ -41,7 +50,11 @@ class PlaceholderBanner extends StatelessWidget {
|
|||||||
color: UiColors.bgBanner,
|
color: UiColors.bgBanner,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: Icon(UiIcons.sparkles, color: accent, size: UiConstants.space5),
|
child: Icon(
|
||||||
|
UiIcons.sparkles,
|
||||||
|
color: accent,
|
||||||
|
size: UiConstants.space5,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space3),
|
const SizedBox(width: UiConstants.space3),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -50,12 +63,9 @@ class PlaceholderBanner extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
style: UiTypography.body1b,
|
style: UiTypography.body1b.copyWith(color: accent),
|
||||||
),
|
|
||||||
Text(
|
|
||||||
subtitle,
|
|
||||||
style: UiTypography.body3r.copyWith(color: UiColors.mutedForeground),
|
|
||||||
),
|
),
|
||||||
|
Text(subtitle, style: UiTypography.body3r.textSecondary),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user