Remove Ask Mzansi when new user or business
This commit is contained in:
@@ -230,29 +230,33 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// const SizedBox(height: 20),
|
// const SizedBox(height: 20),
|
||||||
Padding(
|
Visibility(
|
||||||
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
visible: !widget.isBusinessUserNew,
|
||||||
child: MihSearchBar(
|
child: Padding(
|
||||||
controller: searchController,
|
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
||||||
hintText: "Ask Mzansi",
|
child: MihSearchBar(
|
||||||
prefixIcon: Icons.search,
|
controller: searchController,
|
||||||
prefixAltIcon: MihIcons.mzansiAi,
|
hintText: "Ask Mzansi",
|
||||||
fillColor:
|
prefixIcon: Icons.search,
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
prefixAltIcon: MihIcons.mzansiAi,
|
||||||
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
fillColor:
|
||||||
onPrefixIconTap: () {
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
Navigator.of(context).pushNamed(
|
hintColor:
|
||||||
'/mzansi-ai',
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
arguments: MzansiAiArguments(
|
onPrefixIconTap: () {
|
||||||
widget.signedInUser,
|
Navigator.of(context).pushNamed(
|
||||||
searchController.text.isEmpty
|
'/mzansi-ai',
|
||||||
? null
|
arguments: MzansiAiArguments(
|
||||||
: searchController.text,
|
widget.signedInUser,
|
||||||
),
|
searchController.text.isEmpty
|
||||||
);
|
? null
|
||||||
searchController.clear();
|
: searchController.text,
|
||||||
},
|
),
|
||||||
searchFocusNode: _searchFocusNode,
|
);
|
||||||
|
searchController.clear();
|
||||||
|
},
|
||||||
|
searchFocusNode: _searchFocusNode,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|||||||
@@ -281,29 +281,33 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// const SizedBox(height: 20),
|
// const SizedBox(height: 20),
|
||||||
Padding(
|
Visibility(
|
||||||
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
visible: !widget.isUserNew,
|
||||||
child: MihSearchBar(
|
child: Padding(
|
||||||
controller: searchController,
|
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
||||||
hintText: "Ask Mzansi",
|
child: MihSearchBar(
|
||||||
prefixIcon: Icons.search,
|
controller: searchController,
|
||||||
prefixAltIcon: MihIcons.mzansiAi,
|
hintText: "Ask Mzansi",
|
||||||
fillColor:
|
prefixIcon: Icons.search,
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
prefixAltIcon: MihIcons.mzansiAi,
|
||||||
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
fillColor:
|
||||||
onPrefixIconTap: () {
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
Navigator.of(context).pushNamed(
|
hintColor:
|
||||||
'/mzansi-ai',
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
arguments: MzansiAiArguments(
|
onPrefixIconTap: () {
|
||||||
widget.signedInUser,
|
Navigator.of(context).pushNamed(
|
||||||
searchController.text.isEmpty
|
'/mzansi-ai',
|
||||||
? null
|
arguments: MzansiAiArguments(
|
||||||
: searchController.text,
|
widget.signedInUser,
|
||||||
),
|
searchController.text.isEmpty
|
||||||
);
|
? null
|
||||||
searchController.clear();
|
: searchController.text,
|
||||||
},
|
),
|
||||||
searchFocusNode: _searchFocusNode,
|
);
|
||||||
|
searchController.clear();
|
||||||
|
},
|
||||||
|
searchFocusNode: _searchFocusNode,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
|||||||
Reference in New Issue
Block a user