Commit 40cfdcd3 authored by GayaniPKarunaratne's avatar GayaniPKarunaratne

Done Card UI

parent 6cae09ef
...@@ -259,18 +259,18 @@ Widget _buildTime(){ ...@@ -259,18 +259,18 @@ Widget _buildTime(){
} , } ,
), ),
RaisedButton( // RaisedButton(
color: Colors.blue, // color: Colors.blue,
child: Text( // child: Text(
'View', // 'View',
style: TextStyle(color: Colors.white, fontSize: 18), // style: TextStyle(color: Colors.white, fontSize: 18),
), // ),
onPressed: () { // onPressed: () {
readData(); // readData();
} , // } ,
), // ),
RaisedButton( RaisedButton(
color: Colors.yellowAccent[700], color: Colors.yellowAccent[700],
......
...@@ -63,13 +63,15 @@ class _HospitalDetailsState extends State<HospitalDetails> { ...@@ -63,13 +63,15 @@ class _HospitalDetailsState extends State<HospitalDetails> {
itemCount: userData == null ? 0 : userData.length, itemCount: userData == null ? 0 : userData.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Card( return Card(
elevation: 8,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
color: Colors.lightGreen[50],
child: Padding( child: Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
CircleAvatar(
//backgroundImage: NetworkImage(userData[index]["hospital_id"]) ,
),
Padding( Padding(
padding: const EdgeInsets.all(12.0), 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"]}", 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> { ...@@ -53,8 +53,8 @@ class _ListPageState extends State<ListPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
child: FutureBuilder( child: FutureBuilder(
future: _data, future: _data,
// ignore: missing_return // ignore: missing_return
builder:(_, snapshot){ builder:(_, snapshot){
...@@ -79,8 +79,8 @@ class _ListPageState extends State<ListPage> { ...@@ -79,8 +79,8 @@ class _ListPageState extends State<ListPage> {
color: Colors.lightGreen[100], color: Colors.lightGreen[100],
child: ListTile( child: ListTile(
leading: Icon(Icons.location_city, size: 40), leading: Icon(Icons.location_city, size: 40),
title: Text(snapshot.data[index].data()["hotelName"]), title: Text(snapshot.data[index].data()["hotelName"],style: TextStyle(fontSize: 20.0,fontWeight: FontWeight.bold),),
subtitle: Text(snapshot.data[index].data()["riskLocation"]), subtitle: Text(snapshot.data[index].data()["riskLocation"],style: TextStyle(fontSize: 16.0),),
onTap: () => navigateToDetail(snapshot.data[index]), onTap: () => navigateToDetail(snapshot.data[index]),
), ),
); );
...@@ -110,9 +110,19 @@ class _DetailPageState extends State<DetailPage> { ...@@ -110,9 +110,19 @@ class _DetailPageState extends State<DetailPage> {
title: Text(widget.riskLocation.data()["hotelName"]), title: Text(widget.riskLocation.data()["hotelName"]),
), ),
body: Container( body: Container(
child: Card(child: ListTile( width: 410,
title: Text(widget.riskLocation.data()["date"]), height: 100,
subtitle: Text(widget.riskLocation.data()["time"]), 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