|
1 | 1 | import 'package:flutter/material.dart'; |
2 | 2 | import 'package:gsy_github_app_flutter/common/localization/default_localizations.dart'; |
3 | 3 | import 'package:gsy_github_app_flutter/common/style/gsy_style.dart'; |
| 4 | + |
4 | 5 | /** |
5 | 6 | * 搜索输入框 |
6 | 7 | * Created by guoshuyu |
@@ -36,18 +37,29 @@ class GSYSearchInputWidget extends StatelessWidget { |
36 | 37 | child: new Row( |
37 | 38 | children: <Widget>[ |
38 | 39 | new Expanded( |
39 | | - child: new TextField( |
40 | | - autofocus: false, |
41 | | - controller: controller, |
42 | | - decoration: new InputDecoration( |
43 | | - hintText: GSYLocalizations.i18n(context)!.repos_issue_search, |
44 | | - hintStyle: GSYConstant.middleSubText, |
45 | | - border: InputBorder.none, |
46 | | - isDense: true, |
47 | | - ), |
48 | | - style: GSYConstant.middleText |
49 | | - .copyWith(textBaseline: TextBaseline.alphabetic), |
50 | | - onSubmitted: onSubmitted)), |
| 40 | + child: new TextField( |
| 41 | + autofocus: false, |
| 42 | + controller: controller, |
| 43 | + decoration: new InputDecoration( |
| 44 | + hintText: GSYLocalizations.i18n(context)!.repos_issue_search, |
| 45 | + hintStyle: GSYConstant.middleSubText, |
| 46 | + border: InputBorder.none, |
| 47 | + isDense: true, |
| 48 | + ), |
| 49 | + |
| 50 | + ///关闭 3.7 的放大镜 |
| 51 | + magnifierConfiguration: |
| 52 | + TextMagnifierConfiguration(magnifierBuilder: ( |
| 53 | + BuildContext context, |
| 54 | + MagnifierController controller, |
| 55 | + ValueNotifier<MagnifierInfo> magnifierInfo, |
| 56 | + ) { |
| 57 | + return null; |
| 58 | + }), |
| 59 | + style: GSYConstant.middleText |
| 60 | + .copyWith(textBaseline: TextBaseline.alphabetic), |
| 61 | + onSubmitted: onSubmitted), |
| 62 | + ), |
51 | 63 | new RawMaterialButton( |
52 | 64 | materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, |
53 | 65 | padding: const EdgeInsets.only(right: 5.0, left: 10.0), |
|
0 commit comments