refactoring
This commit is contained in:
@@ -19,12 +19,12 @@ class ConnectedUpcomingEvents extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CoreCard(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildHeader(),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: 8),
|
||||
BlocBuilder<DashboardBloc, DashboardState>(
|
||||
builder: (ctx, state) {
|
||||
if (state is DashboardLoading) {
|
||||
@@ -103,29 +103,29 @@ class ConnectedUpcomingEvents extends StatelessWidget {
|
||||
|
||||
return CoreCard(
|
||||
backgroundColor: Theme.of(context).cardColor,
|
||||
padding: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 44,
|
||||
height: 44,
|
||||
width: 32,
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
color: statusColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: event.imageUrl != null
|
||||
? ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
child: Image.network(
|
||||
event.imageUrl!,
|
||||
fit: BoxFit.cover,
|
||||
errorBuilder: (context, error, stackTrace) => Icon(Icons.event_outlined, color: statusColor, size: 20),
|
||||
errorBuilder: (context, error, stackTrace) => Icon(Icons.event_outlined, color: statusColor, size: 16),
|
||||
),
|
||||
)
|
||||
: Icon(Icons.event_outlined, color: statusColor, size: 20),
|
||||
: Icon(Icons.event_outlined, color: statusColor, size: 16),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
@@ -168,7 +168,7 @@ class ConnectedUpcomingEvents extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 8),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user