refactor: removing dead code
This commit is contained in:
parent
6d6440732d
commit
599f6b6e73
|
|
@ -32,8 +32,8 @@ class ControlButtonWidget extends StatelessWidget {
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: isActive
|
color: isActive
|
||||||
? AppColor.secondary.withOpacity(0.2)
|
? AppColor.secondary.withValues(alpha: 0.2)
|
||||||
: Colors.grey.withOpacity(0.2),
|
: Colors.grey.withValues(alpha: 0.2),
|
||||||
spreadRadius: 1.r,
|
spreadRadius: 1.r,
|
||||||
blurRadius: 16.r,
|
blurRadius: 16.r,
|
||||||
offset: Offset(0, 12.r),
|
offset: Offset(0, 12.r),
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ class PumpStatusWidget extends StatelessWidget {
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: isActive
|
color: isActive
|
||||||
? AppColor.secondary.withOpacity(0.2)
|
? AppColor.secondary.withValues(alpha: 0.2)
|
||||||
: Colors.grey.withOpacity(0.2),
|
: Colors.grey.withValues(alpha: 0.2),
|
||||||
spreadRadius: 1.r,
|
spreadRadius: 1.r,
|
||||||
blurRadius: 16.r,
|
blurRadius: 16.r,
|
||||||
offset: Offset(0, 12.r),
|
offset: Offset(0, 12.r),
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,6 @@ class ConductivityScreen extends StatelessWidget {
|
||||||
case ResultState.noData:
|
case ResultState.noData:
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -152,10 +152,6 @@ class HumidityScreen extends StatelessWidget {
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
default:
|
|
||||||
return const Center(
|
|
||||||
child: Text('Default Error'),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -174,10 +174,6 @@ class LightScreen extends StatelessWidget {
|
||||||
);
|
);
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
default:
|
|
||||||
return const Center(
|
|
||||||
child: Text('Default Error'),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,6 @@ class NitrogenScreen extends StatelessWidget {
|
||||||
case ResultState.noData:
|
case ResultState.noData:
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,6 @@ class PhScreen extends StatelessWidget {
|
||||||
case ResultState.noData:
|
case ResultState.noData:
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,6 @@ class PhosphorusScreen extends StatelessWidget {
|
||||||
case ResultState.noData:
|
case ResultState.noData:
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,6 @@ class PotassiumScreen extends StatelessWidget {
|
||||||
case ResultState.noData:
|
case ResultState.noData:
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,6 @@ class SoilMoistureScreen extends StatelessWidget {
|
||||||
case ResultState.noData:
|
case ResultState.noData:
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ class SoilTemperatureScreen extends StatelessWidget {
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
width: 100.w,
|
width: 100.w,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color.withOpacity(0.1),
|
color: color.withValues(alpha: 0.1),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
border: Border.all(color: color, width: 2),
|
border: Border.all(color: color, width: 2),
|
||||||
),
|
),
|
||||||
|
|
@ -230,7 +230,6 @@ class SoilTemperatureScreen extends StatelessWidget {
|
||||||
case ResultState.noData:
|
case ResultState.noData:
|
||||||
return const NoDataStateWidget();
|
return const NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ class TemperatureScreen extends StatelessWidget {
|
||||||
width: 100.w,
|
width: 100.w,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
color: Colors.blue.withOpacity(0.1),
|
color: Colors.blue.withValues(alpha: 0.1),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
width: 2,
|
width: 2,
|
||||||
|
|
@ -143,7 +143,7 @@ class TemperatureScreen extends StatelessWidget {
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
width: 100.w,
|
width: 100.w,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.green.withOpacity(0.1),
|
color: Colors.green.withValues(alpha: 0.1),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
|
|
@ -169,7 +169,7 @@ class TemperatureScreen extends StatelessWidget {
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
width: 100.w,
|
width: 100.w,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.orange.withOpacity(0.1),
|
color: Colors.orange.withValues(alpha: 0.1),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: Colors.orange.shade800,
|
color: Colors.orange.shade800,
|
||||||
|
|
@ -235,10 +235,6 @@ class TemperatureScreen extends StatelessWidget {
|
||||||
return NoDataStateWidget();
|
return NoDataStateWidget();
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
default:
|
|
||||||
return const Center(
|
|
||||||
child: Text('Default Error'),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class DataDisplayerWidget extends StatelessWidget {
|
||||||
borderRadius: BorderRadius.circular(16.r), // Bentuk sudut yang bundar
|
borderRadius: BorderRadius.circular(16.r), // Bentuk sudut yang bundar
|
||||||
),
|
),
|
||||||
elevation: 20, // Efek bayangan
|
elevation: 20, // Efek bayangan
|
||||||
shadowColor: Colors.grey.withOpacity(0.2),
|
shadowColor: Colors.grey.withValues(alpha: 0.2),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
@ -52,7 +52,7 @@ class DataDisplayerWidget extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
censorIdentifier ?? '',
|
censorIdentifier ?? '',
|
||||||
style: AppTheme.labelSmall
|
style: AppTheme.labelSmall
|
||||||
.copyWith(color: textColor.withOpacity(0.5)),
|
.copyWith(color: textColor.withValues(alpha: 0.5)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Icon(icon, color: iconColor, size: 32.r),
|
Icon(icon, color: iconColor, size: 32.r),
|
||||||
|
|
@ -67,7 +67,7 @@ class DataDisplayerWidget extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
subtitle,
|
subtitle,
|
||||||
style: AppTheme.labelSmall
|
style: AppTheme.labelSmall
|
||||||
.copyWith(color: textColor.withOpacity(0.5)),
|
.copyWith(color: textColor.withValues(alpha: 0.5)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ class GarphicWidget extends StatelessWidget {
|
||||||
show: true,
|
show: true,
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: gradientColors
|
colors: gradientColors
|
||||||
.map((color) => color.withOpacity(0.3))
|
.map((color) => color.withValues(alpha: 0.3))
|
||||||
.toList()),
|
.toList()),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,6 @@ class ListDataFromCensorDht extends StatelessWidget {
|
||||||
));
|
));
|
||||||
case ResultState.initial:
|
case ResultState.initial:
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user