Flutter web App home page, App Bar, Tile Grid & Tiles added

This commit is contained in:
2024-03-24 15:01:28 +02:00
parent 2242faef8a
commit e877072c7d
46 changed files with 166 additions and 23 deletions

View File

@@ -0,0 +1,48 @@
import 'package:flutter/material.dart';
class HomeTile extends StatelessWidget {
final String tileName;
final String tileDescription;
final void Function() onTap;
// final Widget tileIcon;
const HomeTile({
super.key,
required this.onTap,
required this.tileName,
required this.tileDescription,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Card(
child: Column(
//mainAxisSize: MainAxisSize.min,
children: [
ListTile(
leading: const Icon(Icons.abc),
title: Text(
tileName,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
subtitle: Text(tileDescription),
),
const Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Icon(Icons.arrow_forward),
),
],
)
],
),
),
);
}
}

View File

@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:patient_manager/components/homeTile.dart';
class HomeTileGrid extends StatelessWidget {
void navigateToPage() {}
const HomeTileGrid({super.key});
@override
Widget build(BuildContext context) {
return Center(
child: SizedBox(
width: 1000,
child: GridView.count(
padding: const EdgeInsets.all(20),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: MediaQuery.of(context).size.width / 600,
crossAxisCount: 3,
children: [
HomeTile(
onTap: navigateToPage,
tileName: "Patient Manager",
tileDescription:
"This is a digital solution for doctors Offices to manage their patients",
),
HomeTile(
onTap: navigateToPage,
tileName: "Patient Manager",
tileDescription:
"This is a digital solution for doctors Offices to manage their patients",
),
HomeTile(
onTap: navigateToPage,
tileName: "Patient Manager",
tileDescription:
"This is a digital solution for doctors Offices to manage their patients",
),
],
),
),
);
}
}

View File

@@ -0,0 +1,24 @@
import 'package:flutter/material.dart';
class MyAppBar extends StatelessWidget {
final String barTitle;
const MyAppBar({super.key, required this.barTitle});
@override
Widget build(BuildContext context) {
return AppBar(
backgroundColor: Colors.blueAccent,
elevation: 8,
shadowColor: Colors.black,
title: Text(
barTitle,
style: const TextStyle(
fontWeight: FontWeight.normal,
color: Colors.black,
),
),
centerTitle: true,
);
}
}

View File

@@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
class MyAppDrawer extends StatefulWidget {
final String drawerTitle;
const MyAppDrawer({super.key, required this.drawerTitle});
@override
State<MyAppDrawer> createState() => _MyAppDrawerState();
}
class _MyAppDrawerState extends State<MyAppDrawer> {
@override
Widget build(BuildContext context) {
return Drawer();
}
}

View File

@@ -11,7 +11,7 @@ class MzanziInnovationHub extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'MyFlutterAp',
title: 'Mzanzi Innovation Hub',
themeMode: ThemeMode.system,
debugShowCheckedModeBanner: false,
initialRoute: '/',

View File

@@ -1,10 +1,20 @@
import 'package:flutter/material.dart';
import 'package:patient_manager/components/homeTileGrid.dart';
import 'package:patient_manager/components/myAppBar.dart';
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
return const Text("Hello World");
return const Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(50),
child: MyAppBar(
barTitle: "Mzanzi Innovation Hub",
),
),
body: HomeTileGrid(),
);
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
database/binlog.000010 Normal file

Binary file not shown.

BIN
database/binlog.000011 Normal file

Binary file not shown.

BIN
database/binlog.000012 Normal file

Binary file not shown.

BIN
database/binlog.000013 Normal file

Binary file not shown.

BIN
database/binlog.000014 Normal file

Binary file not shown.

BIN
database/binlog.000015 Normal file

Binary file not shown.

BIN
database/binlog.000016 Normal file

Binary file not shown.

BIN
database/binlog.000017 Normal file

Binary file not shown.

BIN
database/binlog.000018 Normal file

Binary file not shown.

BIN
database/binlog.000019 Normal file

Binary file not shown.

BIN
database/binlog.000020 Normal file

Binary file not shown.

BIN
database/binlog.000021 Normal file

Binary file not shown.

BIN
database/binlog.000022 Normal file

Binary file not shown.

BIN
database/binlog.000023 Normal file

Binary file not shown.

BIN
database/binlog.000024 Normal file

Binary file not shown.

View File

@@ -1,5 +1,5 @@
4294967294,472
4294967278,292
4294967294,471
4294967278,291
4294967293,131
4294967293,130
4294967293,129
@@ -142,34 +142,35 @@
4243767281,0
4294967293,0
4294967279,29
4294967279,142
4294967279,143
4294967279,144
4294967279,30
4294967279,145
4294967279,30
4294967279,31
4294967279,32
4294967279,146
4294967279,33
4294967279,147
4294967279,146
4294967279,148
4294967279,34
4294967279,149
4294967279,147
4294967279,34
4294967279,35
4294967279,36
4294967279,150
4294967279,37
4294967279,150
4294967279,151
4294967279,152
4294967279,38
4294967279,153
4294967279,38
4294967279,39
4294967279,40
4294967279,154
4294967279,41
4294967279,154
4294967279,155
4294967279,158
4294967279,156
4294967279,42
4294967279,158
4294967279,43
4294967279,157
4294967279,44
@@ -184,8 +185,8 @@
4294967279,163
4294967279,164
4294967279,49
4294967279,50
4294967279,165
4294967279,50
4294967279,51
4294967279,166
4294967279,52
@@ -214,37 +215,36 @@
4294967279,179
4294967279,64
4294967279,180
4294967279,181
4294967279,65
4294967279,182
4294967279,65
4294967279,181
4294967279,66
4294967279,183
4294967279,67
4294967279,184
4294967279,183
4294967279,68
4294967279,185
4294967279,69
4294967279,186
4294967279,70
4294967279,186
4294967279,71
4294967279,187
4294967279,72
4294967279,188
4294967279,72
4294967279,189
4294967279,73
4294967279,190
4294967279,74
4294967279,190
4294967279,75
4294967279,191
4294967279,76
4294967279,192
4294967279,76
4294967279,193
4294967279,77
4294967279,194
4294967279,78
4294967279,194
4294967279,79
4294967279,195
4294967279,80
4294967279,196
4294967279,80
4294967279,197
4294967279,81

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.