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