##IDS Material SDK
IDS Material SDK callbacks :
- IDSMultiSelectDropDown;
Usage
@override
Widget build(BuildContext context) =>
IDSMultiSelectDropDown(
limit: 3,
onChanged: (List<String> x) {
setState(() {
selectedJobRole = x;
});
},
options: jobRole ?? [],
selectedValues: selectedJobRole,
onLimitMessage: (limit) {
APPHelper.showToast("You can only select 3 items");
},
whenEmpty: 'Select Job Role',
);
Custom Drop down List array and string array usage
navigateToIDSDropDown(int code, String key, List<dynamic>? array) {
showDialog(
context: context,
builder: (BuildContext context) {
return Center(
child: Dialog(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10))),
child: IDSDropDown(
appBarBg:Color.red,
requestedCode: code,
jsonKeyName: key,
dropDownArray: array,
callback: (requestedCode, json) {
if (requestedCode == 1) {
setState(() {
industryDropValue = json["name"];
});
}
if (requestedCode == 2) {
setState(() {
countryDropValue = json["name"];
});
}
},
),
),
);
});
/*Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
IDSDropDown(
appBarBg:Color.red,
requestedCode: code,
jsonKeyName: key,
dropDownArray: array,
callback: (requestedCode, json) {
if (requestedCode == 1) {
setState(() {
industryDropValue = json["name"];
});
}
if (requestedCode == 2) {
setState(() {
countryDropValue = json["name"];
});
}
},
),
fullscreenDialog: true),
);*/
}
navigateToIDSDropDownString(int code, List<String> array) {
showDialog(
context: context,
builder: (BuildContext context) {
return Center(
child: Dialog(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10))),
child: SizedBox(
height: MediaQuery.of(context).size.width,
child: IDSDropDownString(
appBarBg:Color.red,
requestedCode: code,
dropDownArray: array,
callback: (requestedCode, value) {
if (requestedCode == 1) {
setState(() {
employeeDropValue = value;
});
}
},
),
),
),
);
});
/* Navigator.push(
context,
MaterialPageRoute(
builder: (context) => IDSDropDownString(
appBarBg:Color.red,
requestedCode: code,
dropDownArray: array,
callback: (requestedCode, value) {
if (requestedCode == 1) {
setState(() {
employeeDropValue = value;
});
}
},
),
fullscreenDialog: true),
);*/
}