home.dart 2.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';

class Home extends StatefulWidget {
  const Home({
    Key key,
    @required this.user
  }) : super(key: key);

  final FirebaseUser user;
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
18 19 20 21 22 23 24 25 26 27 28 29 30 31
    final body = Container(
        child:Image.asset('assets/post_a_problem.jpg'),
        width: MediaQuery
        .of(context)
        .size
        .width,
        padding: EdgeInsets.all(28.0),
    decoration: BoxDecoration(
    gradient: LinearGradient(colors: [
    Colors.white,
    Colors.white,
    ]),
    ),
    );
32
    return Scaffold(
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
    appBar: AppBar(title: Text("Home"),
    ),
    body: body,


    drawer: Drawer(
    // Add a ListView to the drawer. This ensures the user can scroll
    // through the options in the Drawer if there isn't enough vertical
    // space to fit everything.
    child: ListView(
    // Important: Remove any padding from the ListView.
    padding: EdgeInsets.zero,
    children: <Widget>[
    DrawerHeader(
    child: Text('Drawer Header'),
    decoration: BoxDecoration(
    color: Colors.blue,
    ),
    ),
    ListTile(
    title: Text('My Profile'),
    onTap: () {
    // Update the state of the app
    // ...
    // Then close the drawer
    Navigator.pop(context);
    },
    ),
    ListTile(
    title: Text('My Problems'),
    onTap: () {
    // Update the state of the app
    // ...
    // Then close the drawer
    Navigator.pop(context);
    },
    ),
    ListTile(
    title: Text('Resolved Problems'),
    onTap: () {
    // Update the state of the app
    // ...
    // Then close the drawer
    Navigator.pop(context);
    },
    ),
    ListTile(
    title: Text('Unresolved Problems'),
    onTap: () {
    // Update the state of the app
    // ...
    // Then close the drawer
    Navigator.pop(context);
    },
    ),
    ListTile(
    title: Text('Feedback'),
    onTap: () {
    // Update the state of the app
    // ...
    // Then close the drawer
    Navigator.pop(context);
    },
    ),
    ListTile(
    title: Text('Logout'),
    onTap: () {
    // Update the state of the app
    // ...
    // Then close the drawer
      
    Navigator.pop(context);
    },
    ),
    ],
    ),
    ),

111 112
    );
  }
113

114
}