تصميم عالمي جديد، وإصلاح الخرائط ومراقب السيرفرات

This commit is contained in:
Hamza-Ayed
2026-07-26 04:21:42 +03:00
parent f325ffce42
commit ca6cb7a3fe
10 changed files with 1367 additions and 673 deletions
+93 -3
View File
@@ -4,7 +4,9 @@ import 'package:google_fonts/google_fonts.dart';
import 'colors.dart';
class AppStyle {
// --- Typography ---
AppStyle._();
// ─── Static typography (dark mode defaults, backward compatible) ───────────
static TextStyle display = GoogleFonts.inter(
fontWeight: FontWeight.w800,
@@ -49,7 +51,91 @@ class AppStyle {
color: AppColor.accent,
);
// --- Decorations ---
// ─── Context-aware typography (adapts to theme) ───────────────────────────
static TextStyle displayFor(BuildContext context) => GoogleFonts.inter(
fontWeight: FontWeight.w800,
fontSize: 32,
color: Theme.of(context).colorScheme.onSurface,
letterSpacing: -1,
);
static TextStyle headTitleFor(BuildContext context) => GoogleFonts.cairo(
fontWeight: FontWeight.bold,
fontSize: 24,
color: Theme.of(context).colorScheme.onSurface,
);
static TextStyle titleFor(BuildContext context) => GoogleFonts.inter(
fontWeight: FontWeight.w600,
fontSize: 16,
color: Theme.of(context).colorScheme.onSurface,
);
static TextStyle subtitleFor(BuildContext context) => GoogleFonts.inter(
fontWeight: FontWeight.w500,
fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant,
);
static TextStyle bodyFor(BuildContext context) => GoogleFonts.inter(
fontWeight: FontWeight.normal,
fontSize: 14,
color: Theme.of(context).colorScheme.onSurface,
);
static TextStyle captionFor(BuildContext context) => GoogleFonts.inter(
fontWeight: FontWeight.w400,
fontSize: 12,
color: Theme.of(context).colorScheme.onSurfaceVariant.withValues(alpha: 0.6),
);
static TextStyle numberFor(BuildContext context) => GoogleFonts.jetBrainsMono(
fontWeight: FontWeight.bold,
fontSize: 15,
color: Theme.of(context).colorScheme.primary,
);
// ─── Context-aware decorations ────────────────────────────────────────────
static BoxDecoration cardDecorationFor(BuildContext context) {
final cs = Theme.of(context).colorScheme;
return BoxDecoration(
color: cs.surface,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: cs.outline, width: 1),
boxShadow: [
BoxShadow(
color: cs.shadow.withValues(alpha: context.isDark ? 0.4 : 0.05),
blurRadius: 20,
offset: const Offset(0, 8),
),
],
);
}
static BoxDecoration elevatedCardFor(BuildContext context) {
final cs = Theme.of(context).colorScheme;
return BoxDecoration(
color: cs.surfaceContainerHighest,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: cs.primary.withValues(alpha: context.isDark ? 0.3 : 0.2),
width: 1,
),
);
}
static BoxDecoration glassDecorationFor(BuildContext context) {
final cs = Theme.of(context).colorScheme;
return BoxDecoration(
color: cs.surface.withValues(alpha: context.isDark ? 0.8 : 0.9),
borderRadius: BorderRadius.circular(24),
border: Border.all(color: cs.outline, width: 1),
);
}
// ─── Legacy static decorations ────────────────────────────────────────────
static BoxDecoration cardDecoration = BoxDecoration(
color: AppColor.surface,
@@ -76,8 +162,12 @@ class AppStyle {
border: Border.all(color: AppColor.divider, width: 1),
);
// --- Legacy Mappings ---
// ─── Legacy Mappings ─────────────────────────────────────────────────────
static TextStyle headTitle2 = headTitle;
static BoxDecoration boxDecoration = cardDecoration;
static BoxDecoration boxDecoration1 = elevatedCard;
}
extension _Brightness on BuildContext {
bool get isDark => Theme.of(this).brightness == Brightness.dark;
}