const constructure
This commit is contained in:
@@ -27,7 +27,7 @@ class SyncCompletedWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 20),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
Text(
|
||||
'Sinkronisasi Berhasil!',
|
||||
@@ -38,18 +38,18 @@ class SyncCompletedWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
Text(
|
||||
'Data berhasil diunduh ke perangkat',
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey.shade600),
|
||||
),
|
||||
|
||||
SizedBox(height: 20),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Stats cards
|
||||
Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -65,7 +65,7 @@ class SyncCompletedWidget extends StatelessWidget {
|
||||
color: Colors.grey.shade700,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
Column(
|
||||
children: [
|
||||
_buildStatItem(
|
||||
@@ -74,14 +74,14 @@ class SyncCompletedWidget extends StatelessWidget {
|
||||
Icons.category,
|
||||
Colors.blue,
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
_buildStatItem(
|
||||
'Produk',
|
||||
'${stats.totalProducts}',
|
||||
Icons.inventory_2,
|
||||
Colors.green,
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
_buildStatItem(
|
||||
'Variant',
|
||||
'${stats.totalVariants}',
|
||||
@@ -94,10 +94,10 @@ class SyncCompletedWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.shade100,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
@@ -119,7 +119,7 @@ class SyncCompletedWidget extends StatelessWidget {
|
||||
Color color,
|
||||
) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -128,7 +128,7 @@ class SyncCompletedWidget extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(icon, size: 20, color: color),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
@@ -11,12 +11,12 @@ class SyncInitialWidget extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.download_rounded, size: 48, color: Colors.grey.shade400),
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'Siap untuk sinkronisasi',
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'Tekan tombol mulai untuk mengunduh data',
|
||||
style: AppStyle.sm.copyWith(color: Colors.grey.shade600),
|
||||
|
||||
@@ -36,7 +36,7 @@ class SyncStateWidget extends StatelessWidget {
|
||||
value: progressAnimation.value,
|
||||
strokeWidth: 6,
|
||||
backgroundColor: Colors.grey.shade200,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
valueColor: const AlwaysStoppedAnimation<Color>(
|
||||
AppColor.primary,
|
||||
),
|
||||
);
|
||||
@@ -46,13 +46,13 @@ class SyncStateWidget extends StatelessWidget {
|
||||
Column(
|
||||
children: [
|
||||
Icon(_getSyncIcon(step), size: 24, color: AppColor.primary),
|
||||
SizedBox(height: 2),
|
||||
const SizedBox(height: 2),
|
||||
AnimatedBuilder(
|
||||
animation: progressAnimation,
|
||||
builder: (context, child) {
|
||||
return Text(
|
||||
'${(progressAnimation.value * 100).toInt()}%',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.primary,
|
||||
@@ -65,16 +65,16 @@ class SyncStateWidget extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(height: 20),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Step indicator
|
||||
_buildStepIndicator(step),
|
||||
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Current message
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue.shade50,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -90,7 +90,7 @@ class SyncStateWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Sync details
|
||||
_buildSyncDetails(step, progress),
|
||||
@@ -101,7 +101,7 @@ class SyncStateWidget extends StatelessWidget {
|
||||
|
||||
Widget _buildSyncDetails(SyncStep step, double progress) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -122,7 +122,7 @@ class SyncStateWidget extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
_getStepLabel(step),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.primary,
|
||||
@@ -130,7 +130,7 @@ class SyncStateWidget extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 6),
|
||||
const SizedBox(height: 6),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@@ -144,7 +144,7 @@ class SyncStateWidget extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
'${(progress * 100).toInt()}%',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.primary,
|
||||
@@ -172,8 +172,8 @@ class SyncStateWidget extends StatelessWidget {
|
||||
final isCompleted = step.index < currentStep.index;
|
||||
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 2),
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
margin: const EdgeInsets.symmetric(vertical: 2),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: isActive
|
||||
? AppColor.primary.withOpacity(0.1)
|
||||
@@ -194,7 +194,7 @@ class SyncStateWidget extends StatelessWidget {
|
||||
? Colors.green.shade600
|
||||
: Colors.grey.shade500,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user