diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index d8abe1b9..f1f9ceed 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,4 +1,4 @@ { - "flutterSdkVersion": "3.13.9", + "flutterSdkVersion": "3.16.0", "flavors": {} } \ No newline at end of file diff --git a/melos.yaml b/melos.yaml index 0d812d87..c0a4e2c0 100644 --- a/melos.yaml +++ b/melos.yaml @@ -18,6 +18,11 @@ ide: intellij: enabled: false +command: + bootstrap: + hooks: + post: melos run format + scripts: format: dart format --fix --line-length 120 . format:check: dart format --output=none --set-exit-if-changed --line-length 120 . diff --git a/packages/app/pubspec.lock b/packages/app/pubspec.lock index e3dabeb8..ca92ca8e 100644 --- a/packages/app/pubspec.lock +++ b/packages/app/pubspec.lock @@ -133,10 +133,10 @@ packages: 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: @@ -646,10 +646,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: transitive description: @@ -870,10 +870,10 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" plugin_platform_interface: dependency: transitive description: @@ -1138,18 +1138,18 @@ packages: 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: @@ -1194,10 +1194,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" timezone: dependency: transitive description: @@ -1370,10 +1370,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 url: "https://pub.dev" source: hosted - version: "11.7.1" + version: "11.10.0" wakelock_plus: dependency: transitive description: @@ -1394,10 +1394,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" webdriver: dependency: transitive description: @@ -1487,5 +1487,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0 <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0" diff --git a/packages/app/pubspec.yaml b/packages/app/pubspec.yaml index 1275b13c..0c430432 100644 --- a/packages/app/pubspec.yaml +++ b/packages/app/pubspec.yaml @@ -3,8 +3,8 @@ version: 1.0.0 publish_to: 'none' environment: - sdk: '>=3.1.0 <4.0.0' - flutter: '>=3.13.0' + sdk: '>=3.2.0 <4.0.0' + flutter: '>=3.16.0' dependencies: flutter: diff --git a/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart b/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart index 07c67f84..eee85c07 100644 --- a/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart +++ b/packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart @@ -117,7 +117,7 @@ class Client extends DynamiteClient { headers['Content-Type'] = 'application/octet-stream'; if (string != null) { - body = utf8.encode(string) as Uint8List; + body = utf8.encode(string); } const path = '/'; final uri = Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null); diff --git a/packages/neon/neon/lib/src/pages/home.dart b/packages/neon/neon/lib/src/pages/home.dart index c82cd0eb..04df3e20 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -8,7 +8,6 @@ import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/apps.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/app_implementation.dart'; -import 'package:neon/src/utils/global_options.dart'; import 'package:neon/src/utils/global_options.dart' as global_options; import 'package:neon/src/utils/global_popups.dart'; import 'package:neon/src/utils/provider.dart'; @@ -32,10 +31,8 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { - final _scaffoldKey = GlobalKey(); - late Account _account; - late GlobalOptions _globalOptions; + late global_options.GlobalOptions _globalOptions; late AccountsBloc _accountsBloc; late AppsBloc _appsBloc; late StreamSubscription> _versionCheckSubscription; @@ -43,7 +40,7 @@ class _HomePageState extends State { @override void initState() { super.initState(); - _globalOptions = NeonProvider.of(context); + _globalOptions = NeonProvider.of(context); _accountsBloc = NeonProvider.of(context); _account = _accountsBloc.activeAccount.value!; _appsBloc = _accountsBloc.activeAppsBloc; @@ -173,7 +170,6 @@ class _HomePageState extends State { final drawerAlwaysVisible = navigationMode == global_options.NavigationMode.drawerAlwaysVisible; final body = Scaffold( - key: _scaffoldKey, resizeToAvoidBottomInset: false, drawer: !drawerAlwaysVisible ? drawer : null, appBar: appBar, @@ -198,20 +194,9 @@ class _HomePageState extends State { }, ); - return WillPopScope( - onWillPop: () async { - if (_scaffoldKey.currentState!.isDrawerOpen) { - Navigator.pop(context); - return true; - } - - _scaffoldKey.currentState!.openDrawer(); - return false; - }, - child: MultiProvider( - providers: _appsBloc.appBlocProviders, - child: body, - ), + return MultiProvider( + providers: _appsBloc.appBlocProviders, + child: body, ); } } diff --git a/packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart b/packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart index e0392fe7..b7d2f120 100644 --- a/packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart +++ b/packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart @@ -41,6 +41,7 @@ class AdaptiveListTile extends StatelessWidget { /// {@template neon.AdaptiveListTile.subtitle} /// A [subtitle] is used to display additional information. It is located /// below [title]. Usually a [Text] widget. + /// {@endtemplate} final Widget? subtitle; /// {@template neon.AdaptiveListTile.additionalInfo} diff --git a/packages/neon/neon_dashboard/test/goldens/widget.png b/packages/neon/neon_dashboard/test/goldens/widget.png index dd66e350..614120d9 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget.png and b/packages/neon/neon_dashboard/test/goldens/widget.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_button_invalid.png b/packages/neon/neon_dashboard/test/goldens/widget_button_invalid.png index 15d7701d..500b92ba 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_button_invalid.png and b/packages/neon/neon_dashboard/test/goldens/widget_button_invalid.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_button_more.png b/packages/neon/neon_dashboard/test/goldens/widget_button_more.png index e71445d9..abcac2f7 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_button_more.png and b/packages/neon/neon_dashboard/test/goldens/widget_button_more.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_button_new.png b/packages/neon/neon_dashboard/test/goldens/widget_button_new.png index e71445d9..abcac2f7 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_button_new.png and b/packages/neon/neon_dashboard/test/goldens/widget_button_new.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_button_setup.png b/packages/neon/neon_dashboard/test/goldens/widget_button_setup.png index e71445d9..abcac2f7 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_button_setup.png and b/packages/neon/neon_dashboard/test/goldens/widget_button_setup.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_item.png b/packages/neon/neon_dashboard/test/goldens/widget_item.png index c654ab85..10f18e90 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_item.png and b/packages/neon/neon_dashboard/test/goldens/widget_item.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_item_not_round.png b/packages/neon/neon_dashboard/test/goldens/widget_item_not_round.png index 04d8782e..ec02dd4f 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_item_not_round.png and b/packages/neon/neon_dashboard/test/goldens/widget_item_not_round.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_not_round.png b/packages/neon/neon_dashboard/test/goldens/widget_not_round.png index dd66e350..e942e89c 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_not_round.png and b/packages/neon/neon_dashboard/test/goldens/widget_not_round.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_with_empty.png b/packages/neon/neon_dashboard/test/goldens/widget_with_empty.png index 3e6c6ad7..8460bc58 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_with_empty.png and b/packages/neon/neon_dashboard/test/goldens/widget_with_empty.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_with_half_empty.png b/packages/neon/neon_dashboard/test/goldens/widget_with_half_empty.png index 9e65ba60..2028f4f8 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_with_half_empty.png and b/packages/neon/neon_dashboard/test/goldens/widget_with_half_empty.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_without_buttons.png b/packages/neon/neon_dashboard/test/goldens/widget_without_buttons.png index 5239eddf..409ce159 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_without_buttons.png and b/packages/neon/neon_dashboard/test/goldens/widget_without_buttons.png differ diff --git a/packages/neon/neon_dashboard/test/goldens/widget_without_items.png b/packages/neon/neon_dashboard/test/goldens/widget_without_items.png index 996d04b1..6b0c3927 100644 Binary files a/packages/neon/neon_dashboard/test/goldens/widget_without_items.png and b/packages/neon/neon_dashboard/test/goldens/widget_without_items.png differ diff --git a/packages/nextcloud/lib/src/api/notes.openapi.dart b/packages/nextcloud/lib/src/api/notes.openapi.dart index 6b927643..a6cea824 100644 --- a/packages/nextcloud/lib/src/api/notes.openapi.dart +++ b/packages/nextcloud/lib/src/api/notes.openapi.dart @@ -676,8 +676,7 @@ class Client extends DynamiteClient { // coverage:ignore-end headers['Content-Type'] = 'application/json'; - body = utf8.encode(json.encode(_jsonSerializers.serialize(settings, specifiedType: const FullType(Settings)))) - as Uint8List; + body = utf8.encode(json.encode(_jsonSerializers.serialize(settings, specifiedType: const FullType(Settings)))); const path = '/index.php/apps/notes/api/v1/settings'; final uri = Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null); diff --git a/packages/nextcloud/lib/src/webdav/client.dart b/packages/nextcloud/lib/src/webdav/client.dart index 5288c506..e183cdaf 100644 --- a/packages/nextcloud/lib/src/webdav/client.dart +++ b/packages/nextcloud/lib/src/webdav/client.dart @@ -247,7 +247,7 @@ class WebDavClient { _constructUri(path), data: utf8.encode( WebDavPropfind(prop: prop ?? WebDavPropWithoutValues()).toXmlElement(namespaces: namespaces).toXmlString(), - ) as Uint8List, + ), headers: depth != null ? {'Depth': depth.value} : null, ), ); @@ -270,7 +270,7 @@ class WebDavClient { filterRules: filterRules, prop: prop ?? WebDavPropWithoutValues(), // coverage:ignore-line ).toXmlElement(namespaces: namespaces).toXmlString(), - ) as Uint8List, + ), ), ); @@ -293,7 +293,7 @@ class WebDavClient { set: set != null ? WebDavSet(prop: set) : null, remove: remove != null ? WebDavRemove(prop: remove) : null, ).toXmlElement(namespaces: namespaces).toXmlString(), - ) as Uint8List, + ), ); final data = await _parseResponse(response); for (final a in data.responses) { diff --git a/packages/nextcloud/test/webdav_test.dart b/packages/nextcloud/test/webdav_test.dart index a77abc34..2155aca1 100644 --- a/packages/nextcloud/test/webdav_test.dart +++ b/packages/nextcloud/test/webdav_test.dart @@ -260,7 +260,7 @@ void main() { }); test('Get directory props', () async { - final data = utf8.encode('test') as Uint8List; + final data = utf8.encode('test'); await client.webdav.mkcol(PathUri.parse('test')); await client.webdav.put(data, PathUri.parse('test/test.txt')); @@ -292,7 +292,7 @@ void main() { }); test('Filter files', () async { - final response = await client.webdav.put(utf8.encode('test') as Uint8List, PathUri.parse('test.txt')); + final response = await client.webdav.put(utf8.encode('test'), PathUri.parse('test.txt')); final id = response.headers['oc-fileid']!.first; await client.webdav.proppatch( PathUri.parse('test.txt'), @@ -325,7 +325,7 @@ void main() { final uploadTime = DateTime.now(); await client.webdav.put( - utf8.encode('test') as Uint8List, + utf8.encode('test'), PathUri.parse('test.txt'), lastModified: lastModifiedDate, created: createdDate, @@ -360,7 +360,7 @@ void main() { }); test('Remove properties', () async { - await client.webdav.put(utf8.encode('test') as Uint8List, PathUri.parse('test.txt')); + await client.webdav.put(utf8.encode('test'), PathUri.parse('test.txt')); var updated = await client.webdav.proppatch( PathUri.parse('test.txt'), @@ -446,7 +446,7 @@ void main() { ('put_get_utf8_segment', 'res-%e2%82%ac'), ]) { test(name, () async { - final content = utf8.encode('This is a test file') as Uint8List; + final content = utf8.encode('This is a test file'); final response = await client.webdav.put(content, PathUri.parse(path)); expect(response.statusCode, 201);