Upgrade to flutter 2.10 (#325)

This commit is contained in:
Marcin Wojnarowski 2022-04-30 15:44:03 +02:00 committed by GitHub
parent 553340aa38
commit 11d63e0522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 51 additions and 41 deletions

View File

@ -110,10 +110,6 @@ jobs:
with: with:
channel: "stable" channel: "stable"
- name: Enable windows support
run: |
flutter config --enable-windows-desktop
- name: Build - name: Build
run: | run: |
flutter build windows --release --target lib/main_prod.dart flutter build windows --release --target lib/main_prod.dart

View File

@ -119,10 +119,6 @@ jobs:
with: with:
channel: "stable" channel: "stable"
- name: Enable windows support
run: |
flutter config --enable-windows-desktop
- name: Build - name: Build
run: | run: |
flutter build windows --release --target lib/main_prod.dart flutter build windows --release --target lib/main_prod.dart

View File

@ -55,11 +55,7 @@ The executable will be in `build/linux/x64/release/bundle/lemmur` (be aware, how
### Windows ### Windows
1. Make sure you have the additional [windows requirements](https://flutter.dev/desktop#additional-windows-requirements) (verify with `flutter doctor`) 1. Make sure you have the additional [windows requirements](https://flutter.dev/desktop#additional-windows-requirements) (verify with `flutter doctor`)
2. Enable windows desktop: 2. Build: `flutter build windows --target lib/main_prod.dart --release`
```sh
flutter config --enable-windows-desktop
```
3. Build: `flutter build windows --target lib/main_prod.dart --release`
The executable will be in `build\windows\runner\Release\lemmur.exe` (be aware, however, that this executable is not standalone) The executable will be in `build\windows\runner\Release\lemmur.exe` (be aware, however, that this executable is not standalone)

View File

@ -5,6 +5,7 @@ linter:
- avoid_catching_errors - avoid_catching_errors
- avoid_equals_and_hash_code_on_mutable_classes - avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes - avoid_escaping_inner_quotes
- avoid_final_parameters
- avoid_function_literals_in_foreach_calls - avoid_function_literals_in_foreach_calls
- avoid_init_to_null - avoid_init_to_null
- avoid_null_checks_in_equality_operators - avoid_null_checks_in_equality_operators
@ -29,6 +30,7 @@ linter:
- cascade_invocations - cascade_invocations
- cast_nullable_to_non_nullable - cast_nullable_to_non_nullable
- constant_identifier_names - constant_identifier_names
- conditional_uri_does_not_exist
- curly_braces_in_flow_control_structures - curly_braces_in_flow_control_structures
- directives_ordering - directives_ordering
- empty_catches - empty_catches
@ -41,8 +43,11 @@ linter:
- invariant_booleans - invariant_booleans
- library_names - library_names
- library_prefixes - library_prefixes
- literal_only_boolean_expressions
- non_constant_identifier_names - non_constant_identifier_names
- noop_primitive_operations - noop_primitive_operations
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- null_check_on_nullable_type_parameter - null_check_on_nullable_type_parameter
- omit_local_variable_types - omit_local_variable_types
- one_member_abstracts - one_member_abstracts
@ -81,7 +86,9 @@ linter:
- prefer_spread_collections - prefer_spread_collections
- prefer_typing_uninitialized_variables - prefer_typing_uninitialized_variables
- recursive_getters - recursive_getters
- secure_pubspec_urls
- sized_box_for_whitespace - sized_box_for_whitespace
- sized_box_shrink_expand
- slash_for_doc_comments - slash_for_doc_comments
- sort_child_properties_last - sort_child_properties_last
- sort_unnamed_constructors_first - sort_unnamed_constructors_first
@ -94,6 +101,7 @@ linter:
- unnecessary_constructor_name - unnecessary_constructor_name
- unnecessary_getters_setters - unnecessary_getters_setters
- unnecessary_lambdas - unnecessary_lambdas
- unnecessary_late
- unnecessary_new - unnecessary_new
- unnecessary_null_aware_assignments - unnecessary_null_aware_assignments
- unnecessary_null_checks - unnecessary_null_checks

View File

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 30 compileSdkVersion 31
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'

View File

@ -7,7 +7,7 @@
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<application <application
android:name="io.flutter.app.FlutterApplication" android:name="${applicationName}"
android:label="${appName}" android:label="${appName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">

View File

@ -1,5 +1,5 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.5.31'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()

View File

@ -60,15 +60,14 @@ class CommunitiesTab extends HookWidget {
return Future.wait(futures); return Future.wait(futures);
} }
final _loggedInAccounts = accountsStore.loggedInInstances final loggedInAccounts = accountsStore.loggedInInstances
.map((instanceHost) => .map((instanceHost) =>
'$instanceHost${accountsStore.defaultUsernameFor(instanceHost)}') '$instanceHost${accountsStore.defaultUsernameFor(instanceHost)}')
.toList(); .toList();
final instancesRefreshable = final instancesRefreshable = useRefreshable(getInstances, loggedInAccounts);
useRefreshable(getInstances, _loggedInAccounts);
final communitiesRefreshable = final communitiesRefreshable =
useRefreshable(getCommunities, _loggedInAccounts); useRefreshable(getCommunities, loggedInAccounts);
if (communitiesRefreshable.snapshot.hasError || if (communitiesRefreshable.snapshot.hasError ||
instancesRefreshable.snapshot.hasError) { instancesRefreshable.snapshot.hasError) {

View File

@ -65,6 +65,8 @@ abstract class _AsyncStore<T> with Store {
} }
rethrow; rethrow;
} }
return null;
} }
/// [run] but specialized for a [LemmyApiQuery]. /// [run] but specialized for a [LemmyApiQuery].
@ -88,6 +90,8 @@ abstract class _AsyncStore<T> with Store {
asyncState = AsyncState<T>.error(err.message); asyncState = AsyncState<T>.error(err.message);
} }
} }
return null;
} }
/// helper function for mapping [asyncState] into 3 variants /// helper function for mapping [asyncState] into 3 variants

View File

@ -7,21 +7,21 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "33.0.0" version: "34.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.0" version: "3.2.0"
archive: archive:
dependency: transitive dependency: transitive
description: description:
name: archive name: archive
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.8" version: "3.1.11"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -276,7 +276,7 @@ packages:
name: flutter_mobx name: flutter_mobx
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.3+2" version: "2.0.4"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@ -391,7 +391,7 @@ packages:
name: image_picker name: image_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.8.4+4" version: "0.8.4+6"
image_picker_for_web: image_picker_for_web:
dependency: transitive dependency: transitive
description: description:
@ -483,6 +483,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
matrix4_transform: matrix4_transform:
dependency: "direct main" dependency: "direct main"
description: description:
@ -755,7 +762,7 @@ packages:
name: shared_preferences name: shared_preferences
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.12" version: "2.0.13"
shared_preferences_android: shared_preferences_android:
dependency: transitive dependency: transitive
description: description:
@ -886,14 +893,14 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.3" version: "0.4.8"
timeago: timeago:
dependency: "direct main" dependency: "direct main"
description: description:
name: timeago name: timeago
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.0" version: "3.2.1"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -935,14 +942,14 @@ packages:
name: url_launcher_linux name: url_launcher_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.2" version: "2.0.3"
url_launcher_macos: url_launcher_macos:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_macos name: url_launcher_macos
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.2" version: "2.0.3"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -956,7 +963,7 @@ packages:
name: url_launcher_web name: url_launcher_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.6" version: "2.0.8"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
@ -991,14 +998,14 @@ packages:
name: win32 name: win32
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.3" version: "2.3.10"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
name: xdg_directories name: xdg_directories
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.0" version: "0.2.0+1"
xml: xml:
dependency: transitive dependency: transitive
description: description:
@ -1014,5 +1021,5 @@ packages:
source: hosted source: hosted
version: "3.1.0" version: "3.1.0"
sdks: sdks:
dart: ">=2.15.0 <3.0.0" dart: ">=2.16.0 <3.0.0"
flutter: ">=2.8.0" flutter: ">=2.10.0"

View File

@ -18,8 +18,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 0.8.0+19 version: 0.8.0+19
environment: environment:
sdk: ">=2.15.0 <3.0.0" sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.8.0 <3.0.0" flutter: ">=2.10.0 <3.0.0"
dependencies: dependencies:
# widgets # widgets
@ -50,7 +50,7 @@ dependencies:
lemmy_api_client: ^0.19.0 lemmy_api_client: ^0.19.0
intl: ^0.17.0 intl: ^0.17.0
matrix4_transform: ^2.0.0 matrix4_transform: ^2.0.0
json_annotation: ^4.3.0 json_annotation: ^4.4.0
keyboard_dismisser: ^2.0.0 keyboard_dismisser: ^2.0.0
freezed_annotation: ^1.0.0 freezed_annotation: ^1.0.0
logging: ^1.0.1 logging: ^1.0.1

View File

@ -2,11 +2,13 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <url_launcher_windows/url_launcher_plugin.h> #include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
UrlLauncherPluginRegisterWithRegistrar( UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherPlugin")); registry->GetRegistrarForPlugin("UrlLauncherWindows"));
} }

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_ #ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_ #define GENERATED_PLUGIN_REGISTRANT_