Fakultas Ilmu Komputer UI

pencarian.dart 951 Bytes
Newer Older
1
2
3
4
5
6
7
8
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
16
        backgroundColor: Colors.green,
17
        leading: IconButton(icon: Icon(Icons.arrow_left), onPressed: () {}),
18
19
20
        title: TextFormField(
          key: Key("searchTextField"),
          decoration: InputDecoration(
21
22
23
24
25
26
              prefixIcon: Icon(Icons.search),
              border: OutlineInputBorder(
                  borderRadius: BorderRadius.circular(10.0),
                  borderSide: BorderSide(color: Colors.transparent, width: 0)),
              fillColor: Colors.white,
              labelText: 'Kamu mau kemana?'),
27
        ),
28
29
30
      ),
    );
  }
31
}