Facebook
From Sahil Pandey, 4 Years ago, written in Plain Text.
This paste is a reply to starting info from Sahil Pandey - view diff
Embed
Download Paste or View Raw
Hits: 183
  1.  
  2. import 'package:flutter/material.dart';
  3. class Do extends StatefulWidget {
  4.   @override
  5.   _DoState createState() => _DoState();
  6. }
  7.  
  8. class _DoState extends State<Do> {
  9.   @override
  10.   Widget build(BuildContext context) {
  11.     return Scaffold(
  12.       appBar: AppBar(
  13.         title: Text(
  14.           'DOs',
  15.           style: TextStyle(
  16.               fontSize: 20.0,
  17.               fontWeight: FontWeight.bold,
  18.               letterSpacing: 2.0
  19.           ),
  20.         ),
  21.         backgroundColor: Colors.indigoAccent[100],
  22.         centerTitle: true,
  23.         elevation: 0,
  24.       ),
  25.       backgroundColor: Colors.grey[200],
  26.       body:
  27.       GridView.count(
  28.         shrinkWrap: true,
  29.         crossAxisCount: 2,
  30.         children: <Widget>[
  31.           Container(
  32.             child: Card(
  33.                 elevation: 10.0,
  34.                 child:Column(
  35.                   mainAxisAlignment: MainAxisAlignment.center,
  36.                   children: <Widget>[
  37.                     Image(
  38.                       image: AssetImage('assets/do1.jpg'),
  39.                       height:100.0,
  40.                       width: 200.0,
  41.                       fit: BoxFit.cover,
  42.                     ),
  43.                     SizedBox(height:5.0),
  44.                     Text(
  45.                       'Frequently Wash Your Hands With Soap And Water Or Always Sanitize Your Hands',
  46.                       style:TextStyle(
  47.                         fontSize: 20.0,
  48.                         color: Colors.indigo[700],
  49.                       ),
  50.                     ),
  51.                   ],
  52.                 )
  53.             ),
  54.           ),
  55.           Container(
  56.             child: Card(
  57.               elevation: 10.0,
  58.               child:Column(
  59.                 mainAxisAlignment: MainAxisAlignment.center,
  60.                 children: <Widget>[
  61.                   Image(
  62.                     image: AssetImage('assets/do2.jpg'),
  63.                     height:100.0,
  64.                     width: 200.0,
  65.                     fit: BoxFit.cover,
  66.                   ),
  67.                   SizedBox(height:5.0),
  68.                   Text(
  69.                     'Do Wear Mask And Gloves Before Going Out ',
  70.                     style:TextStyle(
  71.                       fontSize: 20.0,
  72.                       color: Colors.indigo[700],
  73.                     ),
  74.                   ),
  75.                 ],
  76.               ),
  77.             ),
  78.           ),
  79.  
  80.           Container(
  81.             child: Card(
  82.               elevation: 10.0,
  83.               child:Column(
  84.                 mainAxisAlignment: MainAxisAlignment.center,
  85.                 children: <Widget>[
  86.                   Image(
  87.                     image: AssetImage('assets/do3.jpg'),
  88.                     height:100.0,
  89.                     width: 200.0,
  90.                     fit: BoxFit.cover,
  91.                   ),
  92.                   SizedBox(height:5.0),
  93.                   Text(
  94.                     'Eat Nutritious Food And Drinks Lots Of Water',
  95.                     style:TextStyle(
  96.                       fontSize: 20.0,
  97.                       color: Colors.indigo[700],
  98.                     ),
  99.                   ),
  100.                 ],
  101.               ),
  102.             ),
  103.           ),
  104.  
  105.           Container(
  106.             child: Card(
  107.               elevation: 10.0,
  108.               child:Column(
  109.                 mainAxisAlignment: MainAxisAlignment.center,
  110.                 children: <Widget>[
  111.                   Image(
  112.                     image: AssetImage('assets/do4.jpg'),
  113.                     height:100.0,
  114.                     width: 200.0,
  115.                     fit: BoxFit.cover,
  116.                   ),
  117.                   SizedBox(height:5.0),
  118.                   Text(
  119.                     'Maintain Social Distancing Always',
  120.                     style:TextStyle(
  121.                       fontSize: 20.0,
  122.                       color: Colors.indigo[700],
  123.                     ),
  124.                   ),
  125.                 ],
  126.               ),
  127.             ),
  128.           ),
  129.  
  130.           Container(
  131.             child: Card(
  132.               elevation: 10.0,
  133.               child:Column(
  134.                 mainAxisAlignment: MainAxisAlignment.center,
  135.                 children: <Widget>[
  136.                   Image(
  137.                     image: AssetImage('assets/do5.jpg'),
  138.                     height:100.0,
  139.                     width: 200.0,
  140.                     fit: BoxFit.cover,
  141.                   ),
  142.                   SizedBox(height:5.0),
  143.                   Text(
  144.                     'Cover Your Mouth While Coughing Or Sneezing',
  145.                     style:TextStyle(
  146.                       fontSize: 20.0,
  147.                       color: Colors.indigo[700],
  148.                     ),
  149.                   ),
  150.                 ],
  151.               ),
  152.             ),
  153.           ),
  154.  
  155.           Container(
  156.             child: Card(
  157.               elevation: 10.0,
  158.               child:Column(
  159.                 crossAxisAlignment:CrossAxisAlignment.start,
  160.                 children: <Widget>[
  161.                   Image(
  162.                     image: AssetImage('assets/do6.jpg'),
  163.                     height:100.0,
  164.                     width: 200.0,
  165.                     fit: BoxFit.cover,
  166.                   ),
  167.                   SizedBox(height:5.0),
  168.                   Text(
  169.                     'Quarantine Yourself If You Come In Contact With Covid Positive',
  170.                     style:TextStyle(
  171.                       fontSize: 20.0,
  172.                       color: Colors.indigo[700],
  173.                     ),
  174.                   ),
  175.                 ],
  176.               ),
  177.             ),
  178.           ),
  179.  
  180.           Container(
  181.             child: Card(
  182.               elevation: 10.0,
  183.               child:Column(
  184.                 mainAxisAlignment: MainAxisAlignment.center,
  185.                 children: <Widget>[
  186.                   Image(
  187.                     image: AssetImage('assets/do7.jpg'),
  188.                     height:100.0,
  189.                     width: 200.0,
  190.                     fit: BoxFit.cover,
  191.                   ),
  192.                   SizedBox(height:5.0),
  193.                   Text(
  194.                     'Consult Doctors Immediately If You Are Having Some Symptoms Of COVID',
  195.                     style:TextStyle(
  196.                       fontSize: 20.0,
  197.                       color: Colors.indigo[700],
  198.                     ),
  199.                   ),
  200.                 ],
  201.               ),
  202.             ),
  203.           ),
  204.  
  205.           Container(
  206.             child: Card(
  207.               elevation: 10.0,
  208.               child:Column(
  209.                 mainAxisAlignment: MainAxisAlignment.center,
  210.                 children: <Widget>[
  211.                   Image(
  212.                     image: AssetImage('assets/do8.jpg'),
  213.                     height:100.0,
  214.                     width: 200.0,
  215.                     fit: BoxFit.cover,
  216.                   ),
  217.                   SizedBox(height:5.0),
  218.                   Text(
  219.                     'Boost The Morale of Doctors,Policemen And Others Who Are Working For People In COVID',
  220.                     style:TextStyle(
  221.                       fontSize: 20.0,
  222.                       color: Colors.indigo[700],
  223.                     ),
  224.                   ),
  225.                 ],
  226.               ),
  227.             ),
  228.           ),
  229.  
  230.           Container(
  231.             child: Card(
  232.               elevation: 10.0,
  233.               child:Column(
  234.                 mainAxisAlignment: MainAxisAlignment.center,
  235.                 children: <Widget>[
  236.                   Image(
  237.                     image: AssetImage('assets/do9.jpg'),
  238.                     height:100.0,
  239.                     width: 200.0,
  240.                     fit: BoxFit.cover,
  241.                   ),
  242.                   SizedBox(height:5.0),
  243.                   Text(
  244.                     'Try To Work From Home Unless Any Urgent Work Is Their Outside',
  245.                     style:TextStyle(
  246.                       fontSize: 20.0,
  247.                       color: Colors.indigo[700],
  248.                     ),
  249.                   ),
  250.                 ],
  251.               ),
  252.             ),
  253.           ),
  254.  
  255.           Container(
  256.             child: Card(
  257.               elevation: 10.0,
  258.               child:Column(
  259.                 mainAxisAlignment: MainAxisAlignment.center,
  260.                 children: <Widget>[
  261.                   Image(
  262.                     image: AssetImage('assets/do10.jpg'),
  263.                     height:100.0,
  264.                     width: 200.0,
  265.                     fit: BoxFit.cover,
  266.                   ),
  267.                   SizedBox(height:5.0),
  268.                   Text(
  269.                     'Obey COVID Guidelines ',
  270.                     style:TextStyle(
  271.                       fontSize: 20.0,
  272.                       color: Colors.indigo[700],
  273.                     ),
  274.                   ),
  275.                 ],
  276.               ),
  277.             ),
  278.           ),
  279.  
  280.         ],
  281.       ),
  282.  
  283.     );
  284.   }
  285. }
  286.  
  287.