rename method Null safety
- dynamic initialList,
- String newName
Implementation
Future<ProductList> rename(
final ProductList initialList,
final String newName,
) async {
final ProductList newList = ProductList.user(newName);
final _BarcodeList list = _get(initialList) ?? _BarcodeList.now(<String>[]);
_put(_getKey(newList), list);
await delete(initialList);
await get(newList);
return newList;
}