Merge to main #1

Merged
agrilink merged 19 commits from develop-gitea into main 2024-12-30 04:37:02 +00:00
15 changed files with 12 additions and 33 deletions
Showing only changes of commit 599f6b6e73 - Show all commits

View File

@ -32,8 +32,8 @@ class ControlButtonWidget extends StatelessWidget {
boxShadow: [
BoxShadow(
color: isActive
? AppColor.secondary.withOpacity(0.2)
: Colors.grey.withOpacity(0.2),
? AppColor.secondary.withValues(alpha: 0.2)
: Colors.grey.withValues(alpha: 0.2),
spreadRadius: 1.r,
blurRadius: 16.r,
offset: Offset(0, 12.r),

View File

@ -32,8 +32,8 @@ class PumpStatusWidget extends StatelessWidget {
boxShadow: [
BoxShadow(
color: isActive
? AppColor.secondary.withOpacity(0.2)
: Colors.grey.withOpacity(0.2),
? AppColor.secondary.withValues(alpha: 0.2)
: Colors.grey.withValues(alpha: 0.2),
spreadRadius: 1.r,
blurRadius: 16.r,
offset: Offset(0, 12.r),

View File

@ -151,7 +151,6 @@ class ConductivityScreen extends StatelessWidget {
case ResultState.noData:
return const NoDataStateWidget();
case ResultState.initial:
default:
return const SizedBox.shrink();
}
},

View File

@ -152,10 +152,6 @@ class HumidityScreen extends StatelessWidget {
return const NoDataStateWidget();
case ResultState.initial:
return const SizedBox.shrink();
default:
return const Center(
child: Text('Default Error'),
);
}
}),
),

View File

@ -174,10 +174,6 @@ class LightScreen extends StatelessWidget {
);
case ResultState.initial:
return const SizedBox.shrink();
default:
return const Center(
child: Text('Default Error'),
);
}
}),
),

View File

@ -151,7 +151,6 @@ class NitrogenScreen extends StatelessWidget {
case ResultState.noData:
return const NoDataStateWidget();
case ResultState.initial:
default:
return const SizedBox.shrink();
}
},

View File

@ -142,7 +142,6 @@ class PhScreen extends StatelessWidget {
case ResultState.noData:
return const NoDataStateWidget();
case ResultState.initial:
default:
return const SizedBox.shrink();
}
},

View File

@ -151,7 +151,6 @@ class PhosphorusScreen extends StatelessWidget {
case ResultState.noData:
return const NoDataStateWidget();
case ResultState.initial:
default:
return const SizedBox.shrink();
}
},

View File

@ -151,7 +151,6 @@ class PotassiumScreen extends StatelessWidget {
case ResultState.noData:
return const NoDataStateWidget();
case ResultState.initial:
default:
return const SizedBox.shrink();
}
},

View File

@ -180,7 +180,6 @@ class SoilMoistureScreen extends StatelessWidget {
case ResultState.noData:
return const NoDataStateWidget();
case ResultState.initial:
default:
return const SizedBox.shrink();
}
},

View File

@ -149,7 +149,7 @@ class SoilTemperatureScreen extends StatelessWidget {
height: 100.h,
width: 100.w,
decoration: BoxDecoration(
color: color.withOpacity(0.1),
color: color.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: color, width: 2),
),
@ -230,7 +230,6 @@ class SoilTemperatureScreen extends StatelessWidget {
case ResultState.noData:
return const NoDataStateWidget();
case ResultState.initial:
default:
return const SizedBox.shrink();
}
},

View File

@ -118,7 +118,7 @@ class TemperatureScreen extends StatelessWidget {
width: 100.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.blue.withOpacity(0.1),
color: Colors.blue.withValues(alpha: 0.1),
border: Border.all(
color: Colors.blue,
width: 2,
@ -143,7 +143,7 @@ class TemperatureScreen extends StatelessWidget {
height: 100.h,
width: 100.w,
decoration: BoxDecoration(
color: Colors.green.withOpacity(0.1),
color: Colors.green.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(16),
border: Border.all(
color: Colors.green,
@ -169,7 +169,7 @@ class TemperatureScreen extends StatelessWidget {
height: 100.h,
width: 100.w,
decoration: BoxDecoration(
color: Colors.orange.withOpacity(0.1),
color: Colors.orange.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(16),
border: Border.all(
color: Colors.orange.shade800,
@ -235,10 +235,6 @@ class TemperatureScreen extends StatelessWidget {
return NoDataStateWidget();
case ResultState.initial:
return const SizedBox.shrink();
default:
return const Center(
child: Text('Default Error'),
);
}
},
),

View File

@ -41,7 +41,7 @@ class DataDisplayerWidget extends StatelessWidget {
borderRadius: BorderRadius.circular(16.r), // Bentuk sudut yang bundar
),
elevation: 20, // Efek bayangan
shadowColor: Colors.grey.withOpacity(0.2),
shadowColor: Colors.grey.withValues(alpha: 0.2),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -52,7 +52,7 @@ class DataDisplayerWidget extends StatelessWidget {
child: Text(
censorIdentifier ?? '',
style: AppTheme.labelSmall
.copyWith(color: textColor.withOpacity(0.5)),
.copyWith(color: textColor.withValues(alpha: 0.5)),
),
),
Icon(icon, color: iconColor, size: 32.r),
@ -67,7 +67,7 @@ class DataDisplayerWidget extends StatelessWidget {
Text(
subtitle,
style: AppTheme.labelSmall
.copyWith(color: textColor.withOpacity(0.5)),
.copyWith(color: textColor.withValues(alpha: 0.5)),
),
],
),

View File

@ -111,7 +111,7 @@ class GarphicWidget extends StatelessWidget {
show: true,
gradient: LinearGradient(
colors: gradientColors
.map((color) => color.withOpacity(0.3))
.map((color) => color.withValues(alpha: 0.3))
.toList()),
),
),

View File

@ -102,8 +102,6 @@ class ListDataFromCensorDht extends StatelessWidget {
));
case ResultState.initial:
return const SizedBox.shrink();
default:
return const SizedBox.shrink();
}
});
}