insert static method
Implementation
static void insert(Data list, Data value, {bool notify = true, int? index}) {
if (list is Map) throw Exception('Cannot insert into map');
if (list.value is! List) throw Exception('Not a list');
if (index == null) {
(list.value as List).add(value);
} else {
(list.value as List).insert(index, value);
}
if (notify) list.notifyListeners();
}