From 3f33cac3ed3cc83189ee8a316953c43c72b0841d Mon Sep 17 00:00:00 2001 From: shilangyu Date: Wed, 11 May 2022 22:11:07 +0200 Subject: [PATCH 1/8] Upgrade to flutter 3 --- .github/workflows/ci.yml | 4 ---- .github/workflows/release.yml | 4 ---- README.md | 6 +----- linux/flutter/generated_plugins.cmake | 8 ++++++++ pubspec.lock | 20 ++++++++++---------- pubspec.yaml | 4 ++-- windows/flutter/generated_plugins.cmake | 8 ++++++++ 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 931bfb7..9ad4bdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,10 +91,6 @@ jobs: sudo apt-get update -y sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev - - name: Enable linux support - run: | - flutter config --enable-linux-desktop - - name: Build run: | flutter build linux --release --target lib/main_prod.dart diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8a10b3..cc3245e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,10 +90,6 @@ jobs: sudo apt-get update -y sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev - - name: Enable linux support - run: | - flutter config --enable-linux-desktop - - name: Build run: | flutter build linux --release --target lib/main_prod.dart diff --git a/README.md b/README.md index fe48f30..0eef476 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,7 @@ The apk will be in `build/app/outputs/flutter-apk/app-prod-release.apk` ### Linux 1. Make sure you have the additional [linux requirements](https://flutter.dev/desktop#additional-linux-requirements) (verify with `flutter doctor`) -2. Enable linux desktop: - ```sh - flutter config --enable-linux-desktop - ``` -3. Build: `flutter build linux --target lib/main_prod.dart --release` +2. Build: `flutter build linux --target lib/main_prod.dart --release` The executable will be in `build/linux/x64/release/bundle/lemmur` (be aware, however, that this executable is not standalone) diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 1fc8ed3..f16b4c3 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST url_launcher_linux ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/pubspec.lock b/pubspec.lock index c83feb4..786366b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -147,7 +147,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" convert: dependency: transitive description: @@ -196,7 +196,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" ffi: dependency: transitive description: @@ -447,7 +447,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" json_annotation: dependency: "direct main" description: @@ -510,7 +510,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" matrix4_transform: dependency: "direct main" description: @@ -615,7 +615,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" path_provider: dependency: transitive description: @@ -865,7 +865,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -907,7 +907,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.9" timeago: dependency: "direct main" description: @@ -991,7 +991,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" watcher: dependency: transitive description: @@ -1042,5 +1042,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.16.0 <3.0.0" - flutter: ">=2.10.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 2eed916..f69b76a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,8 +18,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 0.8.0+19 environment: - sdk: ">=2.16.0 <3.0.0" - flutter: ">=2.10.0 <3.0.0" + sdk: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0 <4.0.0" dependencies: # widgets diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 411af46..88b22e5 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST url_launcher_windows ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) From 4533be634e8b733873e516b68a4ffdc6b6b0e427 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Wed, 11 May 2022 22:23:18 +0200 Subject: [PATCH 2/8] Enable new lints --- analysis_options.yaml | 3 ++ lib/comment_tree.dart | 4 +-- lib/pages/communities_list.dart | 10 ++++--- lib/pages/communities_tab.dart | 8 +++-- lib/pages/community/community_about_tab.dart | 3 +- lib/pages/community/community_more_menu.dart | 3 +- .../create_post_community_picker.dart | 2 +- .../create_post_instance_picker.dart | 2 +- lib/pages/full_post/comment_section.dart | 2 +- lib/pages/instance/instance_more_menu.dart | 2 +- lib/pages/manage_account.dart | 5 ++-- lib/pages/modlog/modlog_table.dart | 2 +- lib/pages/settings/blocks/block_tile.dart | 4 +-- lib/pages/settings/settings.dart | 3 +- lib/pages/users_list.dart | 5 ++-- lib/util/async_store_listener.dart | 6 ++-- lib/util/goto.dart | 1 - lib/util/mobx_provider.dart | 30 +++++++------------ lib/util/observer_consumers.dart | 12 ++++---- lib/widgets/about_tile.dart | 2 +- lib/widgets/avatar.dart | 4 +-- lib/widgets/cached_network_image.dart | 4 +-- lib/widgets/comment/comment.dart | 4 +-- lib/widgets/comment/comment_actions.dart | 2 +- .../comment/comment_more_menu_button.dart | 5 ++-- lib/widgets/editor.dart | 4 +-- lib/widgets/fullscreenable_image.dart | 4 +-- lib/widgets/pull_to_refresh.dart | 4 +-- lib/widgets/radio_picker.dart | 4 +-- lib/widgets/sortable_infinite_list.dart | 12 +++----- lib/widgets/tile_action.dart | 4 +-- lib/widgets/user_tile.dart | 4 +-- 32 files changed, 74 insertions(+), 90 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 09d6844..4beae06 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -112,12 +112,15 @@ linter: - unnecessary_string_interpolations - unnecessary_this - unrelated_type_equality_checks + - use_colored_box + - use_enums - use_full_hex_values_for_flutter_colors - use_is_even_rather_than_modulo - use_named_constants - use_raw_strings - use_rethrow_when_possible - use_setters_to_change_properties + - use_super_parameters - use_test_throws_matchers - use_to_and_as_if_applicable - void_checks diff --git a/lib/comment_tree.dart b/lib/comment_tree.dart index f935dac..6bbbcde 100644 --- a/lib/comment_tree.dart +++ b/lib/comment_tree.dart @@ -7,10 +7,8 @@ enum CommentSortType { top, new_, old, - chat, -} + chat; -extension on CommentSortType { /// returns a compare function for sorting a CommentTree according /// to the comment sort type int Function(CommentTree a, CommentTree b) get sortFunction { diff --git a/lib/pages/communities_list.dart b/lib/pages/communities_list.dart index 72c9d82..93f2ca6 100644 --- a/lib/pages/communities_list.dart +++ b/lib/pages/communities_list.dart @@ -11,8 +11,11 @@ class CommunitiesListPage extends StatelessWidget { final String title; final FetcherWithSorting fetcher; - const CommunitiesListPage({Key? key, required this.fetcher, this.title = ''}) - : super(key: key); + const CommunitiesListPage({ + super.key, + required this.fetcher, + this.title = '', + }); @override Widget build(BuildContext context) { @@ -42,8 +45,7 @@ class CommunitiesListPage extends StatelessWidget { class CommunitiesListItem extends StatelessWidget { final CommunityView community; - const CommunitiesListItem({Key? key, required this.community}) - : super(key: key); + const CommunitiesListItem({super.key, required this.community}); @override Widget build(BuildContext context) => ListTile( diff --git a/lib/pages/communities_tab.dart b/lib/pages/communities_tab.dart index 3aca777..d6bb871 100644 --- a/lib/pages/communities_tab.dart +++ b/lib/pages/communities_tab.dart @@ -241,9 +241,11 @@ class _CommunitySubscribeToggle extends HookWidget { final int communityId; final String instanceHost; - const _CommunitySubscribeToggle( - {required this.instanceHost, required this.communityId, Key? key}) - : super(key: key); + const _CommunitySubscribeToggle({ + required this.instanceHost, + required this.communityId, + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/pages/community/community_about_tab.dart b/lib/pages/community/community_about_tab.dart index a9462cc..954a738 100644 --- a/lib/pages/community/community_about_tab.dart +++ b/lib/pages/community/community_about_tab.dart @@ -15,8 +15,7 @@ import 'community_store.dart'; class CommmunityAboutTab extends StatelessWidget { final FullCommunityView fullCommunityView; - const CommmunityAboutTab(this.fullCommunityView, {Key? key}) - : super(key: key); + const CommmunityAboutTab(this.fullCommunityView, {super.key}); @override Widget build(BuildContext context) { diff --git a/lib/pages/community/community_more_menu.dart b/lib/pages/community/community_more_menu.dart index eb241b3..87834ca 100644 --- a/lib/pages/community/community_more_menu.dart +++ b/lib/pages/community/community_more_menu.dart @@ -14,8 +14,7 @@ import 'community_store.dart'; class CommunityMoreMenu extends HookWidget { final FullCommunityView fullCommunityView; - const CommunityMoreMenu({Key? key, required this.fullCommunityView}) - : super(key: key); + const CommunityMoreMenu({super.key, required this.fullCommunityView}); @override Widget build(BuildContext context) { diff --git a/lib/pages/create_post/create_post_community_picker.dart b/lib/pages/create_post/create_post_community_picker.dart index 4efc418..5082ecd 100644 --- a/lib/pages/create_post/create_post_community_picker.dart +++ b/lib/pages/create_post/create_post_community_picker.dart @@ -13,7 +13,7 @@ import '../../widgets/avatar.dart'; import 'create_post_store.dart'; class CreatePostCommunityPicker extends HookWidget { - const CreatePostCommunityPicker({Key? key}) : super(key: key); + const CreatePostCommunityPicker({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/pages/create_post/create_post_instance_picker.dart b/lib/pages/create_post/create_post_instance_picker.dart index 641aa50..dca166f 100644 --- a/lib/pages/create_post/create_post_instance_picker.dart +++ b/lib/pages/create_post/create_post_instance_picker.dart @@ -6,7 +6,7 @@ import '../../widgets/radio_picker.dart'; import 'create_post_store.dart'; class CreatePostInstancePicker extends StatelessWidget { - const CreatePostInstancePicker({Key? key}) : super(key: key); + const CreatePostInstancePicker({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/pages/full_post/comment_section.dart b/lib/pages/full_post/comment_section.dart index f34d909..d875779 100644 --- a/lib/pages/full_post/comment_section.dart +++ b/lib/pages/full_post/comment_section.dart @@ -27,7 +27,7 @@ class CommentSection extends StatelessWidget { CommentSortType.chat: _SortSelection(Icons.chat, L10nStrings.chat), }; - const CommentSection({Key? key}) : super(key: key); + const CommentSection({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/pages/instance/instance_more_menu.dart b/lib/pages/instance/instance_more_menu.dart index eee6fda..3558120 100644 --- a/lib/pages/instance/instance_more_menu.dart +++ b/lib/pages/instance/instance_more_menu.dart @@ -11,7 +11,7 @@ import '../../widgets/info_table_popup.dart'; class InstanceMoreMenu extends StatelessWidget { final FullSiteView site; - const InstanceMoreMenu({Key? key, required this.site}) : super(key: key); + const InstanceMoreMenu({super.key, required this.site}); @override Widget build(BuildContext context) { diff --git a/lib/pages/manage_account.dart b/lib/pages/manage_account.dart index 60871eb..e9a5121 100644 --- a/lib/pages/manage_account.dart +++ b/lib/pages/manage_account.dart @@ -86,7 +86,7 @@ class ManageAccountPage extends HookWidget { } class _ManageAccount extends HookWidget { - const _ManageAccount({Key? key, required this.user}) : super(key: key); + const _ManageAccount({required this.user}); final LocalUserSettingsView user; @@ -396,13 +396,12 @@ class _ImagePicker extends HookWidget { final ObjectRef informAcceptedRef; const _ImagePicker({ - Key? key, required this.initialUrl, required this.name, required this.user, required this.onChange, required this.informAcceptedRef, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/pages/modlog/modlog_table.dart b/lib/pages/modlog/modlog_table.dart index fb24363..ec71778 100644 --- a/lib/pages/modlog/modlog_table.dart +++ b/lib/pages/modlog/modlog_table.dart @@ -8,7 +8,7 @@ import '../../widgets/avatar.dart'; import 'modlog_entry.dart'; class ModlogTable extends StatelessWidget { - const ModlogTable({Key? key, required this.modlog}) : super(key: key); + const ModlogTable({super.key, required this.modlog}); final Modlog modlog; diff --git a/lib/pages/settings/blocks/block_tile.dart b/lib/pages/settings/blocks/block_tile.dart index 7fd0cc0..5c54671 100644 --- a/lib/pages/settings/blocks/block_tile.dart +++ b/lib/pages/settings/blocks/block_tile.dart @@ -10,7 +10,7 @@ import 'community_block_store.dart'; import 'user_block_store.dart'; class BlockPersonTile extends StatelessWidget { - const BlockPersonTile({Key? key}) : super(key: key); + const BlockPersonTile({super.key}); @override Widget build(BuildContext context) { @@ -40,7 +40,7 @@ class BlockPersonTile extends StatelessWidget { } class BlockCommunityTile extends HookWidget { - const BlockCommunityTile({Key? key}) : super(key: key); + const BlockCommunityTile({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index 33ac426..8cbc4eb 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -185,10 +185,9 @@ class _AccountOptions extends HookWidget { final String username; const _AccountOptions({ - Key? key, required this.instanceHost, required this.username, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/pages/users_list.dart b/lib/pages/users_list.dart index 15d1ea5..fa35047 100644 --- a/lib/pages/users_list.dart +++ b/lib/pages/users_list.dart @@ -12,8 +12,7 @@ class UsersListPage extends StatelessWidget { final String title; final Fetcher fetcher; - const UsersListPage({Key? key, required this.fetcher, this.title = ''}) - : super(key: key); + const UsersListPage({super.key, required this.fetcher, this.title = ''}); @override Widget build(BuildContext context) { @@ -41,7 +40,7 @@ class UsersListPage extends StatelessWidget { class UsersListItem extends StatelessWidget { final PersonViewSafe user; - const UsersListItem({Key? key, required this.user}) : super(key: key); + const UsersListItem({super.key, required this.user}); @override Widget build(BuildContext context) { diff --git a/lib/util/async_store_listener.dart b/lib/util/async_store_listener.dart index 88e4286..5ff1151 100644 --- a/lib/util/async_store_listener.dart +++ b/lib/util/async_store_listener.dart @@ -18,12 +18,12 @@ class AsyncStoreListener extends SingleChildStatelessWidget { )? onSuccess; const AsyncStoreListener({ - Key? key, + super.key, required this.asyncStore, this.successMessageBuilder, this.onSuccess, - Widget? child, - }) : super(key: key, child: child); + super.child, + }); @override Widget buildWithChild(BuildContext context, Widget? child) { diff --git a/lib/util/goto.dart b/lib/util/goto.dart index 7298816..037f5f7 100644 --- a/lib/util/goto.dart +++ b/lib/util/goto.dart @@ -59,7 +59,6 @@ void goToMedia(BuildContext context, String url) => Navigator.push( context, PageRouteBuilder( pageBuilder: (_, __, ___) => MediaViewPage(url), - transitionDuration: const Duration(milliseconds: 300), opaque: false, transitionsBuilder: (_, animation, __, child) => FadeTransition(opacity: animation, child: child), diff --git a/lib/util/mobx_provider.dart b/lib/util/mobx_provider.dart index 7afca1d..42e1684 100644 --- a/lib/util/mobx_provider.dart +++ b/lib/util/mobx_provider.dart @@ -8,34 +8,24 @@ import 'observer_consumers.dart'; /// Important: this will not make [context.watch] react to changes class MobxProvider extends Provider { MobxProvider({ - Key? key, - required Create create, - bool? lazy, - TransitionBuilder? builder, - Widget? child, + super.key, + required super.create, + super.lazy, + super.builder, + super.child, }) : super( - key: key, - create: create, dispose: (context, store) { if (store is DisposableStore) store.dispose(); }, - lazy: lazy, - builder: builder, - child: child, ); /// will not dispose the store MobxProvider.value({ - Key? key, - required T value, - TransitionBuilder? builder, - Widget? child, - }) : super.value( - key: key, - builder: builder, - value: value, - child: child, - ); + super.key, + required super.value, + super.builder, + super.child, + }) : super.value(); } /// tracks reactions and disposes them in [DisposableStore.dispose] diff --git a/lib/util/observer_consumers.dart b/lib/util/observer_consumers.dart index 56f645f..c157a18 100644 --- a/lib/util/observer_consumers.dart +++ b/lib/util/observer_consumers.dart @@ -14,10 +14,10 @@ class ObserverBuilder extends StatelessWidget { final MobxBuilder builder; const ObserverBuilder({ - Key? key, + super.key, this.store, required this.builder, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -38,11 +38,11 @@ class ObserverListener extends HookWidget { final Widget child; const ObserverListener({ - Key? key, + super.key, this.store, required this.listener, required this.child, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -64,11 +64,11 @@ class ObserverConsumer extends HookWidget { final MobxBuilder builder; const ObserverConsumer({ - Key? key, + super.key, this.store, required this.listener, required this.builder, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/about_tile.dart b/lib/widgets/about_tile.dart index 021a6c0..36085dc 100644 --- a/lib/widgets/about_tile.dart +++ b/lib/widgets/about_tile.dart @@ -96,7 +96,7 @@ class AboutTile extends HookWidget { class ChangelogPage extends StatelessWidget { final String changelog; - const ChangelogPage(this.changelog, {Key? key}) : super(key: key); + const ChangelogPage(this.changelog, {super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/avatar.dart b/lib/widgets/avatar.dart index 0499810..d9fe815 100644 --- a/lib/widgets/avatar.dart +++ b/lib/widgets/avatar.dart @@ -10,14 +10,14 @@ import 'cached_network_image.dart'; /// Can be disabled with `noBlank` class Avatar extends HookWidget { const Avatar({ - Key? key, + super.key, required this.url, this.radius = 25, this.noBlank = false, this.alwaysShow = false, this.padding = EdgeInsets.zero, this.onTap, - }) : super(key: key); + }); final String? url; final double radius; diff --git a/lib/widgets/cached_network_image.dart b/lib/widgets/cached_network_image.dart index 6886315..831fd8b 100644 --- a/lib/widgets/cached_network_image.dart +++ b/lib/widgets/cached_network_image.dart @@ -41,8 +41,8 @@ class CachedNetworkImage extends StatelessWidget { this.width, this.fit, this.cache = true, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/comment/comment.dart b/lib/widgets/comment/comment.dart index b0faa80..9bc0d01 100644 --- a/lib/widgets/comment/comment.dart +++ b/lib/widgets/comment/comment.dart @@ -35,8 +35,8 @@ class CommentWidget extends StatelessWidget { this.canBeMarkedAsRead = false, this.hideOnRead = false, this.userMentionId, - Key? key, - }) : super(key: key); + super.key, + }); CommentWidget.fromCommentView( CommentView cv, { diff --git a/lib/widgets/comment/comment_actions.dart b/lib/widgets/comment/comment_actions.dart index 6aff5df..6b21057 100644 --- a/lib/widgets/comment/comment_actions.dart +++ b/lib/widgets/comment/comment_actions.dart @@ -13,7 +13,7 @@ import 'comment_more_menu_button.dart'; import 'comment_store.dart'; class CommentActions extends HookWidget { - const CommentActions({Key? key}) : super(key: key); + const CommentActions({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/comment/comment_more_menu_button.dart b/lib/widgets/comment/comment_more_menu_button.dart index 9d51139..7e41ffd 100644 --- a/lib/widgets/comment/comment_more_menu_button.dart +++ b/lib/widgets/comment/comment_more_menu_button.dart @@ -18,7 +18,7 @@ import 'comment.dart'; import 'comment_store.dart'; class CommentMoreMenuButton extends HookWidget { - const CommentMoreMenuButton({Key? key}) : super(key: key); + const CommentMoreMenuButton({super.key}); @override Widget build(BuildContext context) { @@ -44,9 +44,8 @@ class _CommentMoreMenuPopup extends HookWidget { final CommentStore store; const _CommentMoreMenuPopup({ - Key? key, required this.store, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/editor.dart b/lib/widgets/editor.dart index f4d8a1f..145ab94 100644 --- a/lib/widgets/editor.dart +++ b/lib/widgets/editor.dart @@ -20,7 +20,7 @@ class Editor extends HookWidget { final String instanceHost; const Editor({ - Key? key, + super.key, this.controller, this.focusNode, this.onSubmitted, @@ -32,7 +32,7 @@ class Editor extends HookWidget { this.fancy = false, required this.instanceHost, this.autofocus = false, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/fullscreenable_image.dart b/lib/widgets/fullscreenable_image.dart index a6aa4cb..fac40b4 100644 --- a/lib/widgets/fullscreenable_image.dart +++ b/lib/widgets/fullscreenable_image.dart @@ -9,10 +9,10 @@ class FullscreenableImage extends StatelessWidget { final Widget child; const FullscreenableImage({ - Key? key, + super.key, required this.url, required this.child, - }) : super(key: key); + }); @override Widget build(BuildContext context) => InkWell( diff --git a/lib/widgets/pull_to_refresh.dart b/lib/widgets/pull_to_refresh.dart index 58bfcf6..fe7daad 100644 --- a/lib/widgets/pull_to_refresh.dart +++ b/lib/widgets/pull_to_refresh.dart @@ -6,10 +6,10 @@ class PullToRefresh extends StatelessWidget { final Widget child; const PullToRefresh({ - Key? key, + super.key, required this.onRefresh, required this.child, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/radio_picker.dart b/lib/widgets/radio_picker.dart index 2f10058..3c2a3e1 100644 --- a/lib/widgets/radio_picker.dart +++ b/lib/widgets/radio_picker.dart @@ -20,7 +20,7 @@ class RadioPicker extends StatelessWidget { final Widget? trailing; const RadioPicker({ - Key? key, + super.key, required this.values, required this.groupValue, required this.onChanged, @@ -28,7 +28,7 @@ class RadioPicker extends StatelessWidget { this.buttonBuilder, this.title, this.trailing, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/sortable_infinite_list.dart b/lib/widgets/sortable_infinite_list.dart index 4991bfd..de322ef 100644 --- a/lib/widgets/sortable_infinite_list.dart +++ b/lib/widgets/sortable_infinite_list.dart @@ -70,8 +70,8 @@ class SortableInfiniteList extends HookWidget { class InfinitePostList extends SortableInfiniteList { InfinitePostList({ - required FetcherWithSorting fetcher, - InfiniteScrollController? controller, + required super.fetcher, + super.controller, }) : super( itemBuilder: (post) => Column( children: [ @@ -79,8 +79,6 @@ class InfinitePostList extends SortableInfiniteList { const SizedBox(height: 20), ], ), - fetcher: fetcher, - controller: controller, noItems: const Text('there are no posts'), uniqueProp: (item) => item.post.apId, ); @@ -88,15 +86,13 @@ class InfinitePostList extends SortableInfiniteList { class InfiniteCommentList extends SortableInfiniteList { InfiniteCommentList({ - required FetcherWithSorting fetcher, - InfiniteScrollController? controller, + required super.fetcher, + super.controller, }) : super( itemBuilder: (comment) => CommentWidget( CommentTree(comment), detached: true, ), - fetcher: fetcher, - controller: controller, noItems: const Text('there are no comments'), uniqueProp: (item) => item.comment.apId, ); diff --git a/lib/widgets/tile_action.dart b/lib/widgets/tile_action.dart index 294aae3..c073254 100644 --- a/lib/widgets/tile_action.dart +++ b/lib/widgets/tile_action.dart @@ -14,14 +14,14 @@ class TileAction extends StatelessWidget { final Color? iconColor; const TileAction({ - Key? key, + super.key, this.delayedLoading, this.iconColor, required this.icon, required this.onPressed, required this.tooltip, this.loading = false, - }) : super(key: key); + }); @override Widget build(BuildContext context) => IconButton( diff --git a/lib/widgets/user_tile.dart b/lib/widgets/user_tile.dart index 2b0a444..6a53079 100644 --- a/lib/widgets/user_tile.dart +++ b/lib/widgets/user_tile.dart @@ -12,8 +12,8 @@ class PersonTile extends StatelessWidget { const PersonTile( this.person, { this.expanded = false, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { From 9f588a5ea81f9968c0ff41dce6fdcfd39cf8fcd8 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Wed, 11 May 2022 22:31:07 +0200 Subject: [PATCH 3/8] Upgrade deps --- pubspec.lock | 78 ++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 786366b..4f98c25 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -98,7 +98,7 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.2.3" + version: "8.3.0" characters: dependency: transitive description: @@ -161,7 +161,7 @@ packages: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.2" + version: "0.3.3" crypto: dependency: transitive description: @@ -182,14 +182,14 @@ packages: name: extended_image url: "https://pub.dartlang.org" source: hosted - version: "6.0.3" + version: "6.1.0" extended_image_library: dependency: transitive description: name: extended_image_library url: "https://pub.dartlang.org" source: hosted - version: "3.1.4" + version: "3.2.0" fake_async: dependency: transitive description: @@ -217,7 +217,7 @@ packages: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "4.3.1" + version: "4.5.1" fixnum: dependency: transitive description: @@ -290,7 +290,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" flutter_speed_dial: dependency: "direct main" description: @@ -321,14 +321,14 @@ packages: name: freezed url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" freezed_annotation: dependency: "direct main" description: name: freezed_annotation url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.3" frontend_server_client: dependency: transitive description: @@ -398,28 +398,28 @@ packages: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.8.5" + version: "0.8.5+2" image_picker_android: dependency: transitive description: name: image_picker_android url: "https://pub.dartlang.org" source: hosted - version: "0.8.4+11" + version: "0.8.4+13" image_picker_for_web: dependency: transitive description: name: image_picker_for_web url: "https://pub.dartlang.org" source: hosted - version: "2.1.6" + version: "2.1.8" image_picker_ios: dependency: transitive description: name: image_picker_ios url: "https://pub.dartlang.org" source: hosted - version: "0.8.5" + version: "0.8.5+2" image_picker_platform_interface: dependency: transitive description: @@ -479,9 +479,9 @@ packages: lemmy_api_client: dependency: "direct main" description: - name: lemmy_api_client - url: "https://pub.dartlang.org" - source: hosted + path: "/home/shilangyu/coding/lemmy_api_client" + relative: false + source: path version: "0.20.0" logging: dependency: "direct main" @@ -531,7 +531,7 @@ packages: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" mobx: dependency: "direct main" description: @@ -622,56 +622,56 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.10" path_provider_android: dependency: transitive description: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "2.0.14" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.0.9" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "2.1.6" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "5.0.0" photo_view: dependency: "direct main" description: @@ -776,35 +776,35 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "2.0.15" shared_preferences_android: dependency: transitive description: name: shared_preferences_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.12" shared_preferences_ios: dependency: transitive description: name: shared_preferences_ios url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" shared_preferences_platform_interface: dependency: transitive description: @@ -818,14 +818,14 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" shelf: dependency: transitive description: @@ -935,35 +935,35 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" url_launcher_android: dependency: transitive description: name: url_launcher_android url: "https://pub.dartlang.org" source: hosted - version: "6.0.16" + version: "6.0.17" url_launcher_ios: dependency: transitive description: name: url_launcher_ios url: "https://pub.dartlang.org" source: hosted - version: "6.0.15" + version: "6.0.16" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" url_launcher_platform_interface: dependency: transitive description: @@ -977,14 +977,14 @@ packages: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.11" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" vector_math: dependency: transitive description: @@ -1033,7 +1033,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "5.4.1" yaml: dependency: transitive description: From 6136e4a408d3d81ca120ad5bd6a6f0d72ebf0535 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Fri, 13 May 2022 15:58:01 +0200 Subject: [PATCH 4/8] Bump mobx --- lib/pages/create_post/create_post_store.dart | 1 + .../create_post/create_post_store.g.dart | 29 +++-- lib/pages/full_post/full_post_store.dart | 1 - lib/pages/modlog/modlog_page_store.dart | 1 + lib/util/async_store.freezed.dart | 105 +++++++++--------- lib/widgets/comment/comment_store.dart | 1 + pubspec.lock | 47 ++++---- pubspec.yaml | 2 +- 8 files changed, 94 insertions(+), 93 deletions(-) diff --git a/lib/pages/create_post/create_post_store.dart b/lib/pages/create_post/create_post_store.dart index b0f2e06..f58ee88 100644 --- a/lib/pages/create_post/create_post_store.dart +++ b/lib/pages/create_post/create_post_store.dart @@ -16,6 +16,7 @@ abstract class _CreatePostStore with Store { _CreatePostStore({ required this.instanceHost, this.postToEdit, + // ignore: unused_element this.selectedCommunity, }) : title = postToEdit?.name ?? '', nsfw = postToEdit?.nsfw ?? false, diff --git a/lib/pages/create_post/create_post_store.g.dart b/lib/pages/create_post/create_post_store.g.dart index 6c26729..ae1c743 100644 --- a/lib/pages/create_post/create_post_store.g.dart +++ b/lib/pages/create_post/create_post_store.g.dart @@ -17,7 +17,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { name: '_CreatePostStore.hasUploadedImage')) .value; - final _$showFancyAtom = Atom(name: '_CreatePostStore.showFancy'); + late final _$showFancyAtom = + Atom(name: '_CreatePostStore.showFancy', context: context); @override bool get showFancy { @@ -32,7 +33,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$instanceHostAtom = Atom(name: '_CreatePostStore.instanceHost'); + late final _$instanceHostAtom = + Atom(name: '_CreatePostStore.instanceHost', context: context); @override String get instanceHost { @@ -47,8 +49,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$selectedCommunityAtom = - Atom(name: '_CreatePostStore.selectedCommunity'); + late final _$selectedCommunityAtom = + Atom(name: '_CreatePostStore.selectedCommunity', context: context); @override CommunityView? get selectedCommunity { @@ -63,7 +65,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$urlAtom = Atom(name: '_CreatePostStore.url'); + late final _$urlAtom = Atom(name: '_CreatePostStore.url', context: context); @override String get url { @@ -78,7 +80,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$titleAtom = Atom(name: '_CreatePostStore.title'); + late final _$titleAtom = + Atom(name: '_CreatePostStore.title', context: context); @override String get title { @@ -93,7 +96,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$bodyAtom = Atom(name: '_CreatePostStore.body'); + late final _$bodyAtom = Atom(name: '_CreatePostStore.body', context: context); @override String get body { @@ -108,7 +111,7 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$nsfwAtom = Atom(name: '_CreatePostStore.nsfw'); + late final _$nsfwAtom = Atom(name: '_CreatePostStore.nsfw', context: context); @override bool get nsfw { @@ -123,14 +126,16 @@ mixin _$CreatePostStore on _CreatePostStore, Store { }); } - final _$submitAsyncAction = AsyncAction('_CreatePostStore.submit'); + late final _$submitAsyncAction = + AsyncAction('_CreatePostStore.submit', context: context); @override Future submit(Jwt token) { return _$submitAsyncAction.run(() => super.submit(token)); } - final _$uploadImageAsyncAction = AsyncAction('_CreatePostStore.uploadImage'); + late final _$uploadImageAsyncAction = + AsyncAction('_CreatePostStore.uploadImage', context: context); @override Future uploadImage(String filePath, Jwt token) { @@ -138,8 +143,8 @@ mixin _$CreatePostStore on _CreatePostStore, Store { .run(() => super.uploadImage(filePath, token)); } - final _$_CreatePostStoreActionController = - ActionController(name: '_CreatePostStore'); + late final _$_CreatePostStoreActionController = + ActionController(name: '_CreatePostStore', context: context); @override Future?> searchCommunities( diff --git a/lib/pages/full_post/full_post_store.dart b/lib/pages/full_post/full_post_store.dart index 96cfc71..67caeab 100644 --- a/lib/pages/full_post/full_post_store.dart +++ b/lib/pages/full_post/full_post_store.dart @@ -14,7 +14,6 @@ abstract class _FullPostStore with Store { final String instanceHost; _FullPostStore({ - this.postStore, required this.postId, required this.instanceHost, }); diff --git a/lib/pages/modlog/modlog_page_store.dart b/lib/pages/modlog/modlog_page_store.dart index 840c58e..bd672f4 100644 --- a/lib/pages/modlog/modlog_page_store.dart +++ b/lib/pages/modlog/modlog_page_store.dart @@ -12,6 +12,7 @@ abstract class _ModlogPageStore with Store, DisposableStore { final String instanceHost; final int? communityId; + // ignore: unused_element _ModlogPageStore(this.instanceHost, [this.communityId]) { addReaction(reaction((_) => page, (_) => fetchPage())); } diff --git a/lib/util/async_store.freezed.dart b/lib/util/async_store.freezed.dart index 4df2195..b3a97ea 100644 --- a/lib/util/async_store.freezed.dart +++ b/lib/util/async_store.freezed.dart @@ -86,22 +86,22 @@ class _$AsyncStateCopyWithImpl } /// @nodoc -abstract class $AsyncStateInitialCopyWith { - factory $AsyncStateInitialCopyWith(AsyncStateInitial value, - $Res Function(AsyncStateInitial) then) = - _$AsyncStateInitialCopyWithImpl; +abstract class _$$AsyncStateInitialCopyWith { + factory _$$AsyncStateInitialCopyWith(_$AsyncStateInitial value, + $Res Function(_$AsyncStateInitial) then) = + __$$AsyncStateInitialCopyWithImpl; } /// @nodoc -class _$AsyncStateInitialCopyWithImpl +class __$$AsyncStateInitialCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateInitialCopyWith { - _$AsyncStateInitialCopyWithImpl( - AsyncStateInitial _value, $Res Function(AsyncStateInitial) _then) - : super(_value, (v) => _then(v as AsyncStateInitial)); + implements _$$AsyncStateInitialCopyWith { + __$$AsyncStateInitialCopyWithImpl(_$AsyncStateInitial _value, + $Res Function(_$AsyncStateInitial) _then) + : super(_value, (v) => _then(v as _$AsyncStateInitial)); @override - AsyncStateInitial get _value => super._value as AsyncStateInitial; + _$AsyncStateInitial get _value => super._value as _$AsyncStateInitial; } /// @nodoc @@ -125,7 +125,7 @@ class _$AsyncStateInitial @override bool operator ==(dynamic other) { return identical(this, other) || - (other.runtimeType == runtimeType && other is AsyncStateInitial); + (other.runtimeType == runtimeType && other is _$AsyncStateInitial); } @override @@ -211,30 +211,30 @@ abstract class AsyncStateInitial implements AsyncState { } /// @nodoc -abstract class $AsyncStateDataCopyWith { - factory $AsyncStateDataCopyWith( - AsyncStateData value, $Res Function(AsyncStateData) then) = - _$AsyncStateDataCopyWithImpl; +abstract class _$$AsyncStateDataCopyWith { + factory _$$AsyncStateDataCopyWith( + _$AsyncStateData value, $Res Function(_$AsyncStateData) then) = + __$$AsyncStateDataCopyWithImpl; $Res call({T data, String? errorTerm}); } /// @nodoc -class _$AsyncStateDataCopyWithImpl +class __$$AsyncStateDataCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateDataCopyWith { - _$AsyncStateDataCopyWithImpl( - AsyncStateData _value, $Res Function(AsyncStateData) _then) - : super(_value, (v) => _then(v as AsyncStateData)); + implements _$$AsyncStateDataCopyWith { + __$$AsyncStateDataCopyWithImpl( + _$AsyncStateData _value, $Res Function(_$AsyncStateData) _then) + : super(_value, (v) => _then(v as _$AsyncStateData)); @override - AsyncStateData get _value => super._value as AsyncStateData; + _$AsyncStateData get _value => super._value as _$AsyncStateData; @override $Res call({ Object? data = freezed, Object? errorTerm = freezed, }) { - return _then(AsyncStateData( + return _then(_$AsyncStateData( data == freezed ? _value.data : data // ignore: cast_nullable_to_non_nullable @@ -277,7 +277,7 @@ class _$AsyncStateData bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is AsyncStateData && + other is _$AsyncStateData && const DeepCollectionEquality().equals(other.data, data) && const DeepCollectionEquality().equals(other.errorTerm, errorTerm)); } @@ -290,8 +290,8 @@ class _$AsyncStateData @JsonKey(ignore: true) @override - $AsyncStateDataCopyWith> get copyWith => - _$AsyncStateDataCopyWithImpl>(this, _$identity); + _$$AsyncStateDataCopyWith> get copyWith => + __$$AsyncStateDataCopyWithImpl>(this, _$identity); @override @optionalTypeArgs @@ -375,27 +375,27 @@ abstract class AsyncStateData implements AsyncState { T get data => throw _privateConstructorUsedError; String? get errorTerm => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $AsyncStateDataCopyWith> get copyWith => + _$$AsyncStateDataCopyWith> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $AsyncStateLoadingCopyWith { - factory $AsyncStateLoadingCopyWith(AsyncStateLoading value, - $Res Function(AsyncStateLoading) then) = - _$AsyncStateLoadingCopyWithImpl; +abstract class _$$AsyncStateLoadingCopyWith { + factory _$$AsyncStateLoadingCopyWith(_$AsyncStateLoading value, + $Res Function(_$AsyncStateLoading) then) = + __$$AsyncStateLoadingCopyWithImpl; } /// @nodoc -class _$AsyncStateLoadingCopyWithImpl +class __$$AsyncStateLoadingCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateLoadingCopyWith { - _$AsyncStateLoadingCopyWithImpl( - AsyncStateLoading _value, $Res Function(AsyncStateLoading) _then) - : super(_value, (v) => _then(v as AsyncStateLoading)); + implements _$$AsyncStateLoadingCopyWith { + __$$AsyncStateLoadingCopyWithImpl(_$AsyncStateLoading _value, + $Res Function(_$AsyncStateLoading) _then) + : super(_value, (v) => _then(v as _$AsyncStateLoading)); @override - AsyncStateLoading get _value => super._value as AsyncStateLoading; + _$AsyncStateLoading get _value => super._value as _$AsyncStateLoading; } /// @nodoc @@ -419,7 +419,7 @@ class _$AsyncStateLoading @override bool operator ==(dynamic other) { return identical(this, other) || - (other.runtimeType == runtimeType && other is AsyncStateLoading); + (other.runtimeType == runtimeType && other is _$AsyncStateLoading); } @override @@ -505,29 +505,29 @@ abstract class AsyncStateLoading implements AsyncState { } /// @nodoc -abstract class $AsyncStateErrorCopyWith { - factory $AsyncStateErrorCopyWith( - AsyncStateError value, $Res Function(AsyncStateError) then) = - _$AsyncStateErrorCopyWithImpl; +abstract class _$$AsyncStateErrorCopyWith { + factory _$$AsyncStateErrorCopyWith(_$AsyncStateError value, + $Res Function(_$AsyncStateError) then) = + __$$AsyncStateErrorCopyWithImpl; $Res call({String errorTerm}); } /// @nodoc -class _$AsyncStateErrorCopyWithImpl +class __$$AsyncStateErrorCopyWithImpl extends _$AsyncStateCopyWithImpl - implements $AsyncStateErrorCopyWith { - _$AsyncStateErrorCopyWithImpl( - AsyncStateError _value, $Res Function(AsyncStateError) _then) - : super(_value, (v) => _then(v as AsyncStateError)); + implements _$$AsyncStateErrorCopyWith { + __$$AsyncStateErrorCopyWithImpl( + _$AsyncStateError _value, $Res Function(_$AsyncStateError) _then) + : super(_value, (v) => _then(v as _$AsyncStateError)); @override - AsyncStateError get _value => super._value as AsyncStateError; + _$AsyncStateError get _value => super._value as _$AsyncStateError; @override $Res call({ Object? errorTerm = freezed, }) { - return _then(AsyncStateError( + return _then(_$AsyncStateError( errorTerm == freezed ? _value.errorTerm : errorTerm // ignore: cast_nullable_to_non_nullable @@ -563,7 +563,7 @@ class _$AsyncStateError bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is AsyncStateError && + other is _$AsyncStateError && const DeepCollectionEquality().equals(other.errorTerm, errorTerm)); } @@ -573,8 +573,9 @@ class _$AsyncStateError @JsonKey(ignore: true) @override - $AsyncStateErrorCopyWith> get copyWith => - _$AsyncStateErrorCopyWithImpl>(this, _$identity); + _$$AsyncStateErrorCopyWith> get copyWith => + __$$AsyncStateErrorCopyWithImpl>( + this, _$identity); @override @optionalTypeArgs @@ -656,6 +657,6 @@ abstract class AsyncStateError implements AsyncState { String get errorTerm => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $AsyncStateErrorCopyWith> get copyWith => + _$$AsyncStateErrorCopyWith> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/widgets/comment/comment_store.dart b/lib/widgets/comment/comment_store.dart index f04575a..009f3a2 100644 --- a/lib/widgets/comment/comment_store.dart +++ b/lib/widgets/comment/comment_store.dart @@ -54,6 +54,7 @@ abstract class _CommentStore with Store { _CommentStore( this._accountsStore, { required CommentTree commentTree, + // ignore: unused_element this.userMentionId, required this.depth, required this.canBeMarkedAsRead, diff --git a/pubspec.lock b/pubspec.lock index 4f98c25..ca708ad 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "34.0.0" + version: "39.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "4.0.0" archive: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" async: dependency: transitive description: @@ -70,7 +70,7 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.8" build_runner: dependency: "direct dev" description: @@ -120,13 +120,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" clock: dependency: transitive description: @@ -175,21 +168,21 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.2.3" extended_image: dependency: "direct main" description: name: extended_image url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.2.0" extended_image_library: dependency: transitive description: name: extended_image_library url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.3.0" fake_async: dependency: transitive description: @@ -203,7 +196,7 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.1" file: dependency: transitive description: @@ -224,7 +217,7 @@ packages: name: fixnum url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" flutter: dependency: "direct main" description: flutter @@ -236,7 +229,7 @@ packages: name: flutter_hooks url: "https://pub.dartlang.org" source: hosted - version: "0.18.3" + version: "0.18.4" flutter_keyboard_visibility: dependency: transitive description: @@ -321,7 +314,7 @@ packages: name: freezed url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.3+1" freezed_annotation: dependency: "direct main" description: @@ -398,7 +391,7 @@ packages: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.8.5+2" + version: "0.8.5+3" image_picker_android: dependency: transitive description: @@ -426,7 +419,7 @@ packages: name: image_picker_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.4.4" + version: "2.5.0" intl: dependency: "direct main" description: @@ -479,10 +472,10 @@ packages: lemmy_api_client: dependency: "direct main" description: - path: "/home/shilangyu/coding/lemmy_api_client" - relative: false - source: path - version: "0.20.0" + name: lemmy_api_client + url: "https://pub.dartlang.org" + source: hosted + version: "0.21.0" logging: dependency: "direct main" description: @@ -545,7 +538,7 @@ packages: name: mobx_codegen url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.6+1" modal_bottom_sheet: dependency: "direct main" description: @@ -928,7 +921,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" url_launcher: dependency: "direct main" description: @@ -1040,7 +1033,7 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: dart: ">=2.17.0 <3.0.0" flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index f69b76a..b3b3033 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,7 @@ dependencies: # utils timeago: ^3.0.2 fuzzy: ^0.4.0-nullsafety.0 - lemmy_api_client: ^0.20.0 + lemmy_api_client: ^0.21.0 intl: ^0.17.0 matrix4_transform: ^2.0.0 json_annotation: ^4.5.0 From d113e01eeb0dccb504d802fd5edcabdd44c35595 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Fri, 15 Jul 2022 21:02:42 +0200 Subject: [PATCH 5/8] Bump native versions --- android/app/build.gradle | 6 +- android/app/src/main/AndroidManifest.xml | 1 + android/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- ios/Podfile.lock | 53 +++++++++ ios/Runner/Info.plist | 6 +- pubspec.lock | 104 +++++++++--------- 7 files changed, 116 insertions(+), 60 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 02e117f..5ffcb31 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 31 + compileSdkVersion Math.max(flutter.compileSdkVersion, 32) lintOptions { disable 'InvalidPackage' @@ -47,8 +47,8 @@ android { defaultConfig { applicationId "com.krawieck.lemmur" - minSdkVersion 16 - targetSdkVersion 30 + minSdkVersion Math.max(flutter.minSdkVersion, 16) + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 1aba7b4..5682757 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -13,6 +13,7 @@ CFBundleVersion $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS - + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -42,7 +42,9 @@ UIInterfaceOrientationLandscapeRight UIViewControllerBasedStatusBarAppearance - + + CADisableMinimumFrameDurationOnPhone + NSPhotoLibraryUsageDescription diff --git a/pubspec.lock b/pubspec.lock index ca708ad..0ecca42 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "39.0.0" + version: "41.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.2.0" archive: dependency: transitive description: @@ -56,7 +56,7 @@ packages: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" build_daemon: dependency: transitive description: @@ -70,14 +70,14 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.0.9" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.1.10" + version: "2.2.0" build_runner_core: dependency: transitive description: @@ -98,7 +98,7 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.3.0" + version: "8.4.0" characters: dependency: transitive description: @@ -147,14 +147,14 @@ packages: name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" cross_file: dependency: transitive description: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.3" + version: "0.3.3+1" crypto: dependency: transitive description: @@ -175,7 +175,7 @@ packages: name: extended_image url: "https://pub.dartlang.org" source: hosted - version: "6.2.0" + version: "6.2.1" extended_image_library: dependency: transitive description: @@ -210,7 +210,7 @@ packages: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "4.5.1" + version: "4.6.1" fixnum: dependency: transitive description: @@ -229,14 +229,14 @@ packages: name: flutter_hooks url: "https://pub.dartlang.org" source: hosted - version: "0.18.4" + version: "0.18.5+1" flutter_keyboard_visibility: dependency: transitive description: name: flutter_keyboard_visibility url: "https://pub.dartlang.org" source: hosted - version: "5.2.0" + version: "5.3.0" flutter_keyboard_visibility_platform_interface: dependency: transitive description: @@ -257,7 +257,7 @@ packages: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.9.2" + version: "0.9.3" flutter_localizations: dependency: "direct main" description: flutter @@ -269,21 +269,21 @@ packages: name: flutter_markdown url: "https://pub.dartlang.org" source: hosted - version: "0.6.10" + version: "0.6.10+2" flutter_mobx: dependency: "direct main" description: name: flutter_mobx url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6+1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.7" flutter_speed_dial: dependency: "direct main" description: @@ -302,7 +302,7 @@ packages: name: flutter_typeahead url: "https://pub.dartlang.org" source: hosted - version: "3.2.5" + version: "3.2.7" flutter_web_plugins: dependency: transitive description: flutter @@ -314,21 +314,21 @@ packages: name: freezed url: "https://pub.dartlang.org" source: hosted - version: "2.0.3+1" + version: "2.1.0+1" freezed_annotation: dependency: "direct main" description: name: freezed_annotation url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.0" frontend_server_client: dependency: transitive description: name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.3" fuzzy: dependency: "direct main" description: @@ -342,7 +342,7 @@ packages: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.0" graphs: dependency: transitive description: @@ -370,21 +370,21 @@ packages: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.1" image: dependency: transitive description: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.1.3" + version: "3.2.0" image_picker: dependency: "direct main" description: @@ -398,7 +398,7 @@ packages: name: image_picker_android url: "https://pub.dartlang.org" source: hosted - version: "0.8.4+13" + version: "0.8.5+1" image_picker_for_web: dependency: transitive description: @@ -412,7 +412,7 @@ packages: name: image_picker_ios url: "https://pub.dartlang.org" source: hosted - version: "0.8.5+2" + version: "0.8.5+6" image_picker_platform_interface: dependency: transitive description: @@ -447,14 +447,14 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.5.0" + version: "4.6.0" json_serializable: dependency: "direct dev" description: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "6.2.0" + version: "6.3.1" keyboard_dismisser: dependency: "direct main" description: @@ -531,21 +531,21 @@ packages: name: mobx url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.7+4" mobx_codegen: dependency: "direct dev" description: name: mobx_codegen url: "https://pub.dartlang.org" source: hosted - version: "2.0.6+1" + version: "2.0.7" modal_bottom_sheet: dependency: "direct main" description: name: modal_bottom_sheet url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.1.0" nested: dependency: "direct main" description: @@ -559,7 +559,7 @@ packages: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.0" package_info_plus: dependency: "direct main" description: @@ -615,28 +615,28 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.10" + version: "2.0.11" path_provider_android: dependency: transitive description: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.14" + version: "2.0.16" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.10" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.6" + version: "2.1.7" path_provider_macos: dependency: transitive description: @@ -657,7 +657,7 @@ packages: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.7" petitparser: dependency: transitive description: @@ -692,7 +692,7 @@ packages: name: pool url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.5.1" process: dependency: transitive description: @@ -706,7 +706,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.2" + version: "6.0.3" pub_semver: dependency: transitive description: @@ -727,7 +727,7 @@ packages: name: share_plus url: "https://pub.dartlang.org" source: hosted - version: "4.0.4" + version: "4.0.10" share_plus_linux: dependency: transitive description: @@ -741,28 +741,28 @@ packages: name: share_plus_macos url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.0.3" share_plus_web: dependency: transitive description: name: share_plus_web url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" share_plus_windows: dependency: transitive description: name: share_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" shared_preferences: dependency: "direct main" description: @@ -825,14 +825,14 @@ packages: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" sky_engine: dependency: transitive description: flutter @@ -928,7 +928,7 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.1.2" + version: "6.1.5" url_launcher_android: dependency: transitive description: @@ -942,7 +942,7 @@ packages: name: url_launcher_ios url: "https://pub.dartlang.org" source: hosted - version: "6.0.16" + version: "6.0.17" url_launcher_linux: dependency: transitive description: @@ -963,14 +963,14 @@ packages: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.0" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.12" url_launcher_windows: dependency: transitive description: @@ -1012,7 +1012,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.5.2" + version: "2.6.1" xdg_directories: dependency: transitive description: @@ -1026,7 +1026,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.4.1" + version: "6.1.0" yaml: dependency: transitive description: From 75622a735bbbf8fcf1d9aeb380752f5ae2d93fc8 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Fri, 15 Jul 2022 21:07:10 +0200 Subject: [PATCH 6/8] Bump deps --- pubspec.lock | 6 +++--- pubspec.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 0ecca42..22571ac 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -302,7 +302,7 @@ packages: name: flutter_typeahead url: "https://pub.dartlang.org" source: hosted - version: "3.2.7" + version: "4.0.0" flutter_web_plugins: dependency: transitive description: flutter @@ -461,7 +461,7 @@ packages: name: keyboard_dismisser url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "3.0.0" latinize: dependency: transitive description: @@ -671,7 +671,7 @@ packages: name: photo_view url: "https://pub.dartlang.org" source: hosted - version: "0.13.0" + version: "0.14.0" platform: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b3b3033..d997b90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,10 +24,10 @@ environment: dependencies: # widgets flutter_speed_dial: ^6.0.0 - photo_view: ^0.13.0 + photo_view: ^0.14.0 markdown: ^5.0.0 flutter_markdown: ^0.6.1 - flutter_typeahead: ^3.2.1 + flutter_typeahead: ^4.0.0 modal_bottom_sheet: ^2.0.0 # native @@ -51,7 +51,7 @@ dependencies: intl: ^0.17.0 matrix4_transform: ^2.0.0 json_annotation: ^4.5.0 - keyboard_dismisser: ^2.0.0 + keyboard_dismisser: ^3.0.0 freezed_annotation: ^2.0.1 logging: ^1.0.1 nested: ^1.0.0 From 9ed7b89d686f6b6a7819a5407d9fc36a8e1f8cdf Mon Sep 17 00:00:00 2001 From: shilangyu Date: Fri, 15 Jul 2022 21:21:02 +0200 Subject: [PATCH 7/8] Regenerate files --- lib/pages/community/community_store.g.dart | 2 +- lib/pages/create_post/create_post_store.g.dart | 2 +- lib/pages/full_post/full_post_store.g.dart | 2 +- lib/pages/instance/instance_store.g.dart | 2 +- lib/pages/log_console/log_console_page_store.g.dart | 2 +- lib/pages/modlog/modlog_page_store.g.dart | 2 +- lib/pages/settings/blocks/blocks_store.g.dart | 2 +- lib/pages/settings/blocks/community_block_store.g.dart | 2 +- lib/pages/settings/blocks/user_block_store.g.dart | 2 +- lib/stores/config_store.g.dart | 4 ++-- lib/util/async_store.freezed.dart | 6 +++--- lib/util/async_store.g.dart | 2 +- lib/widgets/comment/comment_store.g.dart | 2 +- lib/widgets/post/post_store.g.dart | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/pages/community/community_store.g.dart b/lib/pages/community/community_store.g.dart index bba012e..9ed66a3 100644 --- a/lib/pages/community/community_store.g.dart +++ b/lib/pages/community/community_store.g.dart @@ -6,7 +6,7 @@ part of 'community_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$CommunityStore on _CommunityStore, Store { late final _$refreshAsyncAction = diff --git a/lib/pages/create_post/create_post_store.g.dart b/lib/pages/create_post/create_post_store.g.dart index ae1c743..3cda314 100644 --- a/lib/pages/create_post/create_post_store.g.dart +++ b/lib/pages/create_post/create_post_store.g.dart @@ -6,7 +6,7 @@ part of 'create_post_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$CreatePostStore on _CreatePostStore, Store { Computed? _$hasUploadedImageComputed; diff --git a/lib/pages/full_post/full_post_store.g.dart b/lib/pages/full_post/full_post_store.g.dart index ed533af..22d0436 100644 --- a/lib/pages/full_post/full_post_store.g.dart +++ b/lib/pages/full_post/full_post_store.g.dart @@ -6,7 +6,7 @@ part of 'full_post_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$FullPostStore on _FullPostStore, Store { Computed?>? _$commentTreeComputed; diff --git a/lib/pages/instance/instance_store.g.dart b/lib/pages/instance/instance_store.g.dart index 7dcadb0..d4e63ec 100644 --- a/lib/pages/instance/instance_store.g.dart +++ b/lib/pages/instance/instance_store.g.dart @@ -6,7 +6,7 @@ part of 'instance_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$InstanceStore on _InstanceStore, Store { late final _$fetchAsyncAction = diff --git a/lib/pages/log_console/log_console_page_store.g.dart b/lib/pages/log_console/log_console_page_store.g.dart index c146648..912ff66 100644 --- a/lib/pages/log_console/log_console_page_store.g.dart +++ b/lib/pages/log_console/log_console_page_store.g.dart @@ -6,7 +6,7 @@ part of 'log_console_page_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$LogConsolePageStore on _LogConsolePageStore, Store { late final _$_LogConsolePageStoreActionController = diff --git a/lib/pages/modlog/modlog_page_store.g.dart b/lib/pages/modlog/modlog_page_store.g.dart index 9643bb8..21081eb 100644 --- a/lib/pages/modlog/modlog_page_store.g.dart +++ b/lib/pages/modlog/modlog_page_store.g.dart @@ -6,7 +6,7 @@ part of 'modlog_page_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$ModlogPageStore on _ModlogPageStore, Store { Computed? _$hasPreviousPageComputed; diff --git a/lib/pages/settings/blocks/blocks_store.g.dart b/lib/pages/settings/blocks/blocks_store.g.dart index dd380c0..bddd8ca 100644 --- a/lib/pages/settings/blocks/blocks_store.g.dart +++ b/lib/pages/settings/blocks/blocks_store.g.dart @@ -6,7 +6,7 @@ part of 'blocks_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$BlocksStore on _BlocksStore, Store { Computed?>? _$blockedUsersComputed; diff --git a/lib/pages/settings/blocks/community_block_store.g.dart b/lib/pages/settings/blocks/community_block_store.g.dart index da6b641..39a132f 100644 --- a/lib/pages/settings/blocks/community_block_store.g.dart +++ b/lib/pages/settings/blocks/community_block_store.g.dart @@ -6,7 +6,7 @@ part of 'community_block_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$CommunityBlockStore on _CommunityBlockStore, Store { late final _$blockedAtom = diff --git a/lib/pages/settings/blocks/user_block_store.g.dart b/lib/pages/settings/blocks/user_block_store.g.dart index c7a9ed6..42663da 100644 --- a/lib/pages/settings/blocks/user_block_store.g.dart +++ b/lib/pages/settings/blocks/user_block_store.g.dart @@ -6,7 +6,7 @@ part of 'user_block_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$UserBlockStore on _UserBlockStore, Store { late final _$blockedAtom = diff --git a/lib/stores/config_store.g.dart b/lib/stores/config_store.g.dart index dde6b99..6288496 100644 --- a/lib/stores/config_store.g.dart +++ b/lib/stores/config_store.g.dart @@ -19,7 +19,7 @@ ConfigStore _$ConfigStoreFromJson(Map json) => ConfigStore() Map _$ConfigStoreToJson(ConfigStore instance) => { - 'theme': _$ThemeModeEnumMap[instance.theme], + 'theme': _$ThemeModeEnumMap[instance.theme]!, 'amoledDarkMode': instance.amoledDarkMode, 'locale': const LocaleConverter().toJson(instance.locale), 'showAvatars': instance.showAvatars, @@ -38,7 +38,7 @@ const _$ThemeModeEnumMap = { // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$ConfigStore on _ConfigStore, Store { late final _$themeAtom = Atom(name: '_ConfigStore.theme', context: context); diff --git a/lib/util/async_store.freezed.dart b/lib/util/async_store.freezed.dart index b3a97ea..8f141ba 100644 --- a/lib/util/async_store.freezed.dart +++ b/lib/util/async_store.freezed.dart @@ -372,8 +372,8 @@ abstract class AsyncStateData implements AsyncState { const factory AsyncStateData(final T data, [final String? errorTerm]) = _$AsyncStateData; - T get data => throw _privateConstructorUsedError; - String? get errorTerm => throw _privateConstructorUsedError; + T get data; + String? get errorTerm; @JsonKey(ignore: true) _$$AsyncStateDataCopyWith> get copyWith => throw _privateConstructorUsedError; @@ -655,7 +655,7 @@ class _$AsyncStateError abstract class AsyncStateError implements AsyncState { const factory AsyncStateError(final String errorTerm) = _$AsyncStateError; - String get errorTerm => throw _privateConstructorUsedError; + String get errorTerm; @JsonKey(ignore: true) _$$AsyncStateErrorCopyWith> get copyWith => throw _privateConstructorUsedError; diff --git a/lib/util/async_store.g.dart b/lib/util/async_store.g.dart index 185e317..d07a3e9 100644 --- a/lib/util/async_store.g.dart +++ b/lib/util/async_store.g.dart @@ -6,7 +6,7 @@ part of 'async_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$AsyncStore on _AsyncStore, Store { Computed? _$isLoadingComputed; diff --git a/lib/widgets/comment/comment_store.g.dart b/lib/widgets/comment/comment_store.g.dart index fbb3087..faa41b3 100644 --- a/lib/widgets/comment/comment_store.g.dart +++ b/lib/widgets/comment/comment_store.g.dart @@ -6,7 +6,7 @@ part of 'comment_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$CommentStore on _CommentStore, Store { Computed? _$isMineComputed; diff --git a/lib/widgets/post/post_store.g.dart b/lib/widgets/post/post_store.g.dart index e12197f..03e305e 100644 --- a/lib/widgets/post/post_store.g.dart +++ b/lib/widgets/post/post_store.g.dart @@ -6,7 +6,7 @@ part of 'post_store.dart'; // StoreGenerator // ************************************************************************** -// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic +// ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic, no_leading_underscores_for_local_identifiers mixin _$PostStore on _PostStore, Store { Computed? _$urlDomainComputed; From 22030d629137a8f8c7978d90c2767f51ae5d641c Mon Sep 17 00:00:00 2001 From: shilangyu Date: Fri, 15 Jul 2022 21:32:51 +0200 Subject: [PATCH 8/8] Fix ios build --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ad4bdd..9198ac3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: subosito/flutter-action@v1 + - uses: subosito/flutter-action@v2 with: channel: "stable"