From 6f24fcdc192faf74b16f592e121043c4ac749fa8 Mon Sep 17 00:00:00 2001 From: uy_sun Date: Tue, 5 Dec 2023 12:33:02 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7=E8=87=B3=20Flutt?= =?UTF-8?q?er=203.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 4 +- CHANGELOG.md | 1 + pubspec.lock | 416 ++++++++++++++++++------------------- pubspec.yaml | 4 +- 4 files changed, 209 insertions(+), 216 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 56480056..6dbb2846 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,8 +13,8 @@ concurrency: cancel-in-progress: true env: - flutter_version: "3.13.0-0.1.pre" - flutter_channel: "beta" + flutter_version: "3.16.2" + flutter_channel: "stable" jobs: test: diff --git a/CHANGELOG.md b/CHANGELOG.md index 798bc218..307a6416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/ ### Added - 留言板支持多行选择 +- 升级至 Flutter 3.16 ### Fixed diff --git a/pubspec.lock b/pubspec.lock index 9e059833..73a75887 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,34 +5,34 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 url: "https://pub.dev" source: hosted - version: "61.0.0" + version: "64.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" url: "https://pub.dev" source: hosted - version: "5.13.0" + version: "6.2.0" android_id: dependency: "direct main" description: name: android_id - sha256: b7c55d9c30a7f02235607bd025e1e20e5573543fedf9f68018088c8535200e79 + sha256: "5c2d3a259afcd173dbe367ba452817bd530c4df75d251d652c69b8d3c8ac0d36" url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.6" archive: dependency: transitive description: name: archive - sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a" + sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" url: "https://pub.dev" source: hosted - version: "3.3.7" + version: "3.4.9" args: dependency: transitive description: @@ -61,10 +61,10 @@ packages: dependency: "direct dev" description: name: bloc_test - sha256: "43d5b2f3d09ba768d6b611151bdf20ca141ffb46e795eb9550a58c9c2f4eae3f" + sha256: "02f04270be5abae8df171143e61a0058a7acbce5dcac887612e89bb40cca4c33" url: "https://pub.dev" source: hosted - version: "9.1.3" + version: "9.1.5" boolean_selector: dependency: transitive description: @@ -93,34 +93,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "6c4dd11d05d056e76320b828a1db0fc01ccd376922526f8e9d6c796a5adbac20" + sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.4.1" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.7" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.2.11" built_collection: dependency: transitive description: @@ -133,34 +133,34 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.8.0" cached_network_image: dependency: "direct main" description: name: cached_network_image - sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f url: "https://pub.dev" source: hosted - version: "3.2.3" + version: "3.3.0" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + sha256: "56aa42a7a01e3c9db8456d9f3f999931f1e05535b5a424271e9a38cabf066613" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + sha256: "759b9a9f8f6ccbb66c185df805fac107f05730b1dab9c64626d1008cca532257" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" characters: dependency: transitive description: @@ -197,18 +197,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + sha256: b2151ce26a06171005b379ecff6e08d34c470180ffe16b8e14b6d52be292b55f url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.8.0" collection: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -221,18 +221,18 @@ packages: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: ac86d3abab0f165e4b8f561280ff4e066bceaac83c424dd19f1ae2c2fcd12ca9 url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.7.1" cross_file: dependency: transitive description: name: cross_file - sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e url: "https://pub.dev" source: hosted - version: "0.3.3+4" + version: "0.3.3+8" crypto: dependency: transitive description: @@ -245,18 +245,18 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" dart_style: dependency: transitive description: name: dart_style - sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.4" datetime_picker_formfield: dependency: "direct main" description: @@ -269,10 +269,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: "2c35b6d1682b028e42d07b3aee4b98fa62996c10bc12cb651ec856a80d6a761b" + sha256: "0042cb3b2a76413ea5f8a2b40cec2a33e01d0c937e91f0f7c211fde4f7739ba6" url: "https://pub.dev" source: hosted - version: "9.0.2" + version: "9.1.1" device_info_plus_platform_interface: dependency: transitive description: @@ -301,10 +301,10 @@ packages: dependency: "direct main" description: name: dynamic_color - sha256: de4798a7069121aee12d5895315680258415de9b00e717723a1bd73d58f0126d + sha256: "8b8bd1d798bd393e11eddeaa8ae95b12ff028bf7d5998fc5d003488cd5f4ce2f" url: "https://pub.dev" source: hosted - version: "1.6.6" + version: "1.6.8" enum_to_string: dependency: "direct main" description: @@ -341,50 +341,50 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.0" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" file_selector_linux: dependency: transitive description: name: file_selector_linux - sha256: "770eb1ab057b5ae4326d1c24cc57710758b9a46026349d021d6311bd27580046" + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.2+1" file_selector_macos: dependency: transitive description: name: file_selector_macos - sha256: "4ada532862917bf16e3adb3891fe3a5917a58bae03293e497082203a80909412" + sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 url: "https://pub.dev" source: hosted - version: "0.9.3+1" + version: "0.9.3+3" file_selector_platform_interface: dependency: transitive description: name: file_selector_platform_interface - sha256: "412705a646a0ae90f33f37acfae6a0f7cbc02222d6cd34e479421c3e74d3853c" + sha256: "0aa47a725c346825a2bd396343ce63ac00bda6eff2fbc43eabe99737dede8262" url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.6.1" file_selector_windows: dependency: transitive description: name: file_selector_windows - sha256: "1372760c6b389842b77156203308940558a2817360154084368608413835fc26" + sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 url: "https://pub.dev" source: hosted - version: "0.9.3" + version: "0.9.3+1" fixnum: dependency: transitive description: @@ -406,14 +406,6 @@ packages: url: "https://pub.dev" source: hosted version: "8.1.3" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" - url: "https://pub.dev" - source: hosted - version: "0.7.0" flutter_cache_manager: dependency: transitive description: @@ -482,10 +474,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4" + sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "3.0.1" flutter_localizations: dependency: "direct main" description: flutter @@ -495,18 +487,18 @@ packages: dependency: "direct main" description: name: flutter_markdown_selectionarea - sha256: "4ce7f7eb337d75afcb8613f49e484ffc561e695b5369ff588b6549e422078569" + sha256: d4bc27e70a5c40ebdab23a4b81f75d53696a214d4d1f13c12045b38a0ddc58a2 url: "https://pub.dev" source: hosted - version: "0.6.14+3" + version: "0.6.17+1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" + sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.0.17" flutter_sticky_header: dependency: "direct main" description: @@ -553,50 +545,50 @@ packages: dependency: "direct main" description: name: gql - sha256: "07ae289bc5ccfbfd143883bfe9a380f5bf52c94559ded740cf3fb152fcbdbe2e" + sha256: aa3e0be4548353007b6e6fd24fcad0ce8c1179f9cb2ae5239d392fddb84a5ce5 url: "https://pub.dev" source: hosted - version: "1.0.1-alpha+1686240655988" + version: "1.0.1-alpha+1700868214564" gql_dedupe_link: dependency: transitive description: name: gql_dedupe_link - sha256: dac8e5eec5e9f6274302e5c01f77c7558f89d727f2c0dff7cda568c440a171cd + sha256: e97e3f9490add43ba96cf5cc02d9d10a3723965c0bcc7bb1e04ef4f2e7a31a00 url: "https://pub.dev" source: hosted - version: "2.0.4-alpha+1686240656097" + version: "2.0.4-alpha+1700868214643" gql_error_link: dependency: transitive description: name: gql_error_link - sha256: bfdb543137da89448cc5d003fd029c2e8718931d39d4a7dedb16f9169862fbb9 + sha256: "93901458f3c050e33386dedb0ca7173e08cebd7078e4e0deca4bf23ab7a71f63" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.0+1" gql_exec: dependency: transitive description: name: gql_exec - sha256: "04fb14e41fdc3fafa80fa7218224bceba019e00b80de9130c2dd0a9a77c6392d" + sha256: "394944626fae900f1d34343ecf2d62e44eb984826189c8979d305f0ae5846e38" url: "https://pub.dev" source: hosted - version: "1.0.1-alpha+1686240655996" + version: "1.1.1-alpha+1699813812660" gql_http_link: dependency: transitive description: name: gql_http_link - sha256: "0789d397d46ce274942fcc73e18a080cd2584296dadc33d8ae53d0666d7fe981" + sha256: "1f922eed1b7078fdbfd602187663026f9f659fe9a9499e2207b5d5e01617f658" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.1+1" gql_link: dependency: transitive description: name: gql_link - sha256: ecf2419e6c543d1b8dedd7dbbc538ce037f4d53a3b5b7d694a98a7d636da2817 + sha256: "48dbf63b4831d800a2ce9675c9fecea3c9f2801de92072c7644a4bc52aa26c13" url: "https://pub.dev" source: hosted - version: "1.0.1-alpha+1686240656001" + version: "1.0.1-alpha+1700868214578" gql_transform_link: dependency: transitive description: @@ -609,10 +601,10 @@ packages: dependency: "direct main" description: name: graphql - sha256: "1e3720c13cd1c9a345fed40dfac35759b626ff907661567d299616e9d9903e0c" + sha256: "4ac531068107dffef188c74e7ff662777b729e9d5e0686f71623d4af1e3751c8" url: "https://pub.dev" source: hosted - version: "5.2.0-beta.5" + version: "5.2.0-beta.6" graphs: dependency: transitive description: @@ -633,10 +625,10 @@ packages: dependency: "direct main" description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" http_multi_server: dependency: transitive description: @@ -657,74 +649,74 @@ packages: dependency: transitive description: name: image - sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf + sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" url: "https://pub.dev" source: hosted - version: "4.0.17" + version: "4.1.3" image_picker: dependency: "direct main" description: name: image_picker - sha256: "6296e98782726d37f59663f0727d0e978eee1ced1ffed45ccaba591786a7f7b3" + sha256: "7d7f2768df2a8b0a3cefa5ef4f84636121987d403130e70b17ef7e2cf650ba84" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.4" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: d2bab152deb2547ea6f53d82ebca9b7e77386bb706e5789e815d37e08ea475bb + sha256: d6a6e78821086b0b737009b09363018309bbc6de3fd88cc5c26bc2bb44a4957f url: "https://pub.dev" source: hosted - version: "0.8.7+3" + version: "0.8.8+2" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0" + sha256: "50bc9ae6a77eea3a8b11af5eb6c661eeb858fdd2f734c2a4fd17086922347ef7" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "3.0.1" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: b3e2f21feb28b24dd73a35d7ad6e83f568337c70afab5eabac876e23803f264b + sha256: "76ec722aeea419d03aa915c2c96bf5b47214b053899088c9abb4086ceecf97a7" url: "https://pub.dev" source: hosted - version: "0.8.8" + version: "0.8.8+4" image_picker_linux: dependency: transitive description: name: image_picker_linux - sha256: "02cbc21fe1706b97942b575966e5fbbeaac535e76deef70d3a242e4afb857831" + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.2.1+1" image_picker_macos: dependency: transitive description: name: image_picker_macos - sha256: cee2aa86c56780c13af2c77b5f2f72973464db204569e1ba2dd744459a065af4 + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.2.1+1" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - sha256: "7c7b96bb9413a9c28229e717e6fd1e3edd1cc5569c1778fcca060ecf729b65ee" + sha256: ed9b00e63977c93b0d2d2b343685bed9c324534ba5abafbb3dfbd6a780b1b514 url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "2.9.1" image_picker_windows: dependency: transitive description: name: image_picker_windows - sha256: c3066601ea42113922232c7b7b3330a2d86f029f685bba99d82c30e799914952 + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.2.1+1" intl: dependency: "direct main" description: @@ -769,10 +761,10 @@ packages: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" logging: dependency: "direct main" description: @@ -809,10 +801,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: "direct main" description: @@ -825,10 +817,10 @@ packages: dependency: transitive description: name: mocktail - sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53" + sha256: bac151b31e4ed78bd59ab89aa4c0928f297b1180186d5daf03734519e5f596c1 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.1" nested: dependency: transitive description: @@ -857,10 +849,10 @@ packages: dependency: transitive description: name: octo_image - sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "2.0.0" package_config: dependency: transitive description: @@ -873,10 +865,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: ceb027f6bc6a60674a233b4a90a7658af1aebdea833da0b5b53c1e9821a78c7b + sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "5.0.1" package_info_plus_platform_interface: dependency: transitive description: @@ -897,58 +889,58 @@ packages: dependency: transitive description: name: path_provider - sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.1.1" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.2.1" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "916731ccbdce44d545414dd9961f26ba5fbaa74bcbb55237d8e65a623a8c7297" + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.1" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.2.1" petitparser: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.2" photo_view: dependency: "direct main" description: @@ -961,18 +953,18 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.7" pointycastle: dependency: transitive description: @@ -993,10 +985,10 @@ packages: dependency: "direct main" description: name: provider - sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096" url: "https://pub.dev" source: hosted - version: "6.0.5" + version: "6.1.1" pub_semver: dependency: transitive description: @@ -1017,34 +1009,34 @@ packages: dependency: "direct main" description: name: quick_actions - sha256: "0562d78b8d6a87576fb8fe55bc655bda6ebe3c61a5904df56d20bd88f98cf3a3" + sha256: "3930e1cf78a0574495b4ea741ee197323c4a9081321d6ae384b3bfcd84c7ea83" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" quick_actions_android: dependency: transitive description: name: quick_actions_android - sha256: "1a5e0498ab531b446b2b0b762ed0997f2dbb3d580e0af9009f87f621a278778e" + sha256: df67c20583e05f5038a24c47bfa1b7b2977703ec2d162663017c5f9ef8707699 url: "https://pub.dev" source: hosted - version: "1.0.6" + version: "1.0.9" quick_actions_ios: dependency: transitive description: name: quick_actions_ios - sha256: "9ed8b003a65034de9f36a7f593026bf114c8796a38011b23240f8bf7e4668e2b" + sha256: "5a13ed27b6254184fdd4294e100e3172fa6ebfd8bea03e414634a0f760d49997" url: "https://pub.dev" source: hosted - version: "1.0.6" + version: "1.0.8" quick_actions_platform_interface: dependency: transitive description: name: quick_actions_platform_interface - sha256: "2985e12b5fecb5715a35cc0a3b2127b4391e1969e62bd0a4a721b4de21d5fedb" + sha256: d2a8566b56eec49f93934528b62033906199c60f4ffaef0cba9ef02fcfed8a81 url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" rxdart: dependency: "direct main" description: @@ -1057,74 +1049,74 @@ packages: dependency: transitive description: name: sentry - sha256: "8f4f1d3ef3ca1801aa3138392bbf0851b39eff703008111765b265f76c8f0190" + sha256: e7ded42974bac5f69e4ca4ddc57d30499dd79381838f24b7e8fd9aa4139e7b79 url: "https://pub.dev" source: hosted - version: "7.8.0" + version: "7.13.2" sentry_flutter: dependency: "direct main" description: name: sentry_flutter - sha256: bbc1048558cf8ae65c1e27b1249357298cfca50e5843ad0367387f5c873b8e42 + sha256: d6f55ec7a1f681784165021f749007712a72ff57eadf91e963331b6ae326f089 url: "https://pub.dev" source: hosted - version: "7.8.0" + version: "7.13.2" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1" + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.2" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076 + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: f39696b83e844923b642ce9dd4bd31736c17e697f6731a5adf445b1274cf3cd4 + sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.4" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1" + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1" + sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a" + sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.2" shelf: dependency: transitive description: @@ -1206,34 +1198,34 @@ packages: dependency: transitive description: name: sqflite - sha256: b4d6710e1200e96845747e37338ea8a819a12b51689a3bcf31eff0003b37a0b9 + sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" url: "https://pub.dev" source: hosted - version: "2.2.8+4" + version: "2.3.0" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "8f7603f3f8f126740bc55c4ca2d1027aab4b74a1267a3e31ce51fe40e3b65b8f" + sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6 url: "https://pub.dev" source: hosted - version: "2.4.5+1" + version: "2.5.0+2" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -1270,26 +1262,26 @@ packages: dependency: transitive description: name: test - sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" + sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f url: "https://pub.dev" source: hosted - version: "1.24.3" + version: "1.24.9" test_api: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" test_core: dependency: transitive description: name: test_core - sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" + sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a url: "https://pub.dev" source: hosted - version: "0.5.3" + version: "0.5.9" timing: dependency: transitive description: @@ -1318,66 +1310,66 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e" + sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba url: "https://pub.dev" source: hosted - version: "6.1.12" + version: "6.2.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "15f5acbf0dce90146a0f5a2c4a002b1814a6303c4c5c075aa2623b2d16156f03" + sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" url: "https://pub.dev" source: hosted - version: "6.0.36" + version: "6.2.0" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3 url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "6.2.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.1.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1" + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea + sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.2.0" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4 + sha256: "138bd45b3a456dcfafc46d1a146787424f8d2edfbf2809c9324361e58f851cf7" url: "https://pub.dev" source: hosted - version: "2.0.18" + version: "2.2.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422" + sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "3.1.0" uuid: dependency: transitive description: @@ -1414,10 +1406,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b8c67f5fa3897b122cf60fe9ff314f7b0ef71eab25c5f8b771480bc338f48823 + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "11.7.2" + version: "13.0.0" watcher: dependency: transitive description: @@ -1430,10 +1422,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" web_socket_channel: dependency: transitive description: @@ -1446,74 +1438,74 @@ packages: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" webview_flutter: dependency: "direct main" description: name: webview_flutter - sha256: "789d52bd789373cc1e100fb634af2127e86c99cf9abde09499743270c5de8d00" + sha256: "42393b4492e629aa3a88618530a4a00de8bb46e50e7b3993fedbfdc5352f0dbf" url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.4.2" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: "27ad6a99c4b2d5e1ffd2b993a10f738b6b4979f139b4d64c34ac511595fcd748" + sha256: "8326ee235f87605a2bfc444a4abc897f4abc78d83f054ba7d3d1074ce82b4fbf" url: "https://pub.dev" source: hosted - version: "3.9.0" + version: "3.12.1" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - sha256: "564ef378cafc1a0e29f1d76ce175ef517a0a6115875dff7b43fccbef2b0aeb30" + sha256: "68e86162aa8fc646ae859e1585995c096c95fc2476881fa0c4a8d10f56013a5a" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.8.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "369fdf6160944a7db660ff15fa048c2bd681b09557907beaef1f95e8557d21dc" + sha256: accdaaa49a2aca2dc3c3230907988954cdd23fed0a19525d6c9789d380f4dc76 url: "https://pub.dev" source: hosted - version: "3.7.0" + version: "3.9.4" win32: dependency: transitive description: name: win32 - sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" + sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574 url: "https://pub.dev" source: hosted - version: "4.1.4" + version: "5.1.1" win32_registry: dependency: transitive description: name: win32_registry - sha256: "1c52f994bdccb77103a6231ad4ea331a244dbcef5d1f37d8462f713143b0bfae" + sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: e0b1147eec179d3911f1f19b59206448f78195ca1d20514134e10641b7d7fbff + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.3" xml: dependency: transitive description: name: xml - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.5.0" yaml: dependency: transitive description: @@ -1523,5 +1515,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0-185.0.dev <4.0.0" - flutter: ">=3.10.0" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index 87741aaa..cee8b8c2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -40,7 +40,7 @@ dependencies: quick_actions: ^1.0.0 android_id: ^0.3.0 device_info_plus: ^9.0.0 - package_info_plus: ^4.0.0 + package_info_plus: ^5.0.1 flutter_keyboard_visibility: ^5.4.1 photo_view: ^0.14.0 image_picker: ^1.0.1 @@ -64,7 +64,7 @@ dev_dependencies: build_runner: ^2.0.3 json_serializable: ^6.0.1 flutter_launcher_icons: ^0.13.0 - flutter_lints: ^2.0.0 + flutter_lints: ^3.0.1 flutter: uses-material-design: true From d8e2296a443aec8c1279013f2c5d652140127f51 Mon Sep 17 00:00:00 2001 From: uy_sun Date: Tue, 5 Dec 2023 13:03:26 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=BF=90=E8=A1=8C=20dart=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/app/main.dart | 9 ++++----- lib/blog/view/home_page.dart | 4 ++-- .../view/settings/blog_admin_url_page.dart | 2 +- lib/blog/view/settings/blog_url_page.dart | 2 +- lib/blog/view/settings/settings_page.dart | 2 +- lib/board/view/comment_edit_page.dart | 10 ++++------ lib/board/view/home_page.dart | 4 ++-- .../view/settings/comment_order_page.dart | 2 +- lib/board/view/topic_detail_page.dart | 8 ++++---- lib/board/view/topic_edit_page.dart | 10 ++++------ lib/board/view/widgets/comment_item.dart | 4 ++-- lib/board/view/widgets/item_title.dart | 4 ++-- lib/board/view/widgets/topic_item.dart | 4 ++-- lib/core/view/admin_page.dart | 4 ++-- lib/core/view/login_page.dart | 10 +++++----- lib/core/view/settings/admin_url_page.dart | 2 +- lib/core/view/settings/api_url_page.dart | 2 +- lib/core/view/settings/default_page.dart | 2 +- lib/core/view/settings/mipush_page.dart | 2 +- .../view/settings/mipush_settings_tile.dart | 2 +- lib/core/view/settings/session_page.dart | 2 +- lib/core/view/settings/settings_page.dart | 2 +- lib/core/view/settings/theme_mode.dart | 2 +- lib/iot/view/home_page.dart | 2 +- lib/routers/information_parser.dart | 2 +- lib/storage/view/consumable_edit_page.dart | 4 ++-- lib/storage/view/consumables_page.dart | 4 ++-- lib/storage/view/home_page.dart | 2 +- lib/storage/view/item_datail_page.dart | 6 +++--- lib/storage/view/item_edit_page.dart | 5 ++--- lib/storage/view/picture_add_page.dart | 4 ++-- lib/storage/view/picture_page.dart | 2 +- lib/storage/view/recycle_bin_page.dart | 4 ++-- lib/storage/view/search_page.dart | 4 ++-- lib/storage/view/storage_datail_page.dart | 4 ++-- lib/storage/view/storage_edit_page.dart | 4 ++-- .../view/widgets/add_storage_icon_button.dart | 4 ++-- .../view/widgets/search_icon_button.dart | 2 +- .../view/widgets/storage_item_list.dart | 10 ++++------ .../widgets/storage_picker_formfield.dart | 19 +++++++------------ lib/utils/exceptions.dart | 6 +++--- lib/widgets/avatar.dart | 4 ++-- lib/widgets/bottom_loader.dart | 4 ++-- lib/widgets/drawer.dart | 2 +- lib/widgets/dropdown_search.dart | 4 ++-- lib/widgets/error_message_button.dart | 4 ++-- lib/widgets/infinite_list.dart | 8 ++++---- lib/widgets/rounded_raised_button.dart | 8 ++++---- lib/widgets/settings/settings_list.dart | 4 ++-- lib/widgets/settings/settings_section.dart | 4 ++-- lib/widgets/settings/settings_tile.dart | 4 ++-- lib/widgets/substring_highlight.dart | 4 ++-- lib/widgets/tab_selector.dart | 4 ++-- lib/widgets/text_edit_page.dart | 4 ++-- windows/flutter/CMakeLists.txt | 7 ++++++- 55 files changed, 120 insertions(+), 128 deletions(-) diff --git a/lib/app/main.dart b/lib/app/main.dart index 0ed94bc2..69faa0e1 100644 --- a/lib/app/main.dart +++ b/lib/app/main.dart @@ -18,10 +18,10 @@ import 'package:smarthome/user/user.dart'; class MyApp extends StatelessWidget { MyApp({ - Key? key, + super.key, required this.settingsController, required this.graphQLApiClient, - }) : super(key: key) { + }) { // 在应用最开始用设置里的 API URL 初始化 GraphQLClient graphQLApiClient.initailize(settingsController.apiUrl ?? settingsController.appConfig.defaultApiUrl); @@ -112,9 +112,9 @@ class MyMaterialApp extends StatefulWidget { final SettingsController settingsController; const MyMaterialApp({ - Key? key, + super.key, required this.settingsController, - }) : super(key: key); + }); @override State createState() => _MyMaterialAppState(); @@ -154,7 +154,6 @@ class _MyMaterialAppState extends State { ), darkTheme: ThemeData.dark().copyWith( colorScheme: darkDynamic, - useMaterial3: true, ), themeMode: themeMode, localizationsDelegates: AppLocalizations.localizationsDelegates, diff --git a/lib/blog/view/home_page.dart b/lib/blog/view/home_page.dart index 88962ae2..ec7d427f 100644 --- a/lib/blog/view/home_page.dart +++ b/lib/blog/view/home_page.dart @@ -35,7 +35,7 @@ class BlogHomePage extends Page { /// 利用 WebView 实现的博客页面 class BlogHomeScreen extends StatefulWidget { - const BlogHomeScreen({Key? key}) : super(key: key); + const BlogHomeScreen({super.key}); @override State createState() => _BlogHomeScreenState(); @@ -118,7 +118,7 @@ class _BlogHomeScreenState extends State { } class SettingButton extends StatelessWidget { - const SettingButton({Key? key}) : super(key: key); + const SettingButton({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/blog/view/settings/blog_admin_url_page.dart b/lib/blog/view/settings/blog_admin_url_page.dart index f6e7e55c..6e715251 100644 --- a/lib/blog/view/settings/blog_admin_url_page.dart +++ b/lib/blog/view/settings/blog_admin_url_page.dart @@ -4,7 +4,7 @@ import 'package:smarthome/app/settings/settings_controller.dart'; import 'package:smarthome/widgets/text_edit_page.dart'; class BlogAdminUrlPage extends StatelessWidget { - const BlogAdminUrlPage({Key? key}) : super(key: key); + const BlogAdminUrlPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/blog/view/settings/blog_url_page.dart b/lib/blog/view/settings/blog_url_page.dart index 2eae911c..8501a008 100644 --- a/lib/blog/view/settings/blog_url_page.dart +++ b/lib/blog/view/settings/blog_url_page.dart @@ -4,7 +4,7 @@ import 'package:smarthome/app/settings/settings_controller.dart'; import 'package:smarthome/widgets/text_edit_page.dart'; class BlogUrlPage extends StatelessWidget { - const BlogUrlPage({Key? key}) : super(key: key); + const BlogUrlPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/blog/view/settings/settings_page.dart b/lib/blog/view/settings/settings_page.dart index cfd3286a..8affd7b4 100644 --- a/lib/blog/view/settings/settings_page.dart +++ b/lib/blog/view/settings/settings_page.dart @@ -23,7 +23,7 @@ class BlogSettingsPage extends Page { } class BlogSettingsScreen extends StatelessWidget { - const BlogSettingsScreen({Key? key}) : super(key: key); + const BlogSettingsScreen({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/board/view/comment_edit_page.dart b/lib/board/view/comment_edit_page.dart index 58f28dd4..ddfd3e9e 100644 --- a/lib/board/view/comment_edit_page.dart +++ b/lib/board/view/comment_edit_page.dart @@ -13,11 +13,11 @@ class CommentEditPage extends StatefulWidget { final Topic? topic; const CommentEditPage({ - Key? key, + super.key, required this.isEditing, this.comment, this.topic, - }) : super(key: key); + }); @override State createState() => _CommentEditPageState(); @@ -122,12 +122,11 @@ class _EditPage extends StatelessWidget { final GlobalKey formKey; const _EditPage({ - Key? key, required this.isEditing, this.comment, this.bodyController, required this.formKey, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -166,9 +165,8 @@ class _PreviewPage extends StatefulWidget { final TextEditingController? bodyController; const _PreviewPage({ - Key? key, this.bodyController, - }) : super(key: key); + }); @override __PreviewPageState createState() => __PreviewPageState(); diff --git a/lib/board/view/home_page.dart b/lib/board/view/home_page.dart index e2aaf575..fead6738 100644 --- a/lib/board/view/home_page.dart +++ b/lib/board/view/home_page.dart @@ -35,8 +35,8 @@ class BoardHomePage extends Page { class BoardHomeScreen extends StatelessWidget { const BoardHomeScreen({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/board/view/settings/comment_order_page.dart b/lib/board/view/settings/comment_order_page.dart index b455a3b4..a94ba78c 100644 --- a/lib/board/view/settings/comment_order_page.dart +++ b/lib/board/view/settings/comment_order_page.dart @@ -5,7 +5,7 @@ import 'package:smarthome/widgets/home_page.dart'; import 'package:smarthome/widgets/settings/settings.dart'; class CommentOrderPage extends StatelessWidget { - const CommentOrderPage({Key? key}) : super(key: key); + const CommentOrderPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/board/view/topic_detail_page.dart b/lib/board/view/topic_detail_page.dart index 0dcb5269..51ab965f 100644 --- a/lib/board/view/topic_detail_page.dart +++ b/lib/board/view/topic_detail_page.dart @@ -60,9 +60,9 @@ class TopicDetailScreen extends StatelessWidget { final String topicId; const TopicDetailScreen({ - Key? key, + super.key, required this.topicId, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -432,10 +432,10 @@ class TopicDetailScreen extends StatelessWidget { class CommentOrder extends StatelessWidget { const CommentOrder({ - Key? key, + super.key, required this.topicId, required this.descending, - }) : super(key: key); + }); final String topicId; final bool descending; diff --git a/lib/board/view/topic_edit_page.dart b/lib/board/view/topic_edit_page.dart index 9adf8345..b83c7542 100644 --- a/lib/board/view/topic_edit_page.dart +++ b/lib/board/view/topic_edit_page.dart @@ -12,10 +12,10 @@ class TopicEditPage extends StatefulWidget { final Topic? topic; const TopicEditPage({ - Key? key, + super.key, required this.isEditing, this.topic, - }) : super(key: key); + }); @override State createState() => _TopicEditPageState(); @@ -122,13 +122,12 @@ class _EditPage extends StatelessWidget { final GlobalKey formKey; const _EditPage({ - Key? key, required this.isEditing, this.topic, required this.titleController, required this.descriptionController, required this.formKey, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -183,10 +182,9 @@ class _PreviewPage extends StatefulWidget { final TextEditingController descriptionController; const _PreviewPage({ - Key? key, required this.titleController, required this.descriptionController, - }) : super(key: key); + }); @override __PreviewPageState createState() => __PreviewPageState(); diff --git a/lib/board/view/widgets/comment_item.dart b/lib/board/view/widgets/comment_item.dart index db0a8cd9..93d8a61a 100644 --- a/lib/board/view/widgets/comment_item.dart +++ b/lib/board/view/widgets/comment_item.dart @@ -15,11 +15,11 @@ class CommentItem extends StatelessWidget { final void Function()? onEdit; const CommentItem({ - Key? key, + super.key, required this.comment, required this.showMenu, this.onEdit, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/board/view/widgets/item_title.dart b/lib/board/view/widgets/item_title.dart index 8ff91fea..477fcecf 100644 --- a/lib/board/view/widgets/item_title.dart +++ b/lib/board/view/widgets/item_title.dart @@ -11,12 +11,12 @@ class ItemTitle extends StatelessWidget { final Function(Menu)? onSelected; const ItemTitle({ - Key? key, + super.key, required this.user, required this.createdAt, required this.editedAt, this.onSelected, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/board/view/widgets/topic_item.dart b/lib/board/view/widgets/topic_item.dart index f7c34b0c..4f6cf001 100644 --- a/lib/board/view/widgets/topic_item.dart +++ b/lib/board/view/widgets/topic_item.dart @@ -10,10 +10,10 @@ class TopicItem extends StatelessWidget { final bool showBody; const TopicItem({ - Key? key, + super.key, required this.topic, this.showBody = false, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/core/view/admin_page.dart b/lib/core/view/admin_page.dart index ec1ead85..a2d9017a 100644 --- a/lib/core/view/admin_page.dart +++ b/lib/core/view/admin_page.dart @@ -22,8 +22,8 @@ class AdminPage extends Page { class AdminScreen extends StatefulWidget { const AdminScreen({ - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _AdminScreenState(); diff --git a/lib/core/view/login_page.dart b/lib/core/view/login_page.dart index ae3d0cc2..ecb3284d 100644 --- a/lib/core/view/login_page.dart +++ b/lib/core/view/login_page.dart @@ -25,8 +25,8 @@ class LoginPage extends Page { class LoginScreen extends StatefulWidget { const LoginScreen({ - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _LoginScreenState(); @@ -76,10 +76,10 @@ class ApiUrlForm extends StatefulWidget { final VoidCallback onTapNext; const ApiUrlForm({ - Key? key, + super.key, required this.apiUrl, required this.onTapNext, - }) : super(key: key); + }); @override State createState() => _ApiUrlFormState(); @@ -163,7 +163,7 @@ class _ApiUrlFormState extends State { class LoginForm extends StatefulWidget { final Function onTapBack; - const LoginForm({Key? key, required this.onTapBack}) : super(key: key); + const LoginForm({super.key, required this.onTapBack}); @override State createState() => _LoginFormState(); diff --git a/lib/core/view/settings/admin_url_page.dart b/lib/core/view/settings/admin_url_page.dart index 91bb3627..e4215b51 100644 --- a/lib/core/view/settings/admin_url_page.dart +++ b/lib/core/view/settings/admin_url_page.dart @@ -4,7 +4,7 @@ import 'package:smarthome/app/settings/settings_controller.dart'; import 'package:smarthome/widgets/text_edit_page.dart'; class AdminUrlPage extends StatelessWidget { - const AdminUrlPage({Key? key}) : super(key: key); + const AdminUrlPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/core/view/settings/api_url_page.dart b/lib/core/view/settings/api_url_page.dart index 173f8931..b6854ddc 100644 --- a/lib/core/view/settings/api_url_page.dart +++ b/lib/core/view/settings/api_url_page.dart @@ -5,7 +5,7 @@ import 'package:smarthome/core/core.dart'; import 'package:smarthome/widgets/text_edit_page.dart'; class ApiUrlPage extends StatelessWidget { - const ApiUrlPage({Key? key}) : super(key: key); + const ApiUrlPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/core/view/settings/default_page.dart b/lib/core/view/settings/default_page.dart index 96ff8208..8b519672 100644 --- a/lib/core/view/settings/default_page.dart +++ b/lib/core/view/settings/default_page.dart @@ -6,7 +6,7 @@ import 'package:smarthome/widgets/home_page.dart'; import 'package:smarthome/widgets/settings/settings.dart'; class DefaultPage extends StatelessWidget { - const DefaultPage({Key? key}) : super(key: key); + const DefaultPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/core/view/settings/mipush_page.dart b/lib/core/view/settings/mipush_page.dart index 005b51b8..b564d959 100644 --- a/lib/core/view/settings/mipush_page.dart +++ b/lib/core/view/settings/mipush_page.dart @@ -5,7 +5,7 @@ import 'package:smarthome/core/bloc/blocs.dart'; import 'package:smarthome/widgets/home_page.dart'; class MiPushPage extends StatelessWidget { - const MiPushPage({Key? key}) : super(key: key); + const MiPushPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/core/view/settings/mipush_settings_tile.dart b/lib/core/view/settings/mipush_settings_tile.dart index 82a894a3..79452638 100644 --- a/lib/core/view/settings/mipush_settings_tile.dart +++ b/lib/core/view/settings/mipush_settings_tile.dart @@ -5,7 +5,7 @@ import 'package:smarthome/core/view/settings/mipush_page.dart'; import 'package:smarthome/widgets/settings/settings.dart'; class MiPushSettingsTile extends StatelessWidget { - const MiPushSettingsTile({Key? key}) : super(key: key); + const MiPushSettingsTile({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/core/view/settings/session_page.dart b/lib/core/view/settings/session_page.dart index 7cc78ee4..2d9c230d 100644 --- a/lib/core/view/settings/session_page.dart +++ b/lib/core/view/settings/session_page.dart @@ -7,7 +7,7 @@ import 'package:smarthome/widgets/error_message_button.dart'; import 'package:smarthome/widgets/home_page.dart'; class SessionPage extends StatelessWidget { - const SessionPage({Key? key}) : super(key: key); + const SessionPage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/core/view/settings/settings_page.dart b/lib/core/view/settings/settings_page.dart index b478d010..98f4f242 100644 --- a/lib/core/view/settings/settings_page.dart +++ b/lib/core/view/settings/settings_page.dart @@ -37,7 +37,7 @@ class SettingsPage extends Page { } class SettingsScreen extends StatelessWidget { - const SettingsScreen({Key? key}) : super(key: key); + const SettingsScreen({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/core/view/settings/theme_mode.dart b/lib/core/view/settings/theme_mode.dart index 51e695da..cf1d6a60 100644 --- a/lib/core/view/settings/theme_mode.dart +++ b/lib/core/view/settings/theme_mode.dart @@ -6,7 +6,7 @@ import 'package:smarthome/widgets/home_page.dart'; import 'package:smarthome/widgets/settings/settings.dart'; class ThemeModePage extends StatelessWidget { - const ThemeModePage({Key? key}) : super(key: key); + const ThemeModePage({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/iot/view/home_page.dart b/lib/iot/view/home_page.dart index 337f4f88..04a9d003 100644 --- a/lib/iot/view/home_page.dart +++ b/lib/iot/view/home_page.dart @@ -50,7 +50,7 @@ class IotHomePage extends Page { } class IotHomeScreen extends StatelessWidget { - const IotHomeScreen({Key? key}) : super(key: key); + const IotHomeScreen({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/routers/information_parser.dart b/lib/routers/information_parser.dart index 028bdab1..b7a017c7 100644 --- a/lib/routers/information_parser.dart +++ b/lib/routers/information_parser.dart @@ -10,7 +10,7 @@ class MyRouteInformationParser extends RouteInformationParser { Future parseRouteInformation( RouteInformation routeInformation) async { _log.fine('parseRouteInformation: ${routeInformation.location}'); - return parseUrl(routeInformation.location!); + return parseUrl(routeInformation.location); } @override diff --git a/lib/storage/view/consumable_edit_page.dart b/lib/storage/view/consumable_edit_page.dart index 54739f58..a861e5ec 100644 --- a/lib/storage/view/consumable_edit_page.dart +++ b/lib/storage/view/consumable_edit_page.dart @@ -12,9 +12,9 @@ class ConsumableEditPage extends StatefulWidget { final Item item; const ConsumableEditPage({ - Key? key, + super.key, required this.item, - }) : super(key: key); + }); @override State createState() => _ConsumableEditPageState(); diff --git a/lib/storage/view/consumables_page.dart b/lib/storage/view/consumables_page.dart index ed86d855..9f3a9558 100644 --- a/lib/storage/view/consumables_page.dart +++ b/lib/storage/view/consumables_page.dart @@ -30,8 +30,8 @@ class ConsumablesPage extends Page { class ConsumablesScreen extends StatelessWidget { const ConsumablesScreen({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/home_page.dart b/lib/storage/view/home_page.dart index fce8ef2c..4102a9e9 100644 --- a/lib/storage/view/home_page.dart +++ b/lib/storage/view/home_page.dart @@ -37,7 +37,7 @@ class StorageHomePage extends Page { } class StorageHomeScreen extends StatelessWidget { - const StorageHomeScreen({Key? key}) : super(key: key); + const StorageHomeScreen({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/item_datail_page.dart b/lib/storage/view/item_datail_page.dart index 5ea007f2..fd7fa9ca 100644 --- a/lib/storage/view/item_datail_page.dart +++ b/lib/storage/view/item_datail_page.dart @@ -54,9 +54,9 @@ class ItemDetailScreen extends StatelessWidget { final String itemId; const ItemDetailScreen({ - Key? key, + super.key, required this.itemId, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -201,7 +201,7 @@ class ItemDetailScreen extends StatelessWidget { class _ItemDetailList extends StatelessWidget { final Item item; - const _ItemDetailList({Key? key, required this.item}) : super(key: key); + const _ItemDetailList({required this.item}); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/item_edit_page.dart b/lib/storage/view/item_edit_page.dart index 91a9313d..e8000211 100644 --- a/lib/storage/view/item_edit_page.dart +++ b/lib/storage/view/item_edit_page.dart @@ -22,12 +22,11 @@ class ItemEditPage extends StatefulWidget { final Storage? storage; const ItemEditPage({ - Key? key, + super.key, required this.isEditing, this.item, this.storage, - }) : assert(item != null || !isEditing), - super(key: key); + }) : assert(item != null || !isEditing); @override State createState() => _ItemEditPageState(); diff --git a/lib/storage/view/picture_add_page.dart b/lib/storage/view/picture_add_page.dart index 07c63ec9..7bdf228f 100644 --- a/lib/storage/view/picture_add_page.dart +++ b/lib/storage/view/picture_add_page.dart @@ -43,9 +43,9 @@ class PictureAddScreen extends StatefulWidget { final String itemId; const PictureAddScreen({ - Key? key, + super.key, required this.itemId, - }) : super(key: key); + }); @override State createState() => _PictureAddScreenState(); diff --git a/lib/storage/view/picture_page.dart b/lib/storage/view/picture_page.dart index 36cfa7b5..7411e4b3 100644 --- a/lib/storage/view/picture_page.dart +++ b/lib/storage/view/picture_page.dart @@ -50,7 +50,7 @@ class PicturePage extends Page { } class PictureScreen extends StatelessWidget { - const PictureScreen({Key? key}) : super(key: key); + const PictureScreen({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/recycle_bin_page.dart b/lib/storage/view/recycle_bin_page.dart index 7f573288..03ea84e9 100644 --- a/lib/storage/view/recycle_bin_page.dart +++ b/lib/storage/view/recycle_bin_page.dart @@ -42,8 +42,8 @@ class RecycleBinPage extends Page { class RecycleBinScreen extends StatelessWidget { const RecycleBinScreen({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/search_page.dart b/lib/storage/view/search_page.dart index 685de908..1c115694 100644 --- a/lib/storage/view/search_page.dart +++ b/lib/storage/view/search_page.dart @@ -29,8 +29,8 @@ class SearchPage extends Page { class SearchScreen extends StatefulWidget { const SearchScreen({ - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _SearchScreenState(); diff --git a/lib/storage/view/storage_datail_page.dart b/lib/storage/view/storage_datail_page.dart index 82843752..64c9d4a7 100644 --- a/lib/storage/view/storage_datail_page.dart +++ b/lib/storage/view/storage_datail_page.dart @@ -52,9 +52,9 @@ class StorageDetailScreen extends StatelessWidget { final String storageId; const StorageDetailScreen({ - Key? key, + super.key, required this.storageId, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/storage_edit_page.dart b/lib/storage/view/storage_edit_page.dart index 40644fca..65c0d053 100644 --- a/lib/storage/view/storage_edit_page.dart +++ b/lib/storage/view/storage_edit_page.dart @@ -14,10 +14,10 @@ class StorageEditPage extends StatefulWidget { final Storage? storage; const StorageEditPage({ - Key? key, + super.key, required this.isEditing, required this.storage, - }) : super(key: key); + }); @override State createState() => _StorageEditPageState(); diff --git a/lib/storage/view/widgets/add_storage_icon_button.dart b/lib/storage/view/widgets/add_storage_icon_button.dart index e7dfbf46..556cedfb 100644 --- a/lib/storage/view/widgets/add_storage_icon_button.dart +++ b/lib/storage/view/widgets/add_storage_icon_button.dart @@ -9,9 +9,9 @@ class AddStorageIconButton extends StatelessWidget { final Storage? storage; const AddStorageIconButton({ - Key? key, + super.key, this.storage, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/widgets/search_icon_button.dart b/lib/storage/view/widgets/search_icon_button.dart index bb80b1ce..9b9338b2 100644 --- a/lib/storage/view/widgets/search_icon_button.dart +++ b/lib/storage/view/widgets/search_icon_button.dart @@ -3,7 +3,7 @@ import 'package:smarthome/routers/delegate.dart'; import 'package:smarthome/storage/view/search_page.dart'; class SearchIconButton extends StatelessWidget { - const SearchIconButton({Key? key}) : super(key: key); + const SearchIconButton({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/widgets/storage_item_list.dart b/lib/storage/view/widgets/storage_item_list.dart index 1f31658a..1a7c0d6e 100644 --- a/lib/storage/view/widgets/storage_item_list.dart +++ b/lib/storage/view/widgets/storage_item_list.dart @@ -13,14 +13,14 @@ class StorageItemList extends StatelessWidget { final VoidCallback? onFetch; const StorageItemList({ - Key? key, + super.key, this.items, this.storages, this.term = '', this.isHighlight = false, this.hasReachedMax = true, this.onFetch, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -51,10 +51,9 @@ class _HighlightStorageItemListItem extends StatelessWidget { final String term; const _HighlightStorageItemListItem({ - Key? key, required this.item, required this.term, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -104,9 +103,8 @@ class _StorageItemListItem extends StatelessWidget { final dynamic item; const _StorageItemListItem({ - Key? key, required this.item, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/storage/view/widgets/storage_picker_formfield.dart b/lib/storage/view/widgets/storage_picker_formfield.dart index d9db2734..def15330 100644 --- a/lib/storage/view/widgets/storage_picker_formfield.dart +++ b/lib/storage/view/widgets/storage_picker_formfield.dart @@ -41,10 +41,10 @@ class StorageDialog extends StatefulWidget { final List storages; const StorageDialog({ - Key? key, + super.key, this.storage, required this.storages, - }) : super(key: key); + }); @override State createState() => _StorageDialogState(); @@ -125,19 +125,14 @@ class _StorageDialogState extends State { class StorageFormField extends FormField { StorageFormField({ // From super - Key? key, - FormFieldValidator? validator, - Storage? initialValue, - AutovalidateMode? autovalidateMode, - bool enabled = true, + super.key, + super.validator, + super.initialValue, + super.autovalidateMode, + super.enabled, InputDecoration? decoration = const InputDecoration(), this.onChanged, }) : super( - key: key, - autovalidateMode: autovalidateMode, - initialValue: initialValue, - enabled: enabled, - validator: validator, builder: (field) { final _StorageFieldState state = field as _StorageFieldState; final InputDecoration effectiveDecoration = (decoration ?? diff --git a/lib/utils/exceptions.dart b/lib/utils/exceptions.dart index 4220f46f..85b37b63 100644 --- a/lib/utils/exceptions.dart +++ b/lib/utils/exceptions.dart @@ -7,15 +7,15 @@ class MyException implements Exception { /// 认证异常 class AuthenticationException extends MyException { - const AuthenticationException(String message) : super(message); + const AuthenticationException(super.message); } /// 服务器异常 class ServerException extends MyException { - const ServerException(String message) : super(message); + const ServerException(super.message); } /// 网络异常 class NetworkException extends MyException { - const NetworkException(String message) : super(message); + const NetworkException(super.message); } diff --git a/lib/widgets/avatar.dart b/lib/widgets/avatar.dart index 88cd5f02..ed0ade8d 100644 --- a/lib/widgets/avatar.dart +++ b/lib/widgets/avatar.dart @@ -8,9 +8,9 @@ class MyCircleAvatar extends StatelessWidget { final String? avatarUrl; const MyCircleAvatar({ - Key? key, + super.key, required this.avatarUrl, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/bottom_loader.dart b/lib/widgets/bottom_loader.dart index 26e2d315..857d3868 100644 --- a/lib/widgets/bottom_loader.dart +++ b/lib/widgets/bottom_loader.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; class BottomLoader extends StatelessWidget { const BottomLoader({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/drawer.dart b/lib/widgets/drawer.dart index 867fb8da..16556564 100644 --- a/lib/widgets/drawer.dart +++ b/lib/widgets/drawer.dart @@ -12,7 +12,7 @@ import 'package:smarthome/utils/launch_url.dart'; import 'package:smarthome/widgets/avatar.dart'; class MyDrawer extends StatelessWidget { - const MyDrawer({Key? key}) : super(key: key); + const MyDrawer({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/dropdown_search.dart b/lib/widgets/dropdown_search.dart index fe16e772..b78c87cc 100644 --- a/lib/widgets/dropdown_search.dart +++ b/lib/widgets/dropdown_search.dart @@ -13,7 +13,7 @@ class MyDropdownSearch extends StatelessWidget { final AutovalidateMode autoValidateMode; const MyDropdownSearch({ - Key? key, + super.key, this.label, this.asyncItems, this.onChanged, @@ -21,7 +21,7 @@ class MyDropdownSearch extends StatelessWidget { this.showClearButton = false, this.validator, this.autoValidateMode = AutovalidateMode.disabled, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/error_message_button.dart b/lib/widgets/error_message_button.dart index b09a355a..2c1b36e4 100644 --- a/lib/widgets/error_message_button.dart +++ b/lib/widgets/error_message_button.dart @@ -7,10 +7,10 @@ class ErrorMessageButton extends StatelessWidget { final String message; const ErrorMessageButton({ - Key? key, + super.key, required this.onPressed, required this.message, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/infinite_list.dart b/lib/widgets/infinite_list.dart index c35d6e83..fe5150af 100644 --- a/lib/widgets/infinite_list.dart +++ b/lib/widgets/infinite_list.dart @@ -18,7 +18,7 @@ class InfiniteList extends StatefulWidget { final double threshold; const InfiniteList({ - Key? key, + super.key, required this.items, this.top, this.botton, @@ -26,7 +26,7 @@ class InfiniteList extends StatefulWidget { this.hasReachedMax = true, this.onFetch, this.threshold = 200, - }) : super(key: key); + }); @override State> createState() => _InfiniteListState(); @@ -107,13 +107,13 @@ class SliverInfiniteList extends StatefulWidget { final int invisibleItemsThreshold; const SliverInfiniteList({ - Key? key, + super.key, required this.items, required this.itemBuilder, this.hasReachedMax = true, this.onFetch, this.invisibleItemsThreshold = 3, - }) : super(key: key); + }); @override State> createState() => _SliverInfiniteListState(); diff --git a/lib/widgets/rounded_raised_button.dart b/lib/widgets/rounded_raised_button.dart index 3104a8ec..db5cd687 100644 --- a/lib/widgets/rounded_raised_button.dart +++ b/lib/widgets/rounded_raised_button.dart @@ -5,10 +5,10 @@ class RoundedRaisedButton extends StatelessWidget { final Function? onPressed; const RoundedRaisedButton({ - Key? key, + super.key, this.child, this.onPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -29,10 +29,10 @@ class SliverCenterRoundedRaisedButton extends StatelessWidget { final Function? onPressed; const SliverCenterRoundedRaisedButton({ - Key? key, + super.key, this.child, this.onPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/settings/settings_list.dart b/lib/widgets/settings/settings_list.dart index 7a5474e4..d06a0552 100644 --- a/lib/widgets/settings/settings_list.dart +++ b/lib/widgets/settings/settings_list.dart @@ -4,9 +4,9 @@ class SettingsList extends StatelessWidget { final List sections; const SettingsList({ - Key? key, + super.key, required this.sections, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/settings/settings_section.dart b/lib/widgets/settings/settings_section.dart index da2445f9..1e7f3fda 100644 --- a/lib/widgets/settings/settings_section.dart +++ b/lib/widgets/settings/settings_section.dart @@ -5,10 +5,10 @@ class SettingsSection extends StatelessWidget { final List tiles; const SettingsSection({ - Key? key, + super.key, this.title, required this.tiles, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/settings/settings_tile.dart b/lib/widgets/settings/settings_tile.dart index a4e7f984..b19046de 100644 --- a/lib/widgets/settings/settings_tile.dart +++ b/lib/widgets/settings/settings_tile.dart @@ -7,12 +7,12 @@ class SettingsTile extends StatelessWidget { final Widget? trailing; const SettingsTile({ - Key? key, + super.key, required this.title, this.subtitle, this.onPressed, this.trailing, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/substring_highlight.dart b/lib/widgets/substring_highlight.dart index 0bfab2ca..eeb9b45b 100644 --- a/lib/widgets/substring_highlight.dart +++ b/lib/widgets/substring_highlight.dart @@ -9,10 +9,10 @@ class SubstringHighlight extends StatelessWidget { final String term; const SubstringHighlight({ - Key? key, + super.key, required this.text, required this.term, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/tab_selector.dart b/lib/widgets/tab_selector.dart index 6a8589a1..5023ff5e 100644 --- a/lib/widgets/tab_selector.dart +++ b/lib/widgets/tab_selector.dart @@ -6,10 +6,10 @@ class TabSelector extends StatelessWidget { final Function(AppTab) onTabSelected; const TabSelector({ - Key? key, + super.key, required this.activeTab, required this.onTabSelected, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/text_edit_page.dart b/lib/widgets/text_edit_page.dart index 3bd3bc5e..fa9491e7 100644 --- a/lib/widgets/text_edit_page.dart +++ b/lib/widgets/text_edit_page.dart @@ -12,7 +12,7 @@ class TextEditPage extends StatefulWidget { final TextInputType? keyboardType; const TextEditPage({ - Key? key, + super.key, required this.title, required this.initialValue, required this.description, @@ -20,7 +20,7 @@ class TextEditPage extends StatefulWidget { this.validator, this.inputFormatters, this.keyboardType, - }) : super(key: key); + }); @override State createState() => _TextEditPageState(); diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index 930d2071..903f4899 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -92,7 +97,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS From 1a1bda627b85c4e8cf21a58d4a5ec76c3d23773b Mon Sep 17 00:00:00 2001 From: uy_sun Date: Tue, 5 Dec 2023 13:09:25 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20Uri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routers/delegate.dart | 3 ++- lib/routers/information_parser.dart | 40 +++++++++++++++-------------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/lib/routers/delegate.dart b/lib/routers/delegate.dart index 5f7e1528..515bbdd7 100644 --- a/lib/routers/delegate.dart +++ b/lib/routers/delegate.dart @@ -93,7 +93,8 @@ class MyRouterDelegate extends RouterDelegate } Future navigateNewPath(String url) async { - final routePath = parseUrl(url); + final uri = Uri.parse(url); + final routePath = parseUrl(uri); await setNewRoutePath(routePath); notifyListeners(); } diff --git a/lib/routers/information_parser.dart b/lib/routers/information_parser.dart index b7a017c7..21f57f6d 100644 --- a/lib/routers/information_parser.dart +++ b/lib/routers/information_parser.dart @@ -9,8 +9,8 @@ class MyRouteInformationParser extends RouteInformationParser { @override Future parseRouteInformation( RouteInformation routeInformation) async { - _log.fine('parseRouteInformation: ${routeInformation.location}'); - return parseUrl(routeInformation.location); + _log.fine('parseRouteInformation: ${routeInformation.uri}'); + return parseUrl(routeInformation.uri); } @override @@ -19,50 +19,52 @@ class MyRouteInformationParser extends RouteInformationParser { if (configuration is HomeRoutePath) { switch (configuration.appTab) { case AppTab.blog: - return const RouteInformation(location: '/blog'); + return RouteInformation(uri: Uri(path: '/blog')); case AppTab.iot: - return const RouteInformation(location: '/iot'); + return RouteInformation(uri: Uri(path: '/iot')); case AppTab.storage: - return const RouteInformation(location: '/storage'); + return RouteInformation(uri: Uri(path: '/storage')); case AppTab.board: - return const RouteInformation(location: '/board'); + return RouteInformation(uri: Uri(path: '/board')); default: } } else if (configuration is StorageRoutePath) { - return RouteInformation(location: '/storage/${configuration.storageId}'); + return RouteInformation( + uri: Uri(path: '/storage/${configuration.storageId}')); } else if (configuration is ItemRoutePath) { - return RouteInformation(location: '/item/${configuration.itemId}'); + return RouteInformation(uri: Uri(path: '/item/${configuration.itemId}')); } else if (configuration is TopicRoutePath) { - return RouteInformation(location: '/topic/${configuration.topicId}'); + return RouteInformation( + uri: Uri(path: '/topic/${configuration.topicId}')); } else if (configuration is AppRoutePath) { switch (configuration.appPage) { case AppPage.login: - return const RouteInformation(location: '/login'); + return RouteInformation(uri: Uri(path: '/login')); case AppPage.consumables: - return const RouteInformation(location: '/consumables'); + return RouteInformation(uri: Uri(path: '/consumables')); case AppPage.recycleBin: - return const RouteInformation(location: '/recyclebin'); + return RouteInformation(uri: Uri(path: '/recyclebin')); } } else if (configuration is SettingsRoutePath) { switch (configuration.appSettings) { case AppSettings.home: - return const RouteInformation(location: '/settings'); + return RouteInformation(uri: Uri(path: '/settings')); case AppSettings.iot: - return const RouteInformation(location: '/settings/iot'); + return RouteInformation(uri: Uri(path: '/settings/iot')); case AppSettings.blog: - return const RouteInformation(location: '/settings/blog'); + return RouteInformation(uri: Uri(path: '/settings/blog')); default: } } else if (configuration is PictureRoutePath) { - return RouteInformation(location: '/picture/${configuration.pictureId}'); + return RouteInformation( + uri: Uri(path: '/picture/${configuration.pictureId}')); } - return const RouteInformation(location: '/'); + return RouteInformation(uri: Uri(path: '/')); } } /// 将 URL 转换成 RoutePath -RoutePath parseUrl(String location) { - final uri = Uri.parse(location); +RoutePath parseUrl(Uri uri) { if (uri.pathSegments.length == 1) { if (uri.pathSegments[0] == 'iot') return HomeRoutePath(appTab: AppTab.iot); if (uri.pathSegments[0] == 'board') { From 0f633c5f2f31b8458a352cfa69d8a1727367aa29 Mon Sep 17 00:00:00 2001 From: uy_sun Date: Tue, 5 Dec 2023 13:13:11 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=87=8D=E6=96=B0=E7=94=9F=E6=88=90=20json?= =?UTF-8?q?=5Fserializable=20=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/board/model/board.g.dart | 2 +- lib/core/model/push.g.dart | 2 +- lib/iot/model/iot.g.dart | 2 +- lib/storage/model/storage.g.dart | 2 +- lib/user/model/user.g.dart | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/board/model/board.g.dart b/lib/board/model/board.g.dart index 960b2966..1be18fdf 100644 --- a/lib/board/model/board.g.dart +++ b/lib/board/model/board.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of board; +part of 'board.dart'; // ************************************************************************** // JsonSerializableGenerator diff --git a/lib/core/model/push.g.dart b/lib/core/model/push.g.dart index 57daf492..5c014e13 100644 --- a/lib/core/model/push.g.dart +++ b/lib/core/model/push.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of push; +part of 'push.dart'; // ************************************************************************** // JsonSerializableGenerator diff --git a/lib/iot/model/iot.g.dart b/lib/iot/model/iot.g.dart index c7976697..8056defe 100644 --- a/lib/iot/model/iot.g.dart +++ b/lib/iot/model/iot.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of iot; +part of 'iot.dart'; // ************************************************************************** // JsonSerializableGenerator diff --git a/lib/storage/model/storage.g.dart b/lib/storage/model/storage.g.dart index 7defbdfe..f3ec32f5 100644 --- a/lib/storage/model/storage.g.dart +++ b/lib/storage/model/storage.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of storage; +part of 'storage.dart'; // ************************************************************************** // JsonSerializableGenerator diff --git a/lib/user/model/user.g.dart b/lib/user/model/user.g.dart index adbe1a7b..f466f73a 100644 --- a/lib/user/model/user.g.dart +++ b/lib/user/model/user.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of user; +part of 'user.dart'; // ************************************************************************** // JsonSerializableGenerator From b47d0b0e908f71c60632a0723c4237d7917f9b32 Mon Sep 17 00:00:00 2001 From: uy_sun Date: Tue, 5 Dec 2023 13:40:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=87=B3=20PopScope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://docs.flutter.dev/release/breaking-changes/android-predictive-back --- lib/core/view/admin_page.dart | 18 ++++++++++++------ lib/widgets/home_page.dart | 19 +++++++++++++++++-- pubspec.yaml | 2 +- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/lib/core/view/admin_page.dart b/lib/core/view/admin_page.dart index a2d9017a..72e43284 100644 --- a/lib/core/view/admin_page.dart +++ b/lib/core/view/admin_page.dart @@ -54,13 +54,19 @@ class _AdminScreenState extends State { } controller.loadRequest(Uri.parse(settings.adminUrl)); return Scaffold( - body: WillPopScope( - onWillPop: () async { - if (await controller.canGoBack()) { - await controller.goBack(); - return false; + body: PopScope( + canPop: false, + onPopInvoked: (bool didPop) async { + if (didPop) { + return; + } + final NavigatorState navigator = Navigator.of(context); + final bool canGoBack = await controller.canGoBack(); + if (canGoBack) { + controller.goBack(); + } else { + navigator.pop(); } - return true; }, child: SafeArea( child: WebViewWidget(controller: controller), diff --git a/lib/widgets/home_page.dart b/lib/widgets/home_page.dart index 9ca7f088..178ef758 100644 --- a/lib/widgets/home_page.dart +++ b/lib/widgets/home_page.dart @@ -77,8 +77,23 @@ class MySliverScaffold extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( drawer: drawer, - body: WillPopScope( - onWillPop: onWillPop, + body: PopScope( + canPop: false, + onPopInvoked: (bool didPop) async { + if (didPop) { + return; + } + final NavigatorState navigator = Navigator.of(context); + final onWillPopCopy = onWillPop; + if (onWillPopCopy == null) { + navigator.pop(); + } else { + final shouldPop = await onWillPopCopy(); + if (shouldPop) { + navigator.pop(); + } + } + }, child: ConditionalParentWidget( condition: onRefresh != null, conditionalBuilder: (child) { diff --git a/pubspec.yaml b/pubspec.yaml index cee8b8c2..5e41e633 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/he0119/smart-home-flutter publish_to: "none" environment: - sdk: ">=3.0.0 <4.0.0" + sdk: ">=3.2.0 <4.0.0" dependencies: flutter: From 56cd94069eeb2ee19e5c4b5655fee023f099a11b Mon Sep 17 00:00:00 2001 From: uy_sun Date: Tue, 5 Dec 2023 13:54:47 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20Uri.parse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://docs.flutter.dev/release/breaking-changes/route-information-uri --- lib/routers/delegate.dart | 2 +- lib/routers/information_parser.dart | 36 ++++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/routers/delegate.dart b/lib/routers/delegate.dart index 515bbdd7..67db2904 100644 --- a/lib/routers/delegate.dart +++ b/lib/routers/delegate.dart @@ -94,7 +94,7 @@ class MyRouterDelegate extends RouterDelegate Future navigateNewPath(String url) async { final uri = Uri.parse(url); - final routePath = parseUrl(uri); + final routePath = parseUri(uri); await setNewRoutePath(routePath); notifyListeners(); } diff --git a/lib/routers/information_parser.dart b/lib/routers/information_parser.dart index 21f57f6d..47cbb3b3 100644 --- a/lib/routers/information_parser.dart +++ b/lib/routers/information_parser.dart @@ -10,7 +10,7 @@ class MyRouteInformationParser extends RouteInformationParser { Future parseRouteInformation( RouteInformation routeInformation) async { _log.fine('parseRouteInformation: ${routeInformation.uri}'); - return parseUrl(routeInformation.uri); + return parseUri(routeInformation.uri); } @override @@ -19,52 +19,52 @@ class MyRouteInformationParser extends RouteInformationParser { if (configuration is HomeRoutePath) { switch (configuration.appTab) { case AppTab.blog: - return RouteInformation(uri: Uri(path: '/blog')); + return RouteInformation(uri: Uri.parse('/blog')); case AppTab.iot: - return RouteInformation(uri: Uri(path: '/iot')); + return RouteInformation(uri: Uri.parse('/iot')); case AppTab.storage: - return RouteInformation(uri: Uri(path: '/storage')); + return RouteInformation(uri: Uri.parse('/storage')); case AppTab.board: - return RouteInformation(uri: Uri(path: '/board')); + return RouteInformation(uri: Uri.parse('/board')); default: } } else if (configuration is StorageRoutePath) { return RouteInformation( - uri: Uri(path: '/storage/${configuration.storageId}')); + uri: Uri.parse('/storage/${configuration.storageId}')); } else if (configuration is ItemRoutePath) { - return RouteInformation(uri: Uri(path: '/item/${configuration.itemId}')); + return RouteInformation(uri: Uri.parse('/item/${configuration.itemId}')); } else if (configuration is TopicRoutePath) { return RouteInformation( - uri: Uri(path: '/topic/${configuration.topicId}')); + uri: Uri.parse('/topic/${configuration.topicId}')); } else if (configuration is AppRoutePath) { switch (configuration.appPage) { case AppPage.login: - return RouteInformation(uri: Uri(path: '/login')); + return RouteInformation(uri: Uri.parse('/login')); case AppPage.consumables: - return RouteInformation(uri: Uri(path: '/consumables')); + return RouteInformation(uri: Uri.parse('/consumables')); case AppPage.recycleBin: - return RouteInformation(uri: Uri(path: '/recyclebin')); + return RouteInformation(uri: Uri.parse('/recyclebin')); } } else if (configuration is SettingsRoutePath) { switch (configuration.appSettings) { case AppSettings.home: - return RouteInformation(uri: Uri(path: '/settings')); + return RouteInformation(uri: Uri.parse('/settings')); case AppSettings.iot: - return RouteInformation(uri: Uri(path: '/settings/iot')); + return RouteInformation(uri: Uri.parse('/settings/iot')); case AppSettings.blog: - return RouteInformation(uri: Uri(path: '/settings/blog')); + return RouteInformation(uri: Uri.parse('/settings/blog')); default: } } else if (configuration is PictureRoutePath) { return RouteInformation( - uri: Uri(path: '/picture/${configuration.pictureId}')); + uri: Uri.parse('/picture/${configuration.pictureId}')); } - return RouteInformation(uri: Uri(path: '/')); + return RouteInformation(uri: Uri.parse('/')); } } -/// 将 URL 转换成 RoutePath -RoutePath parseUrl(Uri uri) { +/// 将 URI 转换成 RoutePath +RoutePath parseUri(Uri uri) { if (uri.pathSegments.length == 1) { if (uri.pathSegments[0] == 'iot') return HomeRoutePath(appTab: AppTab.iot); if (uri.pathSegments[0] == 'board') {