Browse Source

Merge pull request #1143 from nextcloud/renovate/flutter-3.x

pull/1146/head
Kate 1 year ago committed by GitHub
parent
commit
15df54b224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .fvm/fvm_config.json
  2. 5
      melos.yaml
  3. 36
      packages/app/pubspec.lock
  4. 4
      packages/app/pubspec.yaml
  5. 2
      packages/dynamite/dynamite_end_to_end_test/lib/request_body.openapi.dart
  6. 21
      packages/neon/neon/lib/src/pages/home.dart
  7. 1
      packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart
  8. BIN
      packages/neon/neon_dashboard/test/goldens/widget.png
  9. BIN
      packages/neon/neon_dashboard/test/goldens/widget_button_invalid.png
  10. BIN
      packages/neon/neon_dashboard/test/goldens/widget_button_more.png
  11. BIN
      packages/neon/neon_dashboard/test/goldens/widget_button_new.png
  12. BIN
      packages/neon/neon_dashboard/test/goldens/widget_button_setup.png
  13. BIN
      packages/neon/neon_dashboard/test/goldens/widget_item.png
  14. BIN
      packages/neon/neon_dashboard/test/goldens/widget_item_not_round.png
  15. BIN
      packages/neon/neon_dashboard/test/goldens/widget_not_round.png
  16. BIN
      packages/neon/neon_dashboard/test/goldens/widget_with_empty.png
  17. BIN
      packages/neon/neon_dashboard/test/goldens/widget_with_half_empty.png
  18. BIN
      packages/neon/neon_dashboard/test/goldens/widget_without_buttons.png
  19. BIN
      packages/neon/neon_dashboard/test/goldens/widget_without_items.png
  20. 3
      packages/nextcloud/lib/src/api/notes.openapi.dart
  21. 6
      packages/nextcloud/lib/src/webdav/client.dart
  22. 10
      packages/nextcloud/test/webdav_test.dart

2
.fvm/fvm_config.json

@ -1,4 +1,4 @@
{ {
"flutterSdkVersion": "3.13.9", "flutterSdkVersion": "3.16.0",
"flavors": {} "flavors": {}
} }

5
melos.yaml

@ -18,6 +18,11 @@ ide:
intellij: intellij:
enabled: false enabled: false
command:
bootstrap:
hooks:
post: melos run format
scripts: scripts:
format: dart format --fix --line-length 120 . format: dart format --fix --line-length 120 .
format:check: dart format --output=none --set-exit-if-changed --line-length 120 . format:check: dart format --output=none --set-exit-if-changed --line-length 120 .

36
packages/app/pubspec.lock

@ -133,10 +133,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.2" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -646,10 +646,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -870,10 +870,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: platform name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0" version: "3.1.2"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -1138,18 +1138,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -1194,10 +1194,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.0" version: "0.6.1"
timezone: timezone:
dependency: transitive dependency: transitive
description: description:
@ -1370,10 +1370,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.7.1" version: "11.10.0"
wakelock_plus: wakelock_plus:
dependency: transitive dependency: transitive
description: description:
@ -1394,10 +1394,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.4-beta" version: "0.3.0"
webdriver: webdriver:
dependency: transitive dependency: transitive
description: description:
@ -1487,5 +1487,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.1.0 <4.0.0" dart: ">=3.2.0 <4.0.0"
flutter: ">=3.13.0" flutter: ">=3.16.0"

4
packages/app/pubspec.yaml

@ -3,8 +3,8 @@ version: 1.0.0
publish_to: 'none' publish_to: 'none'
environment: environment:
sdk: '>=3.1.0 <4.0.0' sdk: '>=3.2.0 <4.0.0'
flutter: '>=3.13.0' flutter: '>=3.16.0'
dependencies: dependencies:
flutter: flutter:

2
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'; headers['Content-Type'] = 'application/octet-stream';
if (string != null) { if (string != null) {
body = utf8.encode(string) as Uint8List; body = utf8.encode(string);
} }
const path = '/'; const path = '/';
final uri = Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null); final uri = Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null);

21
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/blocs/apps.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
import 'package:neon/src/models/app_implementation.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_options.dart' as global_options;
import 'package:neon/src/utils/global_popups.dart'; import 'package:neon/src/utils/global_popups.dart';
import 'package:neon/src/utils/provider.dart'; import 'package:neon/src/utils/provider.dart';
@ -32,10 +31,8 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
final _scaffoldKey = GlobalKey<ScaffoldState>();
late Account _account; late Account _account;
late GlobalOptions _globalOptions; late global_options.GlobalOptions _globalOptions;
late AccountsBloc _accountsBloc; late AccountsBloc _accountsBloc;
late AppsBloc _appsBloc; late AppsBloc _appsBloc;
late StreamSubscription<Map<String, String?>> _versionCheckSubscription; late StreamSubscription<Map<String, String?>> _versionCheckSubscription;
@ -43,7 +40,7 @@ class _HomePageState extends State<HomePage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_globalOptions = NeonProvider.of<GlobalOptions>(context); _globalOptions = NeonProvider.of<global_options.GlobalOptions>(context);
_accountsBloc = NeonProvider.of<AccountsBloc>(context); _accountsBloc = NeonProvider.of<AccountsBloc>(context);
_account = _accountsBloc.activeAccount.value!; _account = _accountsBloc.activeAccount.value!;
_appsBloc = _accountsBloc.activeAppsBloc; _appsBloc = _accountsBloc.activeAppsBloc;
@ -173,7 +170,6 @@ class _HomePageState extends State<HomePage> {
final drawerAlwaysVisible = navigationMode == global_options.NavigationMode.drawerAlwaysVisible; final drawerAlwaysVisible = navigationMode == global_options.NavigationMode.drawerAlwaysVisible;
final body = Scaffold( final body = Scaffold(
key: _scaffoldKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
drawer: !drawerAlwaysVisible ? drawer : null, drawer: !drawerAlwaysVisible ? drawer : null,
appBar: appBar, appBar: appBar,
@ -198,20 +194,9 @@ class _HomePageState extends State<HomePage> {
}, },
); );
return WillPopScope( return MultiProvider(
onWillPop: () async {
if (_scaffoldKey.currentState!.isDrawerOpen) {
Navigator.pop(context);
return true;
}
_scaffoldKey.currentState!.openDrawer();
return false;
},
child: MultiProvider(
providers: _appsBloc.appBlocProviders, providers: _appsBloc.appBlocProviders,
child: body, child: body,
),
); );
} }
} }

1
packages/neon/neon/lib/src/widgets/adaptive_widgets/list_tile.dart

@ -41,6 +41,7 @@ class AdaptiveListTile extends StatelessWidget {
/// {@template neon.AdaptiveListTile.subtitle} /// {@template neon.AdaptiveListTile.subtitle}
/// A [subtitle] is used to display additional information. It is located /// A [subtitle] is used to display additional information. It is located
/// below [title]. Usually a [Text] widget. /// below [title]. Usually a [Text] widget.
/// {@endtemplate}
final Widget? subtitle; final Widget? subtitle;
/// {@template neon.AdaptiveListTile.additionalInfo} /// {@template neon.AdaptiveListTile.additionalInfo}

BIN
packages/neon/neon_dashboard/test/goldens/widget.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_button_invalid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_button_more.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_button_new.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_button_setup.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_item.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_item_not_round.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_not_round.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_with_empty.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_with_half_empty.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_without_buttons.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
packages/neon/neon_dashboard/test/goldens/widget_without_items.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

3
packages/nextcloud/lib/src/api/notes.openapi.dart

@ -676,8 +676,7 @@ class Client extends DynamiteClient {
// coverage:ignore-end // coverage:ignore-end
headers['Content-Type'] = 'application/json'; headers['Content-Type'] = 'application/json';
body = utf8.encode(json.encode(_jsonSerializers.serialize(settings, specifiedType: const FullType(Settings)))) body = utf8.encode(json.encode(_jsonSerializers.serialize(settings, specifiedType: const FullType(Settings))));
as Uint8List;
const path = '/index.php/apps/notes/api/v1/settings'; const path = '/index.php/apps/notes/api/v1/settings';
final uri = Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null); final uri = Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null);

6
packages/nextcloud/lib/src/webdav/client.dart

@ -247,7 +247,7 @@ class WebDavClient {
_constructUri(path), _constructUri(path),
data: utf8.encode( data: utf8.encode(
WebDavPropfind(prop: prop ?? WebDavPropWithoutValues()).toXmlElement(namespaces: namespaces).toXmlString(), WebDavPropfind(prop: prop ?? WebDavPropWithoutValues()).toXmlElement(namespaces: namespaces).toXmlString(),
) as Uint8List, ),
headers: depth != null ? {'Depth': depth.value} : null, headers: depth != null ? {'Depth': depth.value} : null,
), ),
); );
@ -270,7 +270,7 @@ class WebDavClient {
filterRules: filterRules, filterRules: filterRules,
prop: prop ?? WebDavPropWithoutValues(), // coverage:ignore-line prop: prop ?? WebDavPropWithoutValues(), // coverage:ignore-line
).toXmlElement(namespaces: namespaces).toXmlString(), ).toXmlElement(namespaces: namespaces).toXmlString(),
) as Uint8List, ),
), ),
); );
@ -293,7 +293,7 @@ class WebDavClient {
set: set != null ? WebDavSet(prop: set) : null, set: set != null ? WebDavSet(prop: set) : null,
remove: remove != null ? WebDavRemove(prop: remove) : null, remove: remove != null ? WebDavRemove(prop: remove) : null,
).toXmlElement(namespaces: namespaces).toXmlString(), ).toXmlElement(namespaces: namespaces).toXmlString(),
) as Uint8List, ),
); );
final data = await _parseResponse(response); final data = await _parseResponse(response);
for (final a in data.responses) { for (final a in data.responses) {

10
packages/nextcloud/test/webdav_test.dart

@ -260,7 +260,7 @@ void main() {
}); });
test('Get directory props', () async { 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.mkcol(PathUri.parse('test'));
await client.webdav.put(data, PathUri.parse('test/test.txt')); await client.webdav.put(data, PathUri.parse('test/test.txt'));
@ -292,7 +292,7 @@ void main() {
}); });
test('Filter files', () async { 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; final id = response.headers['oc-fileid']!.first;
await client.webdav.proppatch( await client.webdav.proppatch(
PathUri.parse('test.txt'), PathUri.parse('test.txt'),
@ -325,7 +325,7 @@ void main() {
final uploadTime = DateTime.now(); final uploadTime = DateTime.now();
await client.webdav.put( await client.webdav.put(
utf8.encode('test') as Uint8List, utf8.encode('test'),
PathUri.parse('test.txt'), PathUri.parse('test.txt'),
lastModified: lastModifiedDate, lastModified: lastModifiedDate,
created: createdDate, created: createdDate,
@ -360,7 +360,7 @@ void main() {
}); });
test('Remove properties', () async { 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( var updated = await client.webdav.proppatch(
PathUri.parse('test.txt'), PathUri.parse('test.txt'),
@ -446,7 +446,7 @@ void main() {
('put_get_utf8_segment', 'res-%e2%82%ac'), ('put_get_utf8_segment', 'res-%e2%82%ac'),
]) { ]) {
test(name, () async { 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)); final response = await client.webdav.put(content, PathUri.parse(path));
expect(response.statusCode, 201); expect(response.statusCode, 201);

Loading…
Cancel
Save