mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-22 06:28:04 +02:00
refactor(theme): update card and dialog themes to use CardThemeData and DialogThemeData
refactor(ui_components): adjust animation durations for smoother transitions fix(dashboard): rename border property to hasBorder for clarity fix(player): rename border property to hasBorder for consistency
This commit is contained in:
1 parent
5b16029038
commit
863e5ddad4
6 files changed
+11
-11
No files matched your search
@@ -279,7 +279,7 @@ class AppTheme {
|
|||||||
borderRadius: BorderRadius.circular(radiusMd),
|
borderRadius: BorderRadius.circular(radiusMd),
|
||||||
),
|
),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.symmetric(horizontal: spacing20, vertical: spacing10),
|
const EdgeInsets.symmetric(horizontal: spacing20, vertical: spacing12),
|
||||||
textStyle: GoogleFonts.inter(
|
textStyle: GoogleFonts.inter(
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@@ -301,7 +301,7 @@ class AppTheme {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// ============ CARDS ============
|
// ============ CARDS ============
|
||||||
cardTheme: CardTheme(
|
cardTheme: CardThemeData(
|
||||||
color: AppColors.surface,
|
color: AppColors.surface,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
@@ -312,7 +312,7 @@ class AppTheme {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// ============ DIALOGS & BOTTOM SHEETS ============
|
// ============ DIALOGS & BOTTOM SHEETS ============
|
||||||
dialogTheme: DialogTheme(
|
dialogTheme: DialogThemeData(
|
||||||
backgroundColor: AppColors.surface,
|
backgroundColor: AppColors.surface,
|
||||||
elevation: elevationXl,
|
elevation: elevationXl,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class _GradientButtonState extends State<GradientButton>
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_controller = AnimationController(
|
_controller = AnimationController(
|
||||||
duration: AppTheme.durationFast,
|
duration: AppTheme.durationSm,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
_scaleAnimation = Tween<double>(begin: 1.0, end: 0.95).animate(
|
_scaleAnimation = Tween<double>(begin: 1.0, end: 0.95).animate(
|
||||||
@@ -356,10 +356,10 @@ class _MediaCardState extends State<MediaCard>
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: AnimatedScale(
|
child: AnimatedScale(
|
||||||
scale: _isHovered ? 1.05 : 1.0,
|
scale: _isHovered ? 1.05 : 1.0,
|
||||||
duration: AppTheme.durationFast,
|
duration: AppTheme.durationSm,
|
||||||
curve: AppTheme.curveDefault,
|
curve: AppTheme.curveDefault,
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: AppTheme.durationFast,
|
duration: AppTheme.durationSm,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(AppTheme.radiusMd),
|
borderRadius: BorderRadius.circular(AppTheme.radiusMd),
|
||||||
color: AppColors.surface,
|
color: AppColors.surface,
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class _AdminContentState extends ConsumerState<AdminContent>
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => _tabController.animateTo(index),
|
onTap: () => _tabController.animateTo(index),
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: AppTheme.durationFast,
|
duration: AppTheme.durationSm,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSelected ? AppColors.focusColor : Colors.transparent,
|
color: isSelected ? AppColors.focusColor : Colors.transparent,
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
|||||||
opacity: 0.1,
|
opacity: 0.1,
|
||||||
// blur is hardcoded in GlassContainer (15), so we don't pass it
|
// blur is hardcoded in GlassContainer (15), so we don't pass it
|
||||||
// border is bool, borderColor allows customization
|
// border is bool, borderColor allows customization
|
||||||
border: true,
|
hasBorder: true,
|
||||||
borderColor: Colors.white.withOpacity(0.1),
|
borderColor: Colors.white.withOpacity(0.1),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|||||||
@@ -636,7 +636,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
|||||||
child: GlassContainer(
|
child: GlassContainer(
|
||||||
borderRadius: 24,
|
borderRadius: 24,
|
||||||
opacity: 0.2, // Slightly more opaque for controls
|
opacity: 0.2, // Slightly more opaque for controls
|
||||||
border: true,
|
hasBorder: true,
|
||||||
borderColor: Colors.white.withOpacity(0.1),
|
borderColor: Colors.white.withOpacity(0.1),
|
||||||
padding: const EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ class MobileTheme {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// ============ CARDS ============
|
// ============ CARDS ============
|
||||||
cardTheme: CardTheme(
|
cardTheme: CardThemeData(
|
||||||
color: AppColors.surface,
|
color: AppColors.surface,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
@@ -271,7 +271,7 @@ class MobileTheme {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// ============ DIALOGS ============
|
// ============ DIALOGS ============
|
||||||
dialogTheme: DialogTheme(
|
dialogTheme: DialogThemeData(
|
||||||
backgroundColor: AppColors.surface,
|
backgroundColor: AppColors.surface,
|
||||||
elevation: AppTheme.elevationLg,
|
elevation: AppTheme.elevationLg,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|||||||
Reference in new issue
Block a user