import 'package:flutter/material.dart';
class Info extends StatefulWidget {
@override
_InfoState createState() => _InfoState();
}
class _InfoState extends State
get child => null;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
'COVID COMPANION',
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
letterSpacing: 2.0
),
),
backgroundColor: Colors.indigo[900],
centerTitle: true,
elevation: 0,
),
backgroundColor: Colors.grey[200],
body:
crossAxisCount: 2,
children:
Container(
crossAxisCount: 2,
children:
Container(
child: Card(
mainAxisAlignment: MainAxisAlignment.center,
Image(
Image(
shape:
onPressed:
borderSide: BorderSide(color: Colors.pink.shade200),
padding: EdgeInsets.all(8.0),
'DONTs',
'FAQ',
style:
fontWeight: FontWeight.bold,
),
),
),
)
],
)
),
),
Container(
child: Card(
elevation: 10.0,
child:Column(
mainAxisAlignment: MainAxisAlignment.center,
children:
Image(
image: AssetImage('unnamed1.jpg'),
height:150.0,
width: 200.0,
fit:BoxFit.cover,
shape:
onPressed:
borderSide: BorderSide(color: Colors.pink.shade200),
padding: EdgeInsets.all(8.0),
'FAKE NEWS',
'DOs',
style:
fontWeight: FontWeight.bold,
),
),
),
)
],
)
),
),
Container(
child: Card(
elevation: 10.0,
child:Column(
mainAxisAlignment: MainAxisAlignment.center,
children:
Image(
image: AssetImage('assets/unnamed2.jpg'),
height:150.0,
width: 200.0,
fit:BoxFit.cover,
OutlineButton(
shape: StadiumBorder(),
onPressed: (){},
borderSide: BorderSide(color: Colors.pink.shade200),
splashColor: Colors.pinkAccent[100],
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'DONTs',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
)
],
)
),
),
Container(
child: Card(
elevation: 10.0,
child:Column(
mainAxisAlignment: MainAxisAlignment.center,
children:
Image(
image: AssetImage('assets/undraw_Notify_re_65on.jpg'),
height:150.0,
width: 200.0,
fit:BoxFit.cover,
),
SizedBox(height:5.0 ,),
OutlineButton(
shape: StadiumBorder(),
onPressed: (){},
borderSide: BorderSide(color: Colors.pink.shade200),
splashColor: Colors.pinkAccent[100],
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'FAKE NEWS',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
)
],
)
),
),
),
SizedBox(height: 20.0),
Symptoms(),
SizedBox(height: 20.0),
preventions(),
],
),
);
}
// ignore: non_constant_identifier_names
Widget Symptoms() {
return Material(
color: Colors.white,
elevation: 14.0,
shadowColor: Color(0x802196F3),
child: Column(
children:
Padding(
padding: EdgeInsets.all(8.0),
child: labelContainer('SYMPTOMS'),
),
Padding(
padding: EdgeInsets.all(8.0),
child: listofsymptoms(),
),
],
),
);
}
Widget labelContainer(String labelVal) {
return Container(
height: 30.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children:
Text(
labelVal,
style: TextStyle(fontWeight: FontWeight.bold,fontSize: 20.0),
),
Text(
'MORE',
style: TextStyle(color: Colors.indigo[900],fontWeight: FontWeight.bold,fontSize: 18.0),
),
],
),
);
}
Widget listofsymptoms() {
return Container(
height: 160.0,
child: ListView(
scrollDirection: Axis.horizontal,
children:
imageSection(
'assets/symp1.png',
'HIGH FEVER/HEADACHE'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/symp2.png',
'MUSCLE PAIN'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/symp3.png',
'SUDDEN LOSS OF TASTE/SMELL'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/symp4.png',
' COUGH'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/symp5.png',
'SORE THROAT'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/symp6.png',
'DIFFICULTY IN BREATHING'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/symp7.png',
'CHILLS'),
],
));
}
Widget imageSection(String imageVal, String appVal) {
return Column(
children:
Container(
height: 100.0,
width: 100.0,
decoration: new BoxDecoration(
image: DecorationImage(
image: new NetworkImage(imageVal),
fit: BoxFit.fill,
),
borderRadius: BorderRadius.circular(20.0),
),
height: 10.0,
),
Text(
appVal,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.bold, fontSize: 16.0),
),
SizedBox(
height: 10.0,
),
],
);
}
Widget preventions() {
return Material(
color: Colors.white,
elevation: 14.0,
shadowColor: Color(0x802196F3),
child: Column(
children:
Padding(
padding: EdgeInsets.all(8.0),
child: labelContainer('Preventions'),
),
Padding(
padding: EdgeInsets.all(8.0),
child: listofpreventions(),
),
],
),
);
}
Widget listofpreventions() {
return Container(
height: 160.0,
child: ListView(
scrollDirection: Axis.horizontal,
children:
imageSection(
'assets/prev1.jpg',
'WEAR A MASK'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/prev2.jpg',
'WASH HANDS/SANITISE HANDS'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/prev3.jpg',
'AVOID CONTACTS WITH OTHERS'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/prev4.jpg',
'COVER YOUR COUGH OR SNEEZE'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/prev5.jpg',
'STAY HOME'),
SizedBox(
width: 20.0,
),
imageSection(
'assets/prev6.jpg',
'DONT TRAVEL'),
],
));
}