fix
This commit is contained in:
@@ -143,7 +143,7 @@ class PackageModel extends BaseModel {
|
||||
await FirebaseFirestore.instance.collection("$path").doc(id).get();
|
||||
if (snap.exists) {
|
||||
var package =
|
||||
Package.fromMap(snap.data as Map<String, dynamic>, snap.id);
|
||||
Package.fromMap(snap.data() as Map<String, dynamic>, snap.id);
|
||||
return package;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -61,9 +61,10 @@ class _DeliveryAddressSelectionState extends State<DeliveryAddressSelection> {
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () async {
|
||||
bool updated = await Navigator.of(context).push(CupertinoPageRoute(
|
||||
bool? updated = await Navigator.of(context).push(CupertinoPageRoute(
|
||||
builder: (context) =>
|
||||
DeliveryAddressEditor(user: widget.user)));
|
||||
if (updated == null) return;
|
||||
if (updated) {
|
||||
_getDeliverAddresses();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user