forked from qwertypool/flutter-code-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch_bar_3d.dart
33 lines (32 loc) · 1.08 KB
/
search_bar_3d.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Center searchBox(Size size) {
return Center(
child: Card(
elevation: 15,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
child: Container(
width: size.width*0.85,
height: 50,
child: TextFormField(
cursorHeight: 25,
decoration: InputDecoration(
labelText: "Search by book name",
labelStyle: TextStyle(color: kTextColor.withOpacity(0.9)),
border: InputBorder.none,
floatingLabelBehavior: FloatingLabelBehavior.never,
contentPadding: EdgeInsets.only(bottom: 20),
prefixIcon: IconButton(
icon: Icon(Icons.search),
color: Colors.grey,
onPressed: () {},
),
suffixIcon: IconButton(
icon: Icon(Icons.sort_sharp),
onPressed: () {},
),
),
)
)
),
);
}
}