From 5ff246c3b2654e9dcca5c740ea616aa705dc94d2 Mon Sep 17 00:00:00 2001 From: toly <1981462002@qq.com> Date: Fri, 20 May 2022 08:35:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Flutter=203.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++-- android/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 3 +- assets/flutter.db | Bin 1064960 -> 1069056 bytes .../items/widget/coupon_widget_list_item.dart | 2 +- .../items/widget/techno_widget_list_item.dart | 3 +- .../project/overlay_tool_wrapper.dart | 2 +- lib/components/project/widget_node_panel.dart | 3 ++ lib/main.dart | 2 +- lib/painter_system/gallery_unit.dart | 3 +- .../repositories/model/widget_model.dart | 3 ++ .../widget_detail_page.dart | 1 + .../views/widget_home_view/home_page.dart | 2 +- .../ButtonBarTheme/node1_base.dart | 2 +- .../ProxyWidget/ButtonTheme/node1_base.dart | 2 +- .../MonthPicker/node1_base.dart | 38 +++++++++------ .../StatelessWidget/ButtonBar/node1_base.dart | 4 +- .../ButtonBar/node2_padding.dart | 4 +- .../StatelessWidget/DayPicker/node1_base.dart | 44 +++++++++++------- .../OutlineButton/node1_base.dart | 31 ++++++++---- pubspec.lock | 18 +++---- pubspec.yaml | 2 +- 22 files changed, 109 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index 378b87b..5da2381 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ > 当前Flutter 版本 ``` -Flutter 2.10.5 • channel stable • https://github.com/flutter/flutter.git -Framework • revision 5464c5bac7 (10 days ago) • 2022-04-18 09:55:37 -0700 -Engine • revision 57d3bac3dd -Tools • Dart 2.16.2 • DevTools 2.9.2 +Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git +Framework • revision ee4e09cce0 (10 days ago) • 2022-05-09 16:45:18 -0700 +Engine • revision d1b9a6938a +Tools • Dart 2.17.0 • DevTools 2.12.2 ``` --- diff --git a/android/build.gradle b/android/build.gradle index c45f25c..ba6fe4a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.5.31' + ext.kotlin_version = '1.6.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index bc6a58a..55be929 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip + diff --git a/assets/flutter.db b/assets/flutter.db index d1d5b4444bc576e84f19e3ee3ba2444492291dfb..14e76ed0cbca66ae64f53d3fb16771717046e24f 100644 GIT binary patch delta 4844 zcmd6q2~<_p8pqGR^F8P6!!Q>rw{@ZlmHRUa)7;$38W9y zYi_4!W@e^lrsYvnn|uv6Iijc)DiUf5m04Lm-?y*k5cuBft@YM>cdh%|-1D7p5C8vn z_CA!9B$upCUf_?6ui9&SSU#5wf*>HHTTaR-HhBrkRpqjBNvT)PD5sPv<$$tZ*{AGP zb|_nwP0BiDwX$4UtW+pv3RPw*)06^bqLQhkDkGJl$^fOWlB6UmF-n9Iq68}KmDY+) z5fuaeJN^lOhrh;kxCWoVNARck1N;u&jkn`1cmrOGSK+025uRU+=i(ClBrd{vI2%8T z$Knw<1wV*;pfks_oJDNt%JwU%s>C>gc|IFhWz$e?xut@UamP^ZQNk?H~pY7Cfg zO?3kQt~!9fsS&_m)o|c1Y8T*DH5B->+8Owh+7bAp8VJ0i1^_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f=CxXnqF9G+ zQw}ToVQq_Y7#cmW^#`O|J5Hfwt>F!1r<#(fkXT)Jw%SfBnec`Z+@Yt5*LOpj7c@0O ze4cA_i5iERkMHX)|0-gI4nMPID#QsAGuMK8Ff>4t;Nfn|{IHoHAqV6mTF zJM6-D#TBFWjTfI^QF~d{S6r`#p+~L6F!!-{UB!ygp%tKFSkyxhsawq5FgXP#uNiEW zo^lu2M0A@wukKu%+d9{#_Y8NcIf`Svngj3msaBi~N7zX)mfr*+79-|^*vW1?-Fh6Ix3(RpV;)5R+Ed}N zA9AV61;t*eT!7`%7P@kdnFEhD$Zck?TB6hyR?l5H-CEl~B9PcJ!rSZG-Z(PCn|yU| zXjjLt?vCrHa(`Sul{@76>BAd{d2LI?7I|+F{*9#3s!a1fiycT$QuHK Container( - color: colors[data.family.index].withAlpha(66), + color: data.death?Colors.grey:colors[data.family.index].withAlpha(66), height: 95, padding: const EdgeInsets.only(top: 10, left: 10, right: 10, bottom: 5), child: Row( diff --git a/lib/components/project/items/widget/techno_widget_list_item.dart b/lib/components/project/items/widget/techno_widget_list_item.dart index 79983df..e4af5d1 100644 --- a/lib/components/project/items/widget/techno_widget_list_item.dart +++ b/lib/components/project/items/widget/techno_widget_list_item.dart @@ -104,7 +104,8 @@ class TechnoWidgetListItem extends StatelessWidget { ), ); - Color get itemColor => Cons.tabColors[data.family.index]; + Color get itemColor => data.death?Colors.grey:Cons.tabColors[data.family.index]; + Widget _buildTitle() { return Row( diff --git a/lib/components/project/overlay_tool_wrapper.dart b/lib/components/project/overlay_tool_wrapper.dart index 35e6638..9712bb8 100644 --- a/lib/components/project/overlay_tool_wrapper.dart +++ b/lib/components/project/overlay_tool_wrapper.dart @@ -60,7 +60,7 @@ class OverlayToolWrapperState extends State vsync: this, )..addListener(_listenAnimate); - WidgetsBinding.instance?.addPostFrameCallback((callback) { + WidgetsBinding.instance.addPostFrameCallback((callback) { var px = MediaQuery.of(context).size.width - 100; var py = MediaQuery.of(context).size.height*0.05; offset = Offset(px, py); diff --git a/lib/components/project/widget_node_panel.dart b/lib/components/project/widget_node_panel.dart index eba4f36..18e0f37 100644 --- a/lib/components/project/widget_node_panel.dart +++ b/lib/components/project/widget_node_panel.dart @@ -22,11 +22,13 @@ class WidgetNodePanel extends StatefulWidget { final Widget? show; final HighlighterStyle? codeStyle; final String? codeFamily; + final bool death; const WidgetNodePanel( {Key? key, this.text='', this.subText='', this.code='', + this.death=false, this.show, required this.codeStyle, this.codeFamily}) : super(key: key); @@ -58,6 +60,7 @@ class _WidgetNodePanelState extends State { padding: const EdgeInsets.only(top: 10, bottom: 20), child: widget.show, ), + if(!widget.death) _buildNodeInfo(), const Divider(), ], diff --git a/lib/main.dart b/lib/main.dart index e5a60f0..67910e6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,7 +8,7 @@ import 'app/views/navigation/flutter_unit.dart'; void main() { WidgetsFlutterBinding.ensureInitialized(); //滚动性能优化 1.22.0 - GestureBinding.instance?.resamplingEnabled = true; + GestureBinding.instance.resamplingEnabled = true; runApp(const BlocWrapper(child: FlutterUnit())); } diff --git a/lib/painter_system/gallery_unit.dart b/lib/painter_system/gallery_unit.dart index b669be0..461b784 100644 --- a/lib/painter_system/gallery_unit.dart +++ b/lib/painter_system/gallery_unit.dart @@ -68,10 +68,9 @@ class _GalleryUnitState extends State { @override Widget build(BuildContext context) { - return Scaffold( body: ValueListenableBuilder( - child: Column( //使用 child 属性优化 + child: Column( children: [ _buildTitle(context), Expanded( diff --git a/lib/widget_system/repositories/model/widget_model.dart b/lib/widget_system/repositories/model/widget_model.dart index 0e08fef..8c4756c 100644 --- a/lib/widget_system/repositories/model/widget_model.dart +++ b/lib/widget_system/repositories/model/widget_model.dart @@ -18,6 +18,7 @@ class WidgetModel extends Equatable { final String nameCN; final WidgetFamily family; final bool deprecated; + final bool death; final List links; final double lever; final ImageProvider? image; @@ -32,6 +33,7 @@ class WidgetModel extends Equatable { required this.nameCN, required this.family, this.deprecated =false, + this.death =false, required this.links, // required this.type, required this.lever, @@ -50,6 +52,7 @@ class WidgetModel extends Equatable { image: convertImage(po.name), lever: po.lever, deprecated: po.deprecated == 1, + death: po.deprecated == -1, info: po.info, links: formatLinkTo(po.linkWidget), ); diff --git a/lib/widget_system/views/widget_detail_view/widget_detail_page.dart b/lib/widget_system/views/widget_detail_view/widget_detail_page.dart index 8c2b536..51bbd4f 100644 --- a/lib/widget_system/views/widget_detail_view/widget_detail_page.dart +++ b/lib/widget_system/views/widget_detail_view/widget_detail_page.dart @@ -211,6 +211,7 @@ class _WidgetDetailPageState extends State { text: nodes[i].name, subText: nodes[i].subtitle, code: nodes[i].code, + death: _modelStack.last.death, show: WidgetsMap.map(name)[i], ), childCount: nodes.length, diff --git a/lib/widget_system/views/widget_home_view/home_page.dart b/lib/widget_system/views/widget_home_view/home_page.dart index 4fed903..19142d6 100644 --- a/lib/widget_system/views/widget_home_view/home_page.dart +++ b/lib/widget_system/views/widget_home_view/home_page.dart @@ -33,7 +33,7 @@ class _HomePageState extends State @override void initState() { super.initState(); - WidgetsBinding.instance?.addPostFrameCallback(_onFrameCallBack); + WidgetsBinding.instance.addPostFrameCallback(_onFrameCallBack); } void _onFrameCallBack(Duration timeStamp) { diff --git a/lib/widget_system/widgets/ProxyWidget/ButtonBarTheme/node1_base.dart b/lib/widget_system/widgets/ProxyWidget/ButtonBarTheme/node1_base.dart index b800292..b2483fa 100644 --- a/lib/widget_system/widgets/ProxyWidget/ButtonBarTheme/node1_base.dart +++ b/lib/widget_system/widgets/ProxyWidget/ButtonBarTheme/node1_base.dart @@ -37,7 +37,7 @@ class TempButtonBar extends StatelessWidget { children: [ RaisedButton( color: Colors.blue, child: const Text("1.Raised"), onPressed: () {}), - OutlineButton(child: const Text("2.Outline"), onPressed: () {}), + OutlinedButton(child: const Text("2.Outlined"), onPressed: () {}), FlatButton( color: Colors.blue, onPressed: () {}, diff --git a/lib/widget_system/widgets/ProxyWidget/ButtonTheme/node1_base.dart b/lib/widget_system/widgets/ProxyWidget/ButtonTheme/node1_base.dart index d6f6d35..1119d82 100644 --- a/lib/widget_system/widgets/ProxyWidget/ButtonTheme/node1_base.dart +++ b/lib/widget_system/widgets/ProxyWidget/ButtonTheme/node1_base.dart @@ -30,7 +30,7 @@ class ButtonThemeDemo extends StatelessWidget { children: [ RaisedButton(onPressed: (){},child: const Icon(Icons.add)), FlatButton(onPressed: (){},child: const Icon(Icons.add)), - OutlineButton(onPressed: (){},child: const Icon(Icons.add)), + OutlinedButton(onPressed: (){},child: const Icon(Icons.add)), MaterialButton(onPressed: (){},child: const Icon(Icons.add)), ], ), diff --git a/lib/widget_system/widgets/StatefulWidget/MonthPicker/node1_base.dart b/lib/widget_system/widgets/StatefulWidget/MonthPicker/node1_base.dart index dbc8193..af9d365 100644 --- a/lib/widget_system/widgets/StatefulWidget/MonthPicker/node1_base.dart +++ b/lib/widget_system/widgets/StatefulWidget/MonthPicker/node1_base.dart @@ -12,26 +12,34 @@ import 'package:flutter/material.dart'; // "【lastDate】 : 最后日期限制 【DateTime】\n" // "【onChanged】 : 点击回调 【Function(DateTime)】", // } -class CustomMonthPicker extends StatefulWidget { +class CustomMonthPicker extends StatelessWidget{ const CustomMonthPicker({Key? key}) : super(key: key); - @override - _CustomMonthPickerState createState() => _CustomMonthPickerState(); -} - -class _CustomMonthPickerState extends State { - DateTime _date = DateTime.now(); + final String info = + 'MonthPicker 月份期选择器于 Flutter3.0 退出历史舞台。取代者为 CalendarDatePicker 日历选择器。'; @override Widget build(BuildContext context) { - return SizedBox( - height: 350, - child: MonthPicker( - selectedDate: _date, - onChanged: (date) => setState(() => _date = date), - firstDate: DateTime(2018), - lastDate: DateTime(2030), - ), + return Container( + color: Colors.blue.withOpacity(0.1), + padding: const EdgeInsets.all(10), + margin: const EdgeInsets.all(10), + child: Text(info), ); } + + // final DateTime _date = DateTime.now(); + // + // @override + // Widget build(BuildContext context) { + // return SizedBox( + // height: 350, + // child: MonthPicker( + // selectedDate: _date, + // onChanged: (date) => setState(() => _date = date), + // firstDate: DateTime(2018), + // lastDate: DateTime(2030), + // ), + // ); + // } } diff --git a/lib/widget_system/widgets/StatelessWidget/ButtonBar/node1_base.dart b/lib/widget_system/widgets/StatelessWidget/ButtonBar/node1_base.dart index 0eb070c..0d4dba8 100755 --- a/lib/widget_system/widgets/StatelessWidget/ButtonBar/node1_base.dart +++ b/lib/widget_system/widgets/StatelessWidget/ButtonBar/node1_base.dart @@ -25,8 +25,8 @@ class CustomButtonBar extends StatelessWidget { color: Colors.blue, child: const Text("Raised"), onPressed: () => DialogAbout.show(context)), - OutlineButton( - child: const Text("Outline"), + OutlinedButton( + child: const Text("Outlined"), onPressed: () => DialogAbout.show(context)), FlatButton( color: Colors.blue, diff --git a/lib/widget_system/widgets/StatelessWidget/ButtonBar/node2_padding.dart b/lib/widget_system/widgets/StatelessWidget/ButtonBar/node2_padding.dart index f35dca3..b94b96a 100644 --- a/lib/widget_system/widgets/StatelessWidget/ButtonBar/node2_padding.dart +++ b/lib/widget_system/widgets/StatelessWidget/ButtonBar/node2_padding.dart @@ -26,8 +26,8 @@ class PaddingButtonBar extends StatelessWidget { color: Colors.blue, child: const Text("Raised"), onPressed: () => DialogAbout.show(context)), - OutlineButton( - child: const Text("Outline"), + OutlinedButton( + child: const Text("Outlined"), onPressed: () => DialogAbout.show(context)), FlatButton( color: Colors.blue, diff --git a/lib/widget_system/widgets/StatelessWidget/DayPicker/node1_base.dart b/lib/widget_system/widgets/StatelessWidget/DayPicker/node1_base.dart index 67958ca..5fc1293 100644 --- a/lib/widget_system/widgets/StatelessWidget/DayPicker/node1_base.dart +++ b/lib/widget_system/widgets/StatelessWidget/DayPicker/node1_base.dart @@ -17,29 +17,37 @@ // } import 'package:flutter/material.dart'; -class CustomDayPicker extends StatefulWidget { +class CustomDayPicker extends StatelessWidget{ + const CustomDayPicker({Key? key}) : super(key: key); - @override - _CustomDayPickerState createState() => _CustomDayPickerState(); -} - -class _CustomDayPickerState extends State { - - DateTime _date = DateTime.now(); + final String info = + 'DayPicker 日期选择器于 Flutter3.0 退出历史舞台。取代者为 CalendarDatePicker 日历选择器。'; @override Widget build(BuildContext context) { - return SizedBox( - height: 350, - child: DayPicker( - selectedDate: _date, - currentDate: DateTime.now(), - onChanged: (date)=> setState(() => _date = date), - firstDate: DateTime(2018), - lastDate: DateTime(2030), - displayedMonth: DateTime.now() - ), + return Container( + color: Colors.blue.withOpacity(0.1), + padding: const EdgeInsets.all(10), + margin: const EdgeInsets.all(10), + child: Text(info), ); } + + // final DateTime _date = DateTime.now(); + // + // @override + // Widget build(BuildContext context) { + // return SizedBox( + // height: 350, + // child: DayPicker( + // selectedDate: _date, + // currentDate: DateTime.now(), + // onChanged: (date)=> setState(() => _date = date), + // firstDate: DateTime(2018), + // lastDate: DateTime(2030), + // displayedMonth: DateTime.now() + // ), + // ); + // } } diff --git a/lib/widget_system/widgets/StatelessWidget/OutlineButton/node1_base.dart b/lib/widget_system/widgets/StatelessWidget/OutlineButton/node1_base.dart index 1b6a48a..bba68e8 100755 --- a/lib/widget_system/widgets/StatelessWidget/OutlineButton/node1_base.dart +++ b/lib/widget_system/widgets/StatelessWidget/OutlineButton/node1_base.dart @@ -20,17 +20,30 @@ import 'package:flutter/material.dart'; class CustomOutlineButton extends StatelessWidget { const CustomOutlineButton({Key? key}) : super(key: key); + final String info = + 'OutlineButton 按钮于 Flutter3.0 退出历史舞台。取代者为 OutlinedButton 按钮。'; + @override Widget build(BuildContext context) { - return OutlineButton(//边线按钮 - onPressed: () {}, - child: const Text("OutlineButton"), - padding: const EdgeInsets.all(8), - splashColor: Colors.green, - highlightColor: Colors.orangeAccent, - highlightedBorderColor: Colors.grey, - textColor: const Color(0xff000000), - borderSide: const BorderSide(color: Color(0xff0A66F8), width: 2), + return Container( + color: Colors.blue.withOpacity(0.1), + padding: const EdgeInsets.all(10), + margin: const EdgeInsets.all(10), + child: Text(info), ); } + + // @override + // Widget build(BuildContext context) { + // return OutlineButton(//边线按钮 + // onPressed: () {}, + // child: const Text("OutlineButton"), + // padding: const EdgeInsets.all(8), + // splashColor: Colors.green, + // highlightColor: Colors.orangeAccent, + // highlightedBorderColor: Colors.grey, + // textColor: const Color(0xff000000), + // borderSide: const BorderSide(color: Color(0xff0A66F8), width: 2), + // ); + // } } diff --git a/pubspec.lock b/pubspec.lock index 1879f88..1147254 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -63,7 +63,7 @@ packages: name: collection url: "https://pub.flutter-io.cn" source: hosted - version: "1.15.0" + version: "1.16.0" crypto: dependency: transitive description: @@ -105,7 +105,7 @@ packages: name: fake_async url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.3.0" ffi: dependency: transitive description: @@ -204,7 +204,7 @@ packages: name: js url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.3" + version: "0.6.4" jwt_decoder: dependency: "direct main" description: @@ -239,7 +239,7 @@ packages: name: material_color_utilities url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.3" + version: "0.1.4" meta: dependency: transitive description: @@ -309,7 +309,7 @@ packages: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0" + version: "1.8.1" path_provider: dependency: "direct main" description: @@ -510,7 +510,7 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" + version: "1.8.2" sqflite: dependency: "direct main" description: @@ -573,7 +573,7 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.8" + version: "0.4.9" toggle_rotate: dependency: "direct main" description: @@ -650,7 +650,7 @@ packages: name: vector_math url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "2.1.2" win32: dependency: transitive description: @@ -680,5 +680,5 @@ packages: source: hosted version: "5.3.1" sdks: - dart: ">=2.15.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" flutter: ">=2.8.0" diff --git a/pubspec.yaml b/pubspec.yaml index d9da893..f766939 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ author: 张风捷特烈 <1981462002@qq.com> homepage: https://juejin.cn/user/149189281194766/posts environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.12.0 <=3.0.0" dependencies: flutter: