You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.5 KiB
77 lines
2.5 KiB
import 'package:flutter/material.dart';
|
|
|
|
buildInboxHead(
|
|
BuildContext context, TextEditingController controller, Function filter) {
|
|
return Container(
|
|
height: 50.0,
|
|
width: MediaQuery.of(context).size.width,
|
|
// padding: EdgeInsets.all(10.0),
|
|
child: Container(
|
|
height: 50,
|
|
width: MediaQuery.of(context).size.width - 10,
|
|
padding: EdgeInsets.symmetric(
|
|
horizontal: 15,
|
|
),
|
|
child: Container(
|
|
width: MediaQuery.of(context).size.width - 10,
|
|
height: 40,
|
|
margin: EdgeInsets.only(top: 10),
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: Theme.of(context).backgroundColor,
|
|
),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.only(
|
|
topLeft: Radius.circular(30.0),
|
|
topRight: Radius.circular(30.0),
|
|
bottomLeft: Radius.circular(30),
|
|
bottomRight: Radius.circular(30),
|
|
),
|
|
child: Material(
|
|
// color: Theme.of(context).backgroundColor,
|
|
elevation: 10.0,
|
|
borderRadius: BorderRadius.circular(30.0),
|
|
shadowColor: Theme.of(context).backgroundColor,
|
|
child: TextField(
|
|
autofocus: false,
|
|
textAlign: TextAlign.start,
|
|
style: TextStyle(
|
|
color: Colors.black,
|
|
),
|
|
controller: controller,
|
|
onChanged: (String value) {
|
|
filter(value);
|
|
},
|
|
decoration: InputDecoration(
|
|
contentPadding: EdgeInsets.all(10),
|
|
border: OutlineInputBorder(
|
|
borderSide: BorderSide.none,
|
|
borderRadius: const BorderRadius.all(
|
|
Radius.circular(
|
|
30,
|
|
),
|
|
),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderSide: BorderSide.none,
|
|
borderRadius: const BorderRadius.all(
|
|
Radius.circular(
|
|
30,
|
|
),
|
|
),
|
|
),
|
|
//fillColor: Theme.of(context).primaryColor,
|
|
prefixIcon: Icon(
|
|
Icons.search,
|
|
color: Theme.of(context).primaryColorLight,
|
|
),
|
|
hintText: "Search",
|
|
hintStyle: TextStyle(color: Colors.grey),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|