Showing
4 changed files
with
57 additions
and
50 deletions
| @@ -11,14 +11,14 @@ if (flutterRoot == null) { | @@ -11,14 +11,14 @@ if (flutterRoot == null) { | ||
| 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") | 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | -def flutterVersionCode = "161" | 14 | +def flutterVersionCode = "162" |
| 15 | if (flutterVersionCode == null) { | 15 | if (flutterVersionCode == null) { |
| 16 | - flutterVersionCode = '161' | 16 | + flutterVersionCode = '162' |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | -def flutterVersionName = "1.6.1" | 19 | +def flutterVersionName = "1.6.2" |
| 20 | if (flutterVersionName == null) { | 20 | if (flutterVersionName == null) { |
| 21 | - flutterVersionName = '1.6.1' | 21 | + flutterVersionName = '1.6.2' |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | apply plugin: 'com.android.application' | 24 | apply plugin: 'com.android.application' |
| @@ -596,7 +596,6 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -596,7 +596,6 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 596 | if (value.isEmpty || value.length >= 11) { | 596 | if (value.isEmpty || value.length >= 11) { |
| 597 | //内容为空,或 超过11位 | 597 | //内容为空,或 超过11位 |
| 598 | setState(() { | 598 | setState(() { |
| 599 | - showPhoneHistory = false; | ||
| 600 | _notebookDetailChangeModel.userHistorys.clear(); | 599 | _notebookDetailChangeModel.userHistorys.clear(); |
| 601 | }); | 600 | }); |
| 602 | return; | 601 | return; |
| @@ -700,10 +699,10 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -700,10 +699,10 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 700 | InkWell( | 699 | InkWell( |
| 701 | onTap: () { | 700 | onTap: () { |
| 702 | DialogUtil.showRemarkDialog( | 701 | DialogUtil.showRemarkDialog( |
| 703 | - context, remarkManagerModel.remarks, (item) { | 702 | + context, remarkManagerModel.ofenRemarks, (item) { |
| 704 | int index = | 703 | int index = |
| 705 | - remarkManagerModel.remarks.indexOf(item); | ||
| 706 | - _refreshRemark(remarkManagerModel.remarks, index); | 704 | + remarkManagerModel.ofenRemarks.indexOf(item); |
| 705 | + _refreshRemark(remarkManagerModel.ofenRemarks, index); | ||
| 707 | }); | 706 | }); |
| 708 | }, | 707 | }, |
| 709 | child: Container( | 708 | child: Container( |
| @@ -821,10 +820,10 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | @@ -821,10 +820,10 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { | ||
| 821 | 820 | ||
| 822 | _remarkListWidget() { | 821 | _remarkListWidget() { |
| 823 | List<Remark> remark = []; | 822 | List<Remark> remark = []; |
| 824 | - if (remarkManagerModel.remarks.length > 4) { | ||
| 825 | - remark = remarkManagerModel.remarks.sublist(0, 5); | 823 | + if (remarkManagerModel.ofenRemarks.length > 4) { |
| 824 | + remark = remarkManagerModel.ofenRemarks.sublist(0, 5); | ||
| 826 | } else { | 825 | } else { |
| 827 | - remark = remarkManagerModel.remarks; | 826 | + remark = remarkManagerModel.ofenRemarks; |
| 828 | } | 827 | } |
| 829 | return Container( | 828 | return Container( |
| 830 | height: ScreenUtil().setWidth(50), | 829 | height: ScreenUtil().setWidth(50), |
| @@ -10,22 +10,22 @@ import 'package:one_key/net/http_url.dart'; | @@ -10,22 +10,22 @@ import 'package:one_key/net/http_url.dart'; | ||
| 10 | /** | 10 | /** |
| 11 | * 常用备注管理 | 11 | * 常用备注管理 |
| 12 | */ | 12 | */ |
| 13 | -class RemarkManagerModel extends ChangeNotifier{ | ||
| 14 | - | ||
| 15 | - List<Remark> remarks=[];//所有备注 | 13 | +class RemarkManagerModel extends ChangeNotifier { |
| 14 | + List<Remark> remarks = []; //所有备注 | ||
| 15 | + List<Remark> ofenRemarks = []; //常用备注 | ||
| 16 | 16 | ||
| 17 | PageState pageState = PageState.Loading; | 17 | PageState pageState = PageState.Loading; |
| 18 | 18 | ||
| 19 | - | ||
| 20 | //获取备注 | 19 | //获取备注 |
| 21 | - getRemarks(BuildContext context, Map<String, String> params,{bool showPageLoading=false}) async { | ||
| 22 | - if(showPageLoading){ | 20 | + getRemarks(BuildContext context, Map<String, String> params, |
| 21 | + {bool showPageLoading = false}) async { | ||
| 22 | + if (showPageLoading) { | ||
| 23 | pageState = PageState.Loading; | 23 | pageState = PageState.Loading; |
| 24 | notifyListeners(); | 24 | notifyListeners(); |
| 25 | } | 25 | } |
| 26 | BaseResp<List> baseResp = await DioUtil() | 26 | BaseResp<List> baseResp = await DioUtil() |
| 27 | .request<List>(context, Method.get, HttpUrl.get_custom_remark, | 27 | .request<List>(context, Method.get, HttpUrl.get_custom_remark, |
| 28 | - data: params, showLoading: showPageLoading?false:true) | 28 | + data: params, showLoading: showPageLoading ? false : true) |
| 29 | .catchError((error) { | 29 | .catchError((error) { |
| 30 | print(error.toString()); | 30 | print(error.toString()); |
| 31 | if (error is MyError) { | 31 | if (error is MyError) { |
| @@ -47,6 +47,12 @@ class RemarkManagerModel extends ChangeNotifier{ | @@ -47,6 +47,12 @@ class RemarkManagerModel extends ChangeNotifier{ | ||
| 47 | remarks = baseResp.data.map<Remark>((value) { | 47 | remarks = baseResp.data.map<Remark>((value) { |
| 48 | return Remark.fromJson(value); | 48 | return Remark.fromJson(value); |
| 49 | }).toList(); | 49 | }).toList(); |
| 50 | + ofenRemarks = []; | ||
| 51 | + for (Remark item in remarks) { | ||
| 52 | + if (item.oftenUse != '') { | ||
| 53 | + ofenRemarks.add(item); | ||
| 54 | + } | ||
| 55 | + } | ||
| 50 | if (remarks.isEmpty) { | 56 | if (remarks.isEmpty) { |
| 51 | pageState = PageState.Empty; | 57 | pageState = PageState.Empty; |
| 52 | } else { | 58 | } else { |
| @@ -60,22 +66,21 @@ class RemarkManagerModel extends ChangeNotifier{ | @@ -60,22 +66,21 @@ class RemarkManagerModel extends ChangeNotifier{ | ||
| 60 | Future addRemark(BuildContext context, Map<String, String> params) async { | 66 | Future addRemark(BuildContext context, Map<String, String> params) async { |
| 61 | BaseResp<dynamic> baseResp = await DioUtil() | 67 | BaseResp<dynamic> baseResp = await DioUtil() |
| 62 | .request<dynamic>(context, Method.get, HttpUrl.add_custom_remark, | 68 | .request<dynamic>(context, Method.get, HttpUrl.add_custom_remark, |
| 63 | - data: params, showLoading: false) | 69 | + data: params, showLoading: false) |
| 64 | .catchError((error) { | 70 | .catchError((error) { |
| 65 | print(error.toString()); | 71 | print(error.toString()); |
| 66 | }); | 72 | }); |
| 67 | - return ; | 73 | + return; |
| 68 | } | 74 | } |
| 69 | 75 | ||
| 70 | //删除备注 | 76 | //删除备注 |
| 71 | delRemark(BuildContext context, Map<String, String> params) async { | 77 | delRemark(BuildContext context, Map<String, String> params) async { |
| 72 | BaseResp<dynamic> baseResp = await DioUtil() | 78 | BaseResp<dynamic> baseResp = await DioUtil() |
| 73 | .request<dynamic>(context, Method.get, HttpUrl.del_custom_remark, | 79 | .request<dynamic>(context, Method.get, HttpUrl.del_custom_remark, |
| 74 | - data: params, showLoading: false) | 80 | + data: params, showLoading: false) |
| 75 | .catchError((error) { | 81 | .catchError((error) { |
| 76 | print(error.toString()); | 82 | print(error.toString()); |
| 77 | }); | 83 | }); |
| 78 | - if (baseResp != null && baseResp.code == Constant.status_success) { | ||
| 79 | - } | 84 | + if (baseResp != null && baseResp.code == Constant.status_success) {} |
| 80 | } | 85 | } |
| 81 | -} | ||
| 86 | +} |
| @@ -47,34 +47,37 @@ class DialogUtil { | @@ -47,34 +47,37 @@ class DialogUtil { | ||
| 47 | children: <Widget>[ | 47 | children: <Widget>[ |
| 48 | VEmptyView(40), | 48 | VEmptyView(40), |
| 49 | InkWell( | 49 | InkWell( |
| 50 | - onTap: () { | ||
| 51 | - Navigator.pop(context); | ||
| 52 | - }, | ||
| 53 | - child: Stack( | ||
| 54 | - children: [ | ||
| 55 | - Center( | ||
| 56 | - child: Text( | ||
| 57 | - '更多标签', | ||
| 58 | - style: TextStyle( | ||
| 59 | - fontSize: ScreenUtil().setSp(32), | ||
| 60 | - color: MyColours.color_353535, | 50 | + onTap: () { |
| 51 | + Navigator.pop(context); | ||
| 52 | + }, | ||
| 53 | + child: Container( | ||
| 54 | + height: ScreenUtil().setWidth(44), | ||
| 55 | + // color: Colors.red, | ||
| 56 | + child: Stack( | ||
| 57 | + children: [ | ||
| 58 | + Center( | ||
| 59 | + child: Text( | ||
| 60 | + '更多标签', | ||
| 61 | + style: TextStyle( | ||
| 62 | + fontSize: ScreenUtil().setSp(32), | ||
| 63 | + color: MyColours.color_353535, | ||
| 64 | + ), | ||
| 65 | + softWrap: true, | ||
| 66 | + textAlign: TextAlign.center, | ||
| 67 | + ), | ||
| 61 | ), | 68 | ), |
| 62 | - softWrap: true, | ||
| 63 | - textAlign: TextAlign.center, | ||
| 64 | - ), | 69 | + Positioned( |
| 70 | + top: ScreenUtil().setWidth(10), | ||
| 71 | + right: ScreenUtil().setWidth(40), | ||
| 72 | + child: Image.asset( | ||
| 73 | + Utils.getImgPath('close1'), | ||
| 74 | + width: ScreenUtil().setWidth(28), | ||
| 75 | + height: ScreenUtil().setWidth(28), | ||
| 76 | + ), | ||
| 77 | + ) | ||
| 78 | + ], | ||
| 65 | ), | 79 | ), |
| 66 | - Positioned( | ||
| 67 | - top: ScreenUtil().setWidth(10), | ||
| 68 | - right: ScreenUtil().setWidth(40), | ||
| 69 | - child: Image.asset( | ||
| 70 | - Utils.getImgPath('close1'), | ||
| 71 | - width: ScreenUtil().setWidth(28), | ||
| 72 | - height: ScreenUtil().setWidth(28), | ||
| 73 | - ), | ||
| 74 | - ) | ||
| 75 | - ], | ||
| 76 | - ), | ||
| 77 | - ), | 80 | + )), |
| 78 | VEmptyView(60), | 81 | VEmptyView(60), |
| 79 | Container( | 82 | Container( |
| 80 | padding: EdgeInsets.symmetric( | 83 | padding: EdgeInsets.symmetric( |
-
Please register or login to post a comment