searchTextField add margin

null_safety
小赖 4 years ago
parent 0fc94b71ae
commit e367620199

@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.3"
version: "0.0.4"
async:
dependency: transitive
description:

@ -11,6 +11,7 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
this.onChanged,
this.focusNode,
this.onSubmitted,
this.margin,
}) : super(key: key);
///
@ -28,6 +29,9 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
///
final FocusNode focusNode;
///margin
final EdgeInsets margin;
@override
_ASSearchTextFieldState createState() => _ASSearchTextFieldState();
@ -47,10 +51,11 @@ class _ASSearchTextFieldState extends State<ASSearchTextField> {
Widget build(BuildContext context) {
return Container(
height: 42.w,
padding: EdgeInsets.symmetric(
horizontal: 15.w,
vertical: 3.w,
),
padding: widget.margin ??
EdgeInsets.symmetric(
horizontal: 15.w,
vertical: 3.w,
),
child: TextField(
controller: widget.controller,
onChanged: widget.onChanged,

Loading…
Cancel
Save