修改 as search text

master
张萌 3 years ago
parent b1b9666b37
commit 683cff887b

@ -1,4 +1,4 @@
{
"flutterSdkVersion": "2.0.2",
"flutterSdkVersion": "2.8.1",
"flavors": {}
}

@ -51,7 +51,7 @@ packages:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
@ -227,7 +227,7 @@ packages:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
version: "1.7.0"
path:
dependency: transitive
description:
@ -288,7 +288,7 @@ packages:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.1.1"
velocity_x:
dependency: transitive
description:
@ -304,5 +304,5 @@ packages:
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.0.0"

@ -1,6 +1,6 @@
import 'package:ansu_ui/styles/as_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:ansu_ui/styles/as_colors.dart';
///TextFiled
class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
@ -14,6 +14,7 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
this.margin,
this.onPressed,
this.height,
this.prefix,
}) : button = false,
super(key: key);
@ -28,6 +29,7 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
this.margin,
this.onPressed,
this.height,
this.prefix,
}) : button = true,
super(key: key);
@ -57,6 +59,9 @@ class ASSearchTextField extends StatefulWidget implements PreferredSizeWidget {
///
final double? height;
///
final Widget? prefix;
@override
_ASSearchTextFieldState createState() => _ASSearchTextFieldState();
@ -150,10 +155,16 @@ class _ASSearchTextFieldState extends State<ASSearchTextField> {
focusedErrorBorder: _border,
prefixIcon: Padding(
padding: EdgeInsets.only(left: 13.w, right: 8.w),
child: Icon(
Icons.search,
size: 16.w,
color: Colors.black,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.search,
size: 16.w,
color: Colors.black,
),
widget.prefix ?? SizedBox(),
],
),
),
prefixIconConstraints: BoxConstraints(minWidth: 0, minHeight: 0),

@ -16,7 +16,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.1"
version: "2.8.2"
auto_size_text_pk:
dependency: "direct main"
description:
@ -44,14 +44,14 @@ packages:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
version: "1.3.1"
clock:
dependency: transitive
description:
@ -192,14 +192,14 @@ packages:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
version: "0.12.11"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
version: "1.7.0"
path:
dependency: transitive
description:
@ -267,7 +267,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
version: "0.4.3"
typed_data:
dependency: transitive
description:
@ -281,7 +281,7 @@ packages:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.1.1"
velocity_x:
dependency: "direct main"
description:
@ -297,5 +297,5 @@ packages:
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.0.0"

Loading…
Cancel
Save