improvements.

main_production_RSG
Sikander Saleem 2 months ago
parent 14b4c3f1ba
commit 59ad837864

@ -174,11 +174,7 @@ class _CMDetailPageState extends State<CMDetailPage> {
return const SizedBox(); return const SizedBox();
} }
}), }),
// Print Button IconButton(icon: "download".toSvgAsset(height: 24, width: 24, color: AppColor.icon2Color(context)), padding: EdgeInsets.zero, onPressed: _handlePrint),
IconButton(
icon: const Icon(Icons.print),
onPressed: _handlePrint,
),
IconButton( IconButton(
icon: const Icon(Icons.home), icon: const Icon(Icons.home),
onPressed: () { onPressed: () {

@ -133,41 +133,33 @@ class _SelectionBottomSheetState<T extends Base> extends State<MultipleSelection
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (cxt, index) { itemBuilder: (cxt, index) {
bool isDisabledItem = widget.disableItem != null && widget.disableItem?.identifier == filteredList![index].identifier; bool isDisabledItem = widget.disableItem != null && widget.disableItem?.identifier == filteredList![index].identifier;
return Theme( return CheckboxListTile(
data: Theme.of(context).copyWith( value: checkItContains(filteredList![index]),
checkboxTheme: CheckboxThemeData( dense: true,
fillColor: MaterialStateColor.resolveWith((states) { controlAffinity: ListTileControlAffinity.leading,
if (states.contains(MaterialState.selected)) { activeColor: AppColor.primary10,
return AppColor.iconColor(context); // Active color checkColor: AppColor.white10,
} // fillColor: WidgetStateProperty.all(AppColor.background(context)),
return Colors.grey; // Inactive color contentPadding: const EdgeInsets.only(left: 16, right: 16),
}), // activeColor: AppColor.blueStatus(context),
), side: BorderSide(color: AppColor.icon2Color(context).withValues(alpha: .3), width: 1.0),
), onChanged: (value) {
child: CheckboxListTile( // if (checkItContains(filteredList![index]) ?? false) {
value: checkItContains(filteredList![index]), // _selectedValue.remove(filteredList![index]);
dense: true, // } else {
controlAffinity: ListTileControlAffinity.leading, // _selectedValue.add(filteredList![index]);
activeColor: AppColor.iconColor(context), // }
contentPadding: const EdgeInsets.only(left: 16, right: 16), if (value == true) {
onChanged: (value) { _selectedValue.add(filteredList![index]);
// if (checkItContains(filteredList![index]) ?? false) { } else if (value == false) {
// _selectedValue.remove(filteredList![index]); _selectedValue.remove(filteredList![index]);
// } else { }
// _selectedValue.add(filteredList![index]); searchFocusNode.unfocus();
// } setState(() {});
if (value == true) { },
_selectedValue.add(filteredList![index]); title: Text(
} else if (value == false) { widget.builderString(filteredList![index]).cleanupWhitespace.capitalizeFirstOfEach ?? "",
_selectedValue.remove(filteredList![index]); style: Theme.of(context).textTheme.bodyLarge,
}
searchFocusNode.unfocus();
setState(() {});
},
title: Text(
widget.builderString(filteredList![index]).cleanupWhitespace.capitalizeFirstOfEach ?? "",
style: Theme.of(context).textTheme.bodyLarge,
),
), ),
); );
}), }),

@ -135,9 +135,9 @@ class _SelectionBottomSheetState<T extends Base> extends State<SelectionFullScre
radioTheme: RadioThemeData( radioTheme: RadioThemeData(
fillColor: MaterialStateColor.resolveWith((states) { fillColor: MaterialStateColor.resolveWith((states) {
if (states.contains(MaterialState.selected)) { if (states.contains(MaterialState.selected)) {
return AppColor.iconColor(context); // Active color return AppColor.primary10; // Active color
} }
return Colors.grey; // Inactive color return AppColor.icon2Color(context).withValues(alpha: .5);
}), }),
), ),
), ),
@ -147,7 +147,10 @@ class _SelectionBottomSheetState<T extends Base> extends State<SelectionFullScre
dense: true, dense: true,
contentPadding: const EdgeInsets.only(left: 16, right: 16), contentPadding: const EdgeInsets.only(left: 16, right: 16),
groupValue: _selectedValue, groupValue: _selectedValue,
activeColor: AppColor.iconColor(context), // activeColor: AppColor.iconColor(context),
// activeColor: AppColor.primary10,colo
// checkColor: AppColor.white10,
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
onChanged: isDisabledItem onChanged: isDisabledItem
? null ? null

Loading…
Cancel
Save