editDialog method
Implementation
Future<void> editDialog() async {
if (context != null && pref.listItems.isNotEmpty) {
int? result = await showDialog(
context: context!,
builder: (BuildContext context) => PrefListEdit(
pref: pref,
),
);
if (result != null) {
if (callback != null) {
pref.value = result;
callback!(pref);
}
}
}
}