refactoring
This commit is contained in:
@@ -14,8 +14,8 @@ class CoreCard extends StatelessWidget {
|
||||
const CoreCard({
|
||||
Key? key,
|
||||
required this.child,
|
||||
this.padding = const EdgeInsets.all(12.0),
|
||||
this.margin = const EdgeInsets.only(bottom: 10.0),
|
||||
this.padding = const EdgeInsets.all(8.0),
|
||||
this.margin = const EdgeInsets.only(bottom: 6.0),
|
||||
this.onTap,
|
||||
this.backgroundColor,
|
||||
}) : super(key: key);
|
||||
@@ -23,22 +23,22 @@ class CoreCard extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
margin: margin,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? (isDark ? const Color(0xFF1A1A1A) : Colors.white),
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
color: backgroundColor ?? (isDark ? AppColors.darkSurface : Colors.white),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
border: Border.all(
|
||||
color: isDark ? AppColors.darkBorder.withOpacity(0.5) : AppColors.lightBorder,
|
||||
width: 0.4,
|
||||
width: 0.8,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(isDark ? 0.3 : 0.03),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
color: Colors.black.withOpacity(isDark ? 0.15 : 0.04),
|
||||
blurRadius: 6,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -46,7 +46,7 @@ class CoreCard extends StatelessWidget {
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
child: Padding(
|
||||
padding: padding,
|
||||
child: child,
|
||||
|
||||
Reference in New Issue
Block a user