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