Compare commits
2 Commits
74341a9cc6
...
f137ea41ac
| Author | SHA1 | Date | |
|---|---|---|---|
| f137ea41ac | |||
| a7effa3576 |
@@ -186,7 +186,7 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
return Consumer2<MzansiProfileProvider, MzansiDirectoryProvider>(
|
return Consumer2<MzansiProfileProvider, MzansiDirectoryProvider>(
|
||||||
builder: (BuildContext context, MzansiProfileProvider profileProvider,
|
builder: (BuildContext context, MzansiProfileProvider profileProvider,
|
||||||
MzansiDirectoryProvider directoryProvider, Widget? child) {
|
MzansiDirectoryProvider directoryProvider, Widget? child) {
|
||||||
double iconSize = 33.0;
|
double iconSize = 50.0;
|
||||||
return Wrap(
|
return Wrap(
|
||||||
alignment: WrapAlignment.center,
|
alignment: WrapAlignment.center,
|
||||||
runSpacing: 10,
|
runSpacing: 10,
|
||||||
@@ -194,10 +194,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_makePhoneCall(widget.business.contact_no);
|
_makePhoneCall(widget.business.contact_no);
|
||||||
},
|
},
|
||||||
@@ -206,12 +205,10 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.phone,
|
Icons.phone,
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
"Dark"),
|
|
||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -229,10 +226,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_launchEmail(
|
_launchEmail(
|
||||||
widget.business.bus_email,
|
widget.business.bus_email,
|
||||||
@@ -245,12 +241,10 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
"Dark"),
|
|
||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -269,10 +263,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
if (isValidGps(widget.business.gps_location))
|
if (isValidGps(widget.business.gps_location))
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
final latitude = double.parse(
|
final latitude = double.parse(
|
||||||
widget.business.gps_location.split(',')[0]);
|
widget.business.gps_location.split(',')[0]);
|
||||||
@@ -284,8 +277,7 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
buttonColor: MihColors.getOrangeColor(
|
buttonColor: MihColors.getOrangeColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
"Dark"),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.location_on,
|
Icons.location_on,
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
@@ -294,7 +286,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -314,16 +305,14 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
widget.business.website != "")
|
widget.business.website != "")
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_launchWebsite(widget.business.website);
|
_launchWebsite(widget.business.website);
|
||||||
},
|
},
|
||||||
buttonColor: MihColors.getRedColor(
|
buttonColor: MihColors.getRedColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
"Dark"),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.language,
|
Icons.language,
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
@@ -332,7 +321,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -354,10 +342,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
buttonColor: MihColors.getGreyColor(
|
buttonColor: MihColors.getGreyColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
@@ -369,7 +356,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
"Dark"),
|
"Dark"),
|
||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
).redacted(context: context, redact: true),
|
).redacted(context: context, redact: true),
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
@@ -382,8 +368,8 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
"Dark"),
|
"Dark"),
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
).redacted(context: context, redact: true),
|
).redacted(context: context, redact: true),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -396,10 +382,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
}
|
}
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
businessReviewRatingWindow(directoryProvider,
|
businessReviewRatingWindow(directoryProvider,
|
||||||
businessReview, true, widget.width);
|
businessReview, true, widget.width);
|
||||||
@@ -415,7 +400,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -440,10 +424,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
buttonColor: MihColors.getGreyColor(
|
buttonColor: MihColors.getGreyColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
@@ -455,7 +438,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
"Dark"),
|
"Dark"),
|
||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
).redacted(context: context, redact: true),
|
).redacted(context: context, redact: true),
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
@@ -468,8 +450,8 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
"Dark"),
|
"Dark"),
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
).redacted(context: context, redact: true),
|
).redacted(context: context, redact: true),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -482,10 +464,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
}
|
}
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
MihButton(
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (bookmarkBusiness == null) {
|
if (bookmarkBusiness == null) {
|
||||||
showAddBookmarkAlert();
|
showAddBookmarkAlert();
|
||||||
@@ -506,7 +487,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
|||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
FittedBox(
|
FittedBox(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ class _MihloadingcircleState extends State<Mihloadingcircle>
|
|||||||
late AnimationController _controller;
|
late AnimationController _controller;
|
||||||
late Animation<double> _animation;
|
late Animation<double> _animation;
|
||||||
|
|
||||||
late double width;
|
|
||||||
late double height;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@@ -82,16 +79,15 @@ class _MihloadingcircleState extends State<Mihloadingcircle>
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
widget.message != null
|
if (widget.message != null)
|
||||||
? Text(
|
Text(
|
||||||
widget.message!,
|
widget.message!,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
: SizedBox(),
|
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -10,12 +10,10 @@ import 'package:url_launcher/url_launcher.dart';
|
|||||||
|
|
||||||
class MihProfileLinks extends StatefulWidget {
|
class MihProfileLinks extends StatefulWidget {
|
||||||
final List<ProfileLink> links;
|
final List<ProfileLink> links;
|
||||||
final double? buttonSize;
|
|
||||||
final bool? paddingOn;
|
final bool? paddingOn;
|
||||||
const MihProfileLinks({
|
const MihProfileLinks({
|
||||||
super.key,
|
super.key,
|
||||||
required this.links,
|
required this.links,
|
||||||
this.buttonSize,
|
|
||||||
this.paddingOn,
|
this.paddingOn,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -83,6 +81,8 @@ class _MihProfileLinksState extends State<MihProfileLinks> {
|
|||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
|
||||||
}
|
}
|
||||||
return MihButton(
|
return MihButton(
|
||||||
|
width: 80,
|
||||||
|
height: 80,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
launchSocialUrl(Uri.parse(link.web_link));
|
launchSocialUrl(Uri.parse(link.web_link));
|
||||||
},
|
},
|
||||||
@@ -90,7 +90,7 @@ class _MihProfileLinksState extends State<MihProfileLinks> {
|
|||||||
child: FaIcon(
|
child: FaIcon(
|
||||||
iconData,
|
iconData,
|
||||||
color: iconColor,
|
color: iconColor,
|
||||||
size: 33,
|
size: 40,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// return MihPackageTile(
|
// return MihPackageTile(
|
||||||
@@ -148,11 +148,7 @@ class _MihProfileLinksState extends State<MihProfileLinks> {
|
|||||||
spacing: 10,
|
spacing: 10,
|
||||||
children: widget.links.map(
|
children: widget.links.map(
|
||||||
(link) {
|
(link) {
|
||||||
return SizedBox(
|
return displayLinkButton(link);
|
||||||
width: widget.buttonSize ?? 80,
|
|
||||||
height: widget.buttonSize ?? 80,
|
|
||||||
child: displayLinkButton(link),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
).toList(),
|
).toList(),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -298,7 +298,9 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
|||||||
height: 300,
|
height: 300,
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: getQrCodeData(qrSize.toInt()),
|
imageUrl: getQrCodeData(qrSize.toInt()),
|
||||||
placeholder: (context, url) => const Mihloadingcircle(),
|
placeholder: (context, url) => FittedBox(
|
||||||
|
child: const Mihloadingcircle(),
|
||||||
|
),
|
||||||
errorWidget: (context, url, error) =>
|
errorWidget: (context, url, error) =>
|
||||||
const Icon(Icons.error),
|
const Icon(Icons.error),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user