searchTextField add margin

null_safety
小赖 4 years ago
parent 0fc94b71ae
commit e367620199

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

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

Loading…
Cancel
Save