Fakultas Ilmu Komputer UI

pencarian.dart 5.6 KB
Newer Older
1
import 'package:flutter/material.dart';
2
import 'package:ppl_disabilitas/config/styles.dart';
3
4
5
6
7
8
9

class Pencarian extends StatefulWidget {
  @override
  PencarianState createState() => PencarianState();
}

class PencarianState extends State<Pencarian> {
10
11
  Icon searchIcon = Icon(Icons.search);
  Widget appBarText = Text("Pencarian Lokasi");
12
13
14
15
16

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
17
        backgroundColor: greenPrimary,
18
        leading: IconButton(
19
20
21
            icon: Icon(Icons.arrow_back_ios, size: 25),
            key: Key("Back Icon Key"),
            onPressed: () => Navigator.pop(context, 'Take me back')),
22
23
24
25
26
27
28
        title: Container(
          margin: EdgeInsets.only(top: doubleSpace, bottom: doubleSpace),
          decoration: BoxDecoration(
              color: Colors.white,
              borderRadius: doubleBorderRadius,
              boxShadow: regularShadow),
          child: TextFormField(
29
30
            key: Key("Text Field Mau Kemana"),
            decoration: InputDecoration(
31
32
33
34
35
36
37
38
                contentPadding: EdgeInsets.all(0),
                isDense: false,
                prefixIcon: Icon(
                  Icons.search,
                  color: greenPrimary,
                  size: 25,
                ),
                border: InputBorder.none,
39
40
                fillColor: Colors.white,
                labelText: 'Kamu mau kemana?',
41
42
43
44
45
                labelStyle: TextStyle(
                    color: greenPrimary,
                    fontSize: 18,
                    fontFamily: 'Muli',
                    fontWeight: FontWeight.w700),
46
                suffixIcon: IconButton(
47
48
49
50
51
52
                    icon: Icon(
                      Icons.mic,
                      color: greenPrimary,
                      size: 25,
                    ),
                    onPressed: () {})),
53
          ),
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
        ),
      ),
      body: ListView(
        padding: const EdgeInsets.all(8),
        children: <Widget>[
          Padding(
            padding: EdgeInsets.only(left: doubleSpace, top: 10),
            child: Text(
              'Hasil Pencarian',
              style: TextStyle(
                fontSize: 15,
                color: Colors.black,
                fontFamily: 'Muli',
              ),
            ),
          ),
          Container(
            height: 90,
            color: Colors.transparent,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
76
                CircleAvatar(
77
                  backgroundColor: greenPrimary,
78
                  child: Text('Test'),
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
                ),
                Padding(
                  padding: EdgeInsets.all(doubleSpace),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      Text(
                        'Margo City',
                        style: TextStyle(
                          fontSize: 18,
                          fontWeight: FontWeight.w800,
                          color: Colors.black,
                          fontFamily: 'Muli',
                        ),
                      ),
                      Text(
                        'Jl. Margonda Raya No.358, Kemir...',
                        style: TextStyle(
                          fontSize: 15,
                          color: Colors.black,
                          fontFamily: 'Muli',
                        ),
                      ),
                    ],
                  ),
                ),
                Icon(
                  Icons.arrow_forward_ios,
                  color: Colors.grey[400],
109
110
                  size: 20,
                )
111
112
113
114
115
              ],
            ),
          ),
          Container(
            decoration: BoxDecoration(
116
                border: Border(top: BorderSide(color: Colors.grey[400]))),
117
118
119
120
121
122
123
          ),
          Container(
            height: 90,
            color: Colors.transparent,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
124
                CircleAvatar(
125
                  backgroundColor: greenPrimary,
126
                  child: Text('Test'),
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
                ),
                Padding(
                  padding: EdgeInsets.all(doubleSpace),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      Text(
                        'Margo City',
                        style: TextStyle(
                          fontSize: 18,
                          fontWeight: FontWeight.w800,
                          color: Colors.black,
                          fontFamily: 'Muli',
                        ),
                      ),
                      Text(
                        'Jl. Margonda Raya No.358, Kemir...',
                        style: TextStyle(
                          fontSize: 15,
                          color: Colors.black,
                          fontFamily: 'Muli',
                        ),
                      ),
                    ],
                  ),
                ),
                Icon(
                  Icons.arrow_forward_ios,
                  color: Colors.grey[400],
157
158
                  size: 20,
                )
159
160
161
162
163
              ],
            ),
          ),
          Container(
            decoration: BoxDecoration(
164
                border: Border(top: BorderSide(color: Colors.grey[400]))),
165
          ),
166
        ],
167
168
169
      ),
    );
  }
170
}