feat(core): add theme, shared widgets and validators
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'design_tokens.dart';
|
||||
|
||||
class AppTheme {
|
||||
AppTheme._();
|
||||
|
||||
static ThemeData get light => ThemeData(
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.light,
|
||||
scaffoldBackgroundColor: AppColors.background,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: AppColors.primary,
|
||||
brightness: Brightness.light,
|
||||
),
|
||||
fontFamily: 'Inter',
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: AppColors.background,
|
||||
foregroundColor: AppColors.slate900,
|
||||
elevation: 0,
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primary,
|
||||
foregroundColor: AppColors.primaryForeground,
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(AppRadius.sm),
|
||||
),
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: AppColors.background,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(AppRadius.sm),
|
||||
borderSide: const BorderSide(color: AppColors.input),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(AppRadius.sm),
|
||||
borderSide: const BorderSide(color: AppColors.input),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(AppRadius.sm),
|
||||
borderSide: const BorderSide(color: AppColors.input),
|
||||
),
|
||||
hintStyle: const TextStyle(
|
||||
color: AppColors.mutedForeground,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AppColors {
|
||||
AppColors._();
|
||||
|
||||
static const primary = Color(0xFF171717);
|
||||
static const primaryForeground = Color(0xFFFAFAFA);
|
||||
static const background = Color(0xFFFAFAFA);
|
||||
static const foreground = Color(0xFF0A0A0A);
|
||||
static const mutedForeground = Color(0xFF737373);
|
||||
static const input = Color(0xFFE5E5E5);
|
||||
static const border = Color(0xFFE5E5E5);
|
||||
static const white = Color(0xFFFFFFFF);
|
||||
static const card = Color(0xFFFAFAFA);
|
||||
|
||||
static const slate900 = Color(0xFF0F172A);
|
||||
static const slate700 = Color(0xFF334155);
|
||||
static const slate600 = Color(0xFF475569);
|
||||
static const slate500 = Color(0xFF64748B);
|
||||
static const slate400 = Color(0xFF94A3B8);
|
||||
static const slate300 = Color(0xFFCBD5E1);
|
||||
|
||||
static const blue600 = Color(0xFF2563EB);
|
||||
static const blue500 = Color(0xFF3B82F6);
|
||||
static const blue400 = Color(0xFF60A5FA);
|
||||
static const blue100 = Color(0xFFDBEAFE);
|
||||
static const blue50 = Color(0xFFEFF6FF);
|
||||
|
||||
static const red600 = Color(0xFFDC2626);
|
||||
static const red500 = Color(0xFFEF4444);
|
||||
|
||||
static const amber600 = Color(0xFFD97706);
|
||||
static const amber500 = Color(0xFFF59E0B);
|
||||
|
||||
static const emerald600 = Color(0xFF059669);
|
||||
static const emerald500 = Color(0xFF10B981);
|
||||
|
||||
static const violet600 = Color(0xFF7C3AED);
|
||||
static const violet500 = Color(0xFF8B5CF6);
|
||||
|
||||
static const warningBackground = Color(0xFFFEF3C7);
|
||||
static const warningText = Color(0xFF92400E);
|
||||
|
||||
static const appIconRing = Color(0xFFE8F3FF);
|
||||
static const appIconBorder = Color(0xFFC7DDFB);
|
||||
static const appTitle = Color(0xFF1E293B);
|
||||
}
|
||||
|
||||
class AppSpacing {
|
||||
AppSpacing._();
|
||||
|
||||
static const double xs = 4.0;
|
||||
static const double sm = 8.0;
|
||||
static const double md = 12.0;
|
||||
static const double lg = 16.0;
|
||||
static const double xl = 20.0;
|
||||
static const double xxl = 24.0;
|
||||
}
|
||||
|
||||
class AppRadius {
|
||||
AppRadius._();
|
||||
|
||||
static const double sm = 6.0;
|
||||
static const double md = 12.0;
|
||||
static const double lg = 16.0;
|
||||
static const double xl = 18.0;
|
||||
static const double xxl = 24.0;
|
||||
static const double full = 999.0;
|
||||
}
|
||||
Reference in New Issue
Block a user