Skip to content

Commit

Permalink
Merge pull request #1143 from nextcloud/renovate/flutter-3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Nov 16, 2023
2 parents 2ce6d92 + 6b67313 commit 15df54b
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.13.9",
"flutterSdkVersion": "3.16.0",
"flavors": {}
}
5 changes: 5 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
36 changes: 18 additions & 18 deletions packages/app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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"
4 changes: 2 additions & 2 deletions packages/app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
25 changes: 5 additions & 20 deletions packages/neon/neon/lib/src/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -32,18 +31,16 @@ class HomePage extends StatefulWidget {
}

class _HomePageState extends State<HomePage> {
final _scaffoldKey = GlobalKey<ScaffoldState>();

late Account _account;
late GlobalOptions _globalOptions;
late global_options.GlobalOptions _globalOptions;
late AccountsBloc _accountsBloc;
late AppsBloc _appsBloc;
late StreamSubscription<Map<String, String?>> _versionCheckSubscription;

@override
void initState() {
super.initState();
_globalOptions = NeonProvider.of<GlobalOptions>(context);
_globalOptions = NeonProvider.of<global_options.GlobalOptions>(context);
_accountsBloc = NeonProvider.of<AccountsBloc>(context);
_account = _accountsBloc.activeAccount.value!;
_appsBloc = _accountsBloc.activeAppsBloc;
Expand Down Expand Up @@ -173,7 +170,6 @@ class _HomePageState extends State<HomePage> {
final drawerAlwaysVisible = navigationMode == global_options.NavigationMode.drawerAlwaysVisible;

final body = Scaffold(
key: _scaffoldKey,
resizeToAvoidBottomInset: false,
drawer: !drawerAlwaysVisible ? drawer : null,
appBar: appBar,
Expand All @@ -198,20 +194,9 @@ class _HomePageState extends State<HomePage> {
},
);

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,
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Binary file modified packages/neon/neon_dashboard/test/goldens/widget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_button_more.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_button_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_button_setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_item_not_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_not_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_with_empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/neon/neon_dashboard/test/goldens/widget_without_items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions packages/nextcloud/lib/src/api/notes.openapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions packages/nextcloud/lib/src/webdav/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
);
Expand All @@ -270,7 +270,7 @@ class WebDavClient {
filterRules: filterRules,
prop: prop ?? WebDavPropWithoutValues(), // coverage:ignore-line
).toXmlElement(namespaces: namespaces).toXmlString(),
) as Uint8List,
),
),
);

Expand All @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions packages/nextcloud/test/webdav_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 15df54b

Please sign in to comment.