home tile press and hold color change
This commit is contained in:
@@ -106,29 +106,60 @@ class _MIHTileState extends State<MIHTile> {
|
|||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Material(
|
AnimatedContainer(
|
||||||
color: mainC,
|
width: 250,
|
||||||
borderRadius: BorderRadius.circular(80),
|
height: 250,
|
||||||
child: Ink(
|
duration: const Duration(seconds: 2),
|
||||||
padding: const EdgeInsets.all(20),
|
child: Material(
|
||||||
|
color: mainC,
|
||||||
|
elevation: 10,
|
||||||
|
borderRadius: BorderRadius.circular(80),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
borderRadius: BorderRadius.circular(80),
|
||||||
|
// ho
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
child: SizedBox(
|
// hoverDuration: ,
|
||||||
height: 200,
|
splashColor:
|
||||||
width: 200,
|
MzanziInnovationHub.of(context)!.theme.highlightColor(),
|
||||||
child: widget.tileIcon,
|
highlightColor:
|
||||||
),
|
MzanziInnovationHub.of(context)!.theme.highlightColor(),
|
||||||
|
child: widget.tileIcon,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// Material(
|
||||||
|
// color: mainC,
|
||||||
|
// borderRadius: BorderRadius.circular(80),
|
||||||
|
// child: Ink(
|
||||||
|
// // width: 200,
|
||||||
|
// // height: 200,
|
||||||
|
// padding: const EdgeInsets.all(20),
|
||||||
|
// child: InkWell(
|
||||||
|
// onTap: widget.onTap,
|
||||||
|
// hoverDuration: Duration(seconds: 2),
|
||||||
|
// highlightColor:
|
||||||
|
// MzanziInnovationHub.of(context)!.theme.messageTextColor(),
|
||||||
|
// child: SizedBox(
|
||||||
|
// height: 200,
|
||||||
|
// width: 200,
|
||||||
|
// child: widget.tileIcon,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text(
|
SizedBox(
|
||||||
widget.tileName,
|
width: 300,
|
||||||
textAlign: TextAlign.center,
|
child: Text(
|
||||||
style: TextStyle(
|
widget.tileName,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
textAlign: TextAlign.center,
|
||||||
fontSize: 40.0,
|
softWrap: true,
|
||||||
fontWeight: FontWeight.bold,
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: 40.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -124,7 +124,10 @@ class _MIHHomeState extends State<MIHHome> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
tileName: "Mzansi Profile",
|
tileName: "Mzansi Profile",
|
||||||
tileIcon: Image(image: logo),
|
tileIcon: Padding(
|
||||||
|
padding: const EdgeInsets.all(25.0),
|
||||||
|
child: Image(image: logo),
|
||||||
|
),
|
||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -131,6 +131,14 @@ class MyTheme {
|
|||||||
return Color(_errColor);
|
return Color(_errColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Color highlightColor() {
|
||||||
|
if (mode == "Dark") {
|
||||||
|
return const Color(0XFF9bc7fa);
|
||||||
|
} else {
|
||||||
|
return const Color(0XFF354866);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Color successColor() {
|
Color successColor() {
|
||||||
return Color(_succColor);
|
return Color(_succColor);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user