forked from yaso_meth/mih-project
fix test package if no business data passed
This commit is contained in:
@@ -133,7 +133,7 @@ class _PackageTestState extends State<PackageTest> {
|
||||
List<Widget> toolBodies = [
|
||||
PackageToolOne(
|
||||
user: widget.arguments.user,
|
||||
business: widget.arguments.business!,
|
||||
business: widget.arguments.business,
|
||||
),
|
||||
const PackageToolTwo(),
|
||||
];
|
||||
|
||||
@@ -38,7 +38,7 @@ import 'package:redacted/redacted.dart';
|
||||
|
||||
class PackageToolOne extends StatefulWidget {
|
||||
final AppUser user;
|
||||
final Business business;
|
||||
final Business? business;
|
||||
const PackageToolOne({
|
||||
super.key,
|
||||
required this.user,
|
||||
@@ -393,10 +393,12 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
||||
.replaceAll("Latitude: ", "")
|
||||
.replaceAll("Longitude: ", "");
|
||||
print("My Location is this: $myLocation");
|
||||
return MihBusinessProfilePreview(
|
||||
business: widget.business,
|
||||
myLocation: myLocation,
|
||||
);
|
||||
return widget.business != null
|
||||
? MihBusinessProfilePreview(
|
||||
business: widget.business!,
|
||||
myLocation: myLocation,
|
||||
)
|
||||
: Text("NoBusiness Data");
|
||||
}
|
||||
}),
|
||||
// const SizedBox(height: 10),
|
||||
|
||||
Reference in New Issue
Block a user