if url is "" then follow default route
This commit is contained in:
@@ -113,9 +113,12 @@ class _MzansiBusinessProfileState extends State<MzansiBusinessProfile> {
|
|||||||
return const Center(child: Mihloadingcircle());
|
return const Center(child: Mihloadingcircle());
|
||||||
} else if (snapshot.connectionState == ConnectionState.done &&
|
} else if (snapshot.connectionState == ConnectionState.done &&
|
||||||
snapshot.hasData) {
|
snapshot.hasData) {
|
||||||
|
final logoUrl = snapshot.data!.isNotEmpty
|
||||||
|
? NetworkImage(snapshot.data!)
|
||||||
|
: null;
|
||||||
return MihBusinessDetails(
|
return MihBusinessDetails(
|
||||||
arguments: widget.arguments,
|
arguments: widget.arguments,
|
||||||
logoImage: NetworkImage(snapshot.requireData),
|
logoImage: logoUrl,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Text("Error: ${snapshot.error}");
|
return Text("Error: ${snapshot.error}");
|
||||||
@@ -129,7 +132,10 @@ class _MzansiBusinessProfileState extends State<MzansiBusinessProfile> {
|
|||||||
} else if (snapshot.connectionState == ConnectionState.done &&
|
} else if (snapshot.connectionState == ConnectionState.done &&
|
||||||
snapshot.hasData) {
|
snapshot.hasData) {
|
||||||
final proPicUrl = NetworkImage(snapshot.data![0]);
|
final proPicUrl = NetworkImage(snapshot.data![0]);
|
||||||
final signatureUrl = NetworkImage(snapshot.data![1]);
|
print("=============== Signature URL: ${snapshot.data![1]}");
|
||||||
|
final signatureUrl = snapshot.data![1].isNotEmpty
|
||||||
|
? NetworkImage(snapshot.data![1])
|
||||||
|
: null;
|
||||||
return MihMyBusinessUser(
|
return MihMyBusinessUser(
|
||||||
arguments: widget.arguments,
|
arguments: widget.arguments,
|
||||||
userProPicImage: proPicUrl,
|
userProPicImage: proPicUrl,
|
||||||
|
|||||||
Reference in New Issue
Block a user