initialise qrcode late
This commit is contained in:
@@ -35,8 +35,7 @@ class MihBusinessQrCode extends StatefulWidget {
|
|||||||
class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
||||||
late Future<String> futureImageUrl;
|
late Future<String> futureImageUrl;
|
||||||
PlatformFile? file;
|
PlatformFile? file;
|
||||||
String qrCodedata =
|
late String qrCodedata;
|
||||||
"${AppEnviroment.baseAppUrl}/business-profile/view?business_id=";
|
|
||||||
int qrSize = 500;
|
int qrSize = 500;
|
||||||
bool _isUserSignedIn = false;
|
bool _isUserSignedIn = false;
|
||||||
|
|
||||||
@@ -146,6 +145,8 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
|||||||
_checkUserSession();
|
_checkUserSession();
|
||||||
futureImageUrl =
|
futureImageUrl =
|
||||||
MihFileApi.getMinioFileUrl(widget.business.logo_path, context);
|
MihFileApi.getMinioFileUrl(widget.business.logo_path, context);
|
||||||
|
qrCodedata =
|
||||||
|
"${AppEnviroment.baseAppUrl}/business-profile/view?business_id=";
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -160,17 +161,15 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
|||||||
|
|
||||||
Widget getBody(Size screenSize, BuildContext context) {
|
Widget getBody(Size screenSize, BuildContext context) {
|
||||||
double profilePictureWidth = 150;
|
double profilePictureWidth = 150;
|
||||||
return SizedBox(
|
return Stack(
|
||||||
height: screenSize.height,
|
|
||||||
child: Stack(
|
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 15.0),
|
padding: const EdgeInsets.symmetric(horizontal: 15.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: MzansiInnovationHub.of(context)!.theme.screenType ==
|
padding:
|
||||||
"desktop"
|
MzansiInnovationHub.of(context)!.theme.screenType == "desktop"
|
||||||
? EdgeInsets.symmetric(horizontal: screenSize.width * 0.2)
|
? EdgeInsets.symmetric(horizontal: screenSize.width * 0.2)
|
||||||
: EdgeInsets.symmetric(
|
: EdgeInsets.symmetric(
|
||||||
horizontal: screenSize.width * 0), //.075),
|
horizontal: screenSize.width * 0), //.075),
|
||||||
@@ -178,8 +177,7 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
|||||||
padding: const EdgeInsets.only(top: 10.0),
|
padding: const EdgeInsets.only(top: 10.0),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: MihColors.getSecondaryColor(
|
color: MihColors.getSecondaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark")
|
||||||
"Dark")
|
|
||||||
.withValues(alpha: 0.6),
|
.withValues(alpha: 0.6),
|
||||||
borderRadius: BorderRadius.circular(25),
|
borderRadius: BorderRadius.circular(25),
|
||||||
elevation: 10,
|
elevation: 10,
|
||||||
@@ -322,16 +320,14 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
|||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.download_rounded,
|
Icons.download_rounded,
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
"Dark"),
|
|
||||||
),
|
),
|
||||||
label: "Download QR Code",
|
label: "Download QR Code",
|
||||||
labelBackgroundColor: MihColors.getGreenColor(
|
labelBackgroundColor: MihColors.getGreenColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
"Dark"),
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
backgroundColor: MihColors.getGreenColor(
|
backgroundColor: MihColors.getGreenColor(
|
||||||
@@ -343,7 +339,6 @@ class _MihBusinessQrCodeState extends State<MihBusinessQrCode> {
|
|||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user