update search text field

null_safety
张萌 4 years ago
parent f24b1556c6
commit 22615333ba

@ -13,7 +13,7 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
this.onSubmitted,
this.margin,
this.onPressed,
this.width,
this.height,
}) : button = false,
super(key: key);
@ -27,7 +27,7 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
this.onSubmitted,
this.margin,
this.onPressed,
this.width,
this.height,
}) : button = true,
super(key: key);
@ -55,13 +55,13 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
final VoidCallback onPressed;
///
final double width;
final double height;
@override
_ASSearchTextFieldState createState() => _ASSearchTextFieldState();
@override
Size get preferredSize => Size.fromHeight(42);
Size get preferredSize => Size.fromHeight(this.height ?? 42.w);
}
class _ASSearchTextFieldState extends State<ASSearchTextField> {
@ -81,7 +81,6 @@ class _ASSearchTextFieldState extends State<ASSearchTextField> {
vertical: 3.w,
),
child: MaterialButton(
minWidth: widget.width,
padding: EdgeInsets.zero,
color: Color(0xFFF8F8F8),
elevation: 0,

Loading…
Cancel
Save