Commit 40cfdcd3 authored by GayaniPKarunaratne's avatar GayaniPKarunaratne

Done Card UI

parent 6cae09ef
......@@ -259,18 +259,18 @@ Widget _buildTime(){
} ,
),
RaisedButton(
color: Colors.blue,
child: Text(
'View',
style: TextStyle(color: Colors.white, fontSize: 18),
),
onPressed: () {
readData();
} ,
),
// RaisedButton(
// color: Colors.blue,
// child: Text(
// 'View',
// style: TextStyle(color: Colors.white, fontSize: 18),
// ),
// onPressed: () {
// readData();
// } ,
// ),
RaisedButton(
color: Colors.yellowAccent[700],
......
......@@ -63,13 +63,15 @@ class _HospitalDetailsState extends State<HospitalDetails> {
itemCount: userData == null ? 0 : userData.length,
itemBuilder: (BuildContext context, int index) {
return Card(
elevation: 8,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
color: Colors.lightGreen[50],
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
children: <Widget>[
CircleAvatar(
//backgroundImage: NetworkImage(userData[index]["hospital_id"]) ,
),
Padding(
padding: const EdgeInsets.all(12.0),
child: Text("Hospital ID: ${userData[index]["hospital_id"]}\n${userData[index]["hospital"]["name"]}\n${userData[index]["hospital"]["name_si"]}\n\nTotal Patients: ${userData[index]["cumulative_total"]}\nDate/Time: ${userData[index]["created_at"]}",
......
......@@ -53,8 +53,8 @@ class _ListPageState extends State<ListPage> {
@override
Widget build(BuildContext context) {
return Container(
child: FutureBuilder(
future: _data,
// ignore: missing_return
builder:(_, snapshot){
......@@ -79,8 +79,8 @@ class _ListPageState extends State<ListPage> {
color: Colors.lightGreen[100],
child: ListTile(
leading: Icon(Icons.location_city, size: 40),
title: Text(snapshot.data[index].data()["hotelName"]),
subtitle: Text(snapshot.data[index].data()["riskLocation"]),
title: Text(snapshot.data[index].data()["hotelName"],style: TextStyle(fontSize: 20.0,fontWeight: FontWeight.bold),),
subtitle: Text(snapshot.data[index].data()["riskLocation"],style: TextStyle(fontSize: 16.0),),
onTap: () => navigateToDetail(snapshot.data[index]),
),
);
......@@ -110,9 +110,19 @@ class _DetailPageState extends State<DetailPage> {
title: Text(widget.riskLocation.data()["hotelName"]),
),
body: Container(
child: Card(child: ListTile(
title: Text(widget.riskLocation.data()["date"]),
subtitle: Text(widget.riskLocation.data()["time"]),
width: 410,
height: 100,
child: Card(
elevation: 8,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
color: Colors.lightGreen[50],
child: ListTile(
leading: Icon(Icons.timelapse, size: 40),
title: Text("Date : ${widget.riskLocation.data()["date"]}" ,style: TextStyle(fontSize: 20.0,fontWeight: FontWeight.bold),),
subtitle: Text("Time : ${widget.riskLocation.data()["time"]}",style: TextStyle(fontSize: 20.0,fontWeight: FontWeight.bold),),
),
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment