chore: update Android SDK version to 1.3.42+38, enhance SDUIFormWidget with improved button layout and padding, and remove unused JSON configuration file

This commit is contained in:
2026-01-05 09:24:43 +03:30
parent 6a65aa2883
commit 0f0fa8da09
5 changed files with 83 additions and 676 deletions

View File

@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/step2_page.dart';
import 'package:rasadyar_chicken/presentation/widget/sdui/widgets/chip_selection/model/chip_selection_sdui_model.dart';
import 'package:rasadyar_core/core.dart';
@@ -32,20 +31,27 @@ class ChipSelectionSDUI extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
if (model.label != null && model.label!.isNotEmpty) ...[
Text(
model.label!,
style: AppFonts.yekan14Bold.copyWith(color: AppColor.textColor2),
Row(
children: [
Text(
model.label!,
style: AppFonts.yekan14Bold.copyWith(
color: AppColor.textColor2,
),
),
],
),
SizedBox(height: 9.h),
],
Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: spacing,
children: options.asMap().entries.map((entry) {
final option = entry.value;
final optionIndex = option.index ?? entry.key;
return Expanded(
child: containerChips(
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
spacing: spacing,
children: options.asMap().entries.map((entry) {
final option = entry.value;
final optionIndex = option.index ?? entry.key;
return containerChips(
selectedIndex: selectedIndex,
index: optionIndex,
label: option.label ?? '',
@@ -54,12 +60,50 @@ class ChipSelectionSDUI extends StatelessWidget {
onChanged!(model.key!, index, option.value);
}
},
),
);
}).toList(),
);
}).toList(),
),
),
],
);
});
}
}
GestureDetector containerChips({
required int selectedIndex,
required int index,
required String label,
required Function(int) onTap,
}) {
return GestureDetector(
onTap: () => onTap(index),
child: Container(
height: 24.h,
padding: EdgeInsets.symmetric(horizontal: 20.w),
decoration: BoxDecoration(
color: index == selectedIndex
? AppColor.green1Normal
: AppColor.whiteGreyNormal,
borderRadius: BorderRadius.circular(8),
border: index == selectedIndex
? Border.fromBorderSide(BorderSide.none)
: Border.all(width: 1, color: AppColor.blackLightHover),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 5,
children: [
if (index == selectedIndex)
Icon(Icons.check, color: Colors.white, size: 16),
Text(
label,
style: index == selectedIndex
? AppFonts.yekan14Bold.copyWith(color: Colors.white)
: AppFonts.yekan14.copyWith(color: AppColor.textColor),
),
],
),
),
);
}