feat: adopt material 3 theme and billing adjustments
This commit is contained in:
@@ -5,7 +5,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
import '../theme/app_colors.dart';
|
||||
// import '../theme/app_colors.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:crypto/crypto.dart';
|
||||
@@ -349,11 +349,11 @@ class _WebsiteIconState extends State<WebsiteIcon>
|
||||
Color _getColorFromName() {
|
||||
final int hash = widget.serviceName.hashCode.abs();
|
||||
final List<Color> colors = [
|
||||
AppColors.primaryColor,
|
||||
AppColors.successColor,
|
||||
AppColors.infoColor,
|
||||
AppColors.warningColor,
|
||||
AppColors.dangerColor,
|
||||
const Color(0xFF2563EB), // primary
|
||||
const Color(0xFF22C55E), // success
|
||||
const Color(0xFF6366F1), // info
|
||||
const Color(0xFFF59E0B), // warning
|
||||
const Color(0xFFF472B6), // accent/danger
|
||||
];
|
||||
|
||||
return colors[hash % colors.length];
|
||||
@@ -595,10 +595,10 @@ class _WebsiteIconState extends State<WebsiteIcon>
|
||||
return Container(
|
||||
key: ValueKey('loading_${widget.serviceName}_$_uniqueId'),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.surfaceColorAlt,
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(widget.size * 0.2),
|
||||
border: Border.all(
|
||||
color: AppColors.borderColor,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
@@ -607,10 +607,10 @@ class _WebsiteIconState extends State<WebsiteIcon>
|
||||
return Container(
|
||||
key: ValueKey('loading_${widget.serviceName}_$_uniqueId'),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.surfaceColorAlt,
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(widget.size * 0.2),
|
||||
border: Border.all(
|
||||
color: AppColors.borderColor,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
@@ -621,7 +621,7 @@ class _WebsiteIconState extends State<WebsiteIcon>
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
AppColors.primaryColor.withValues(alpha: 0.7)),
|
||||
Theme.of(context).colorScheme.primary.withValues(alpha: 0.7)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -661,10 +661,13 @@ class _WebsiteIconState extends State<WebsiteIcon>
|
||||
: const Duration(milliseconds: 300),
|
||||
placeholder: (context, url) {
|
||||
if (ReduceMotion.isEnabled(context)) {
|
||||
return Container(color: AppColors.surfaceColorAlt);
|
||||
return Container(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.surfaceContainerHighest);
|
||||
}
|
||||
return Container(
|
||||
color: AppColors.surfaceColorAlt,
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
child: Center(
|
||||
child: SizedBox(
|
||||
width: widget.size * 0.4,
|
||||
@@ -672,7 +675,10 @@ class _WebsiteIconState extends State<WebsiteIcon>
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
AppColors.primaryColor.withValues(alpha: 0.7)),
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.primary
|
||||
.withValues(alpha: 0.7)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -712,14 +718,7 @@ class _WebsiteIconState extends State<WebsiteIcon>
|
||||
return Container(
|
||||
key: ValueKey('fallback_${widget.serviceName}_$_uniqueId'),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
color,
|
||||
color.withValues(alpha: 0.8), // 약 0.8 알파값
|
||||
],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(widget.size * 0.2),
|
||||
),
|
||||
child: Center(
|
||||
|
||||
Reference in New Issue
Block a user