Update profile link and business card Icons alignment
This commit is contained in:
@@ -186,7 +186,7 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
return Consumer2<MzansiProfileProvider, MzansiDirectoryProvider>(
|
||||
builder: (BuildContext context, MzansiProfileProvider profileProvider,
|
||||
MzansiDirectoryProvider directoryProvider, Widget? child) {
|
||||
double iconSize = 33.0;
|
||||
double iconSize = 50.0;
|
||||
return Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
runSpacing: 10,
|
||||
@@ -194,10 +194,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
_makePhoneCall(widget.business.contact_no);
|
||||
},
|
||||
@@ -206,12 +205,10 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
child: Icon(
|
||||
Icons.phone,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
child: Text(
|
||||
@@ -229,10 +226,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
_launchEmail(
|
||||
widget.business.bus_email,
|
||||
@@ -245,12 +241,10 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
child: Icon(
|
||||
Icons.email,
|
||||
color: MihColors.getPrimaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
child: Text(
|
||||
@@ -269,10 +263,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
if (isValidGps(widget.business.gps_location))
|
||||
Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
final latitude = double.parse(
|
||||
widget.business.gps_location.split(',')[0]);
|
||||
@@ -284,8 +277,7 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
);
|
||||
},
|
||||
buttonColor: MihColors.getOrangeColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
child: Icon(
|
||||
Icons.location_on,
|
||||
color: MihColors.getPrimaryColor(
|
||||
@@ -294,7 +286,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
child: Text(
|
||||
@@ -314,16 +305,14 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
widget.business.website != "")
|
||||
Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
_launchWebsite(widget.business.website);
|
||||
},
|
||||
buttonColor: MihColors.getRedColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
"Dark"),
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
child: Icon(
|
||||
Icons.language,
|
||||
color: MihColors.getPrimaryColor(
|
||||
@@ -332,7 +321,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
child: Text(
|
||||
@@ -354,10 +342,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {},
|
||||
buttonColor: MihColors.getGreyColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
@@ -369,7 +356,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
"Dark"),
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
).redacted(context: context, redact: true),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
@@ -396,10 +382,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
}
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
businessReviewRatingWindow(directoryProvider,
|
||||
businessReview, true, widget.width);
|
||||
@@ -415,7 +400,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
child: Text(
|
||||
@@ -440,10 +424,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
if (asyncSnapshot.connectionState == ConnectionState.waiting) {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {},
|
||||
buttonColor: MihColors.getGreyColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
||||
@@ -455,7 +438,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
"Dark"),
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
).redacted(context: context, redact: true),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
@@ -482,10 +464,9 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
}
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
child: MihButton(
|
||||
onPressed: () {
|
||||
if (bookmarkBusiness == null) {
|
||||
showAddBookmarkAlert();
|
||||
@@ -506,7 +487,6 @@ class _MihBusinessCardV2State extends State<MihBusinessCardV2> {
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
FittedBox(
|
||||
child: Text(
|
||||
|
||||
@@ -10,12 +10,10 @@ import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class MihProfileLinks extends StatefulWidget {
|
||||
final List<ProfileLink> links;
|
||||
final double? buttonSize;
|
||||
final bool? paddingOn;
|
||||
const MihProfileLinks({
|
||||
super.key,
|
||||
required this.links,
|
||||
this.buttonSize,
|
||||
this.paddingOn,
|
||||
});
|
||||
|
||||
@@ -83,6 +81,8 @@ class _MihProfileLinksState extends State<MihProfileLinks> {
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark");
|
||||
}
|
||||
return MihButton(
|
||||
width: 80,
|
||||
height: 80,
|
||||
onPressed: () {
|
||||
launchSocialUrl(Uri.parse(link.web_link));
|
||||
},
|
||||
@@ -90,7 +90,7 @@ class _MihProfileLinksState extends State<MihProfileLinks> {
|
||||
child: FaIcon(
|
||||
iconData,
|
||||
color: iconColor,
|
||||
size: 33,
|
||||
size: 40,
|
||||
),
|
||||
);
|
||||
// return MihPackageTile(
|
||||
@@ -148,11 +148,7 @@ class _MihProfileLinksState extends State<MihProfileLinks> {
|
||||
spacing: 10,
|
||||
children: widget.links.map(
|
||||
(link) {
|
||||
return SizedBox(
|
||||
width: widget.buttonSize ?? 80,
|
||||
height: widget.buttonSize ?? 80,
|
||||
child: displayLinkButton(link),
|
||||
);
|
||||
return displayLinkButton(link);
|
||||
},
|
||||
).toList(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user