show install MIH only for Web

This commit is contained in:
2025-04-11 11:54:13 +02:00
parent 16cfb7259b
commit 5e4430292f
2 changed files with 54 additions and 49 deletions

View File

@@ -239,33 +239,36 @@ class _RegisterState extends State<Register> {
}); });
} }
MIHAction getSecondaryActionButton() { Widget getSecondaryActionButton() {
return MIHAction( return Visibility(
icon: Padding( visible: MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web",
padding: const EdgeInsets.all(10.0), child: MIHAction(
child: SizedBox( icon: Padding(
width: 150, padding: const EdgeInsets.all(10.0),
child: MIHButton( child: SizedBox(
onTap: () { width: 150,
Navigator.of(context).pushNamed( child: MIHButton(
'/about', onTap: () {
arguments: 0, Navigator.of(context).pushNamed(
); '/about',
}, arguments: 0,
buttonText: "Install MIH", );
buttonColor: },
MzanziInnovationHub.of(context)!.theme.secondaryColor(), buttonText: "Install MIH",
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
), ),
), ),
iconSize: 35,
onTap: () {
Navigator.of(context).pushNamed(
'/about',
arguments: 0,
);
},
), ),
iconSize: 35,
onTap: () {
Navigator.of(context).pushNamed(
'/about',
arguments: 0,
);
},
); );
} }

View File

@@ -1,5 +1,4 @@
import 'dart:convert'; import 'dart:convert';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -287,33 +286,36 @@ class _SignInState extends State<SignIn> {
); );
} }
MIHAction getSecondaryActionButton() { Widget getSecondaryActionButton() {
return MIHAction( return Visibility(
icon: Padding( visible: MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web",
padding: const EdgeInsets.all(10.0), child: MIHAction(
child: SizedBox( icon: Padding(
width: 150, padding: const EdgeInsets.all(10.0),
child: MIHButton( child: SizedBox(
onTap: () { width: 150,
Navigator.of(context).pushNamed( child: MIHButton(
'/about', onTap: () {
arguments: 0, Navigator.of(context).pushNamed(
); '/about',
}, arguments: 0,
buttonText: "Install MIH", );
buttonColor: },
MzanziInnovationHub.of(context)!.theme.secondaryColor(), buttonText: "Install MIH",
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), buttonColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
),
), ),
), ),
iconSize: 35,
onTap: () {
Navigator.of(context).pushNamed(
'/about',
arguments: 0,
);
},
), ),
iconSize: 35,
onTap: () {
Navigator.of(context).pushNamed(
'/about',
arguments: 0,
);
},
); );
} }