fix test package if no business data passed
This commit is contained in:
parent
93eef52c9c
commit
7e73fb44e2
2 changed files with 8 additions and 6 deletions
|
|
@ -133,7 +133,7 @@ class _PackageTestState extends State<PackageTest> {
|
||||||
List<Widget> toolBodies = [
|
List<Widget> toolBodies = [
|
||||||
PackageToolOne(
|
PackageToolOne(
|
||||||
user: widget.arguments.user,
|
user: widget.arguments.user,
|
||||||
business: widget.arguments.business!,
|
business: widget.arguments.business,
|
||||||
),
|
),
|
||||||
const PackageToolTwo(),
|
const PackageToolTwo(),
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import 'package:redacted/redacted.dart';
|
||||||
|
|
||||||
class PackageToolOne extends StatefulWidget {
|
class PackageToolOne extends StatefulWidget {
|
||||||
final AppUser user;
|
final AppUser user;
|
||||||
final Business business;
|
final Business? business;
|
||||||
const PackageToolOne({
|
const PackageToolOne({
|
||||||
super.key,
|
super.key,
|
||||||
required this.user,
|
required this.user,
|
||||||
|
|
@ -393,10 +393,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
||||||
.replaceAll("Latitude: ", "")
|
.replaceAll("Latitude: ", "")
|
||||||
.replaceAll("Longitude: ", "");
|
.replaceAll("Longitude: ", "");
|
||||||
print("My Location is this: $myLocation");
|
print("My Location is this: $myLocation");
|
||||||
return MihBusinessProfilePreview(
|
return widget.business != null
|
||||||
business: widget.business,
|
? MihBusinessProfilePreview(
|
||||||
|
business: widget.business!,
|
||||||
myLocation: myLocation,
|
myLocation: myLocation,
|
||||||
);
|
)
|
||||||
|
: Text("NoBusiness Data");
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
// const SizedBox(height: 10),
|
// const SizedBox(height: 10),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue