Updat homeTile to cater for images
This commit is contained in:
@@ -4,7 +4,7 @@ import 'package:patient_manager/main.dart';
|
|||||||
class HomeTile extends StatefulWidget {
|
class HomeTile extends StatefulWidget {
|
||||||
final String tileName;
|
final String tileName;
|
||||||
//final String tileDescription;
|
//final String tileDescription;
|
||||||
final IconData tileIcon;
|
final Widget tileIcon;
|
||||||
final void Function() onTap;
|
final void Function() onTap;
|
||||||
// final Widget tileIcon;
|
// final Widget tileIcon;
|
||||||
final Color p;
|
final Color p;
|
||||||
@@ -100,41 +100,39 @@ class _HomeTileState extends State<HomeTile> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
// print(
|
||||||
padding: const EdgeInsets.all(10.0),
|
// "Tile Name: ${widget.tileName}\nTitle Type: ${widget.tileIcon.runtimeType.toString()}");
|
||||||
child: FittedBox(
|
return FittedBox(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Material(
|
Material(
|
||||||
color: mainC,
|
color: mainC,
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(80),
|
||||||
|
child: Ink(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
borderRadius: BorderRadius.circular(10),
|
child: SizedBox(
|
||||||
//highlightColor: secondC,
|
height: 200,
|
||||||
child: Ink(
|
width: 200,
|
||||||
padding: const EdgeInsets.all(3.0),
|
child: widget.tileIcon,
|
||||||
child: Icon(
|
|
||||||
widget.tileIcon,
|
|
||||||
color: secondC,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 1),
|
),
|
||||||
Text(
|
const SizedBox(height: 10),
|
||||||
widget.tileName,
|
Text(
|
||||||
textAlign: TextAlign.center,
|
widget.tileName,
|
||||||
style: TextStyle(
|
textAlign: TextAlign.center,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
style: TextStyle(
|
||||||
fontSize: 5.0,
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
fontWeight: FontWeight.bold,
|
fontSize: 40.0,
|
||||||
),
|
fontWeight: FontWeight.bold,
|
||||||
)
|
),
|
||||||
],
|
)
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user