From ce9715391de34253296756ffe3bb3144a561f2e5 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 23 Oct 2022 00:02:38 +0200 Subject: [PATCH 1/2] neon: Move settings page widgets to common widgets --- packages/neon/lib/src/neon.dart | 4 ++-- .../{pages/settings => }/widgets/account_settings_tile.dart | 2 +- .../src/{pages/settings => }/widgets/text_settings_tile.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename packages/neon/lib/src/{pages/settings => }/widgets/account_settings_tile.dart (93%) rename packages/neon/lib/src/{pages/settings => }/widgets/text_settings_tile.dart (93%) diff --git a/packages/neon/lib/src/neon.dart b/packages/neon/lib/src/neon.dart index 3ec595c1..b5ea9e97 100644 --- a/packages/neon/lib/src/neon.dart +++ b/packages/neon/lib/src/neon.dart @@ -61,8 +61,6 @@ part 'pages/login/login.dart'; part 'pages/settings/account_specific_settings.dart'; part 'pages/settings/nextcloud_app_specific_settings.dart'; part 'pages/settings/settings.dart'; -part 'pages/settings/widgets/account_settings_tile.dart'; -part 'pages/settings/widgets/text_settings_tile.dart'; part 'platform/abstract.dart'; part 'platform/android.dart'; part 'platform/linux.dart'; @@ -88,6 +86,7 @@ part 'utils/storage.dart'; part 'utils/theme.dart'; part 'utils/validators.dart'; part 'widgets/account_avatar.dart'; +part 'widgets/account_settings_tile.dart'; part 'widgets/account_tile.dart'; part 'widgets/cached_api_image.dart'; part 'widgets/cached_image.dart'; @@ -103,3 +102,4 @@ part 'widgets/no_animation_page_route.dart'; part 'widgets/relative_time.dart'; part 'widgets/result_stream_builder.dart'; part 'widgets/standard_rx_result_builder.dart'; +part 'widgets/text_settings_tile.dart'; diff --git a/packages/neon/lib/src/pages/settings/widgets/account_settings_tile.dart b/packages/neon/lib/src/widgets/account_settings_tile.dart similarity index 93% rename from packages/neon/lib/src/pages/settings/widgets/account_settings_tile.dart rename to packages/neon/lib/src/widgets/account_settings_tile.dart index 541d4474..5bd3e960 100644 --- a/packages/neon/lib/src/pages/settings/widgets/account_settings_tile.dart +++ b/packages/neon/lib/src/widgets/account_settings_tile.dart @@ -1,4 +1,4 @@ -part of '../../../neon.dart'; +part of '../neon.dart'; class AccountSettingsTile extends SettingsTile { const AccountSettingsTile({ diff --git a/packages/neon/lib/src/pages/settings/widgets/text_settings_tile.dart b/packages/neon/lib/src/widgets/text_settings_tile.dart similarity index 93% rename from packages/neon/lib/src/pages/settings/widgets/text_settings_tile.dart rename to packages/neon/lib/src/widgets/text_settings_tile.dart index bb21deae..acebdd2f 100644 --- a/packages/neon/lib/src/pages/settings/widgets/text_settings_tile.dart +++ b/packages/neon/lib/src/widgets/text_settings_tile.dart @@ -1,4 +1,4 @@ -part of '../../../neon.dart'; +part of '../neon.dart'; class TextSettingsTile extends SettingsTile { const TextSettingsTile({ From 55afc6480070787dc3c4031b05efc96f3fc53e75 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 23 Oct 2022 00:03:54 +0200 Subject: [PATCH 2/2] neon: Move and rename pages --- packages/neon/lib/src/neon.dart | 10 +++++----- ...nt_specific_settings.dart => account_settings.dart} | 6 +++--- packages/neon/lib/src/pages/{home => }/home.dart | 4 ++-- packages/neon/lib/src/pages/{login => }/login.dart | 2 +- ...cific_settings.dart => nextcloud_app_settings.dart} | 6 +++--- .../neon/lib/src/pages/{settings => }/settings.dart | 6 +++--- packages/neon/lib/src/widgets/text_settings_tile.dart | 3 +++ 7 files changed, 20 insertions(+), 17 deletions(-) rename packages/neon/lib/src/pages/{settings/account_specific_settings.dart => account_settings.dart} (96%) rename packages/neon/lib/src/pages/{home => }/home.dart (99%) rename packages/neon/lib/src/pages/{login => }/login.dart (99%) rename packages/neon/lib/src/pages/{settings/nextcloud_app_specific_settings.dart => nextcloud_app_settings.dart} (93%) rename packages/neon/lib/src/pages/{settings => }/settings.dart (99%) diff --git a/packages/neon/lib/src/neon.dart b/packages/neon/lib/src/neon.dart index b5ea9e97..f6c3e5e8 100644 --- a/packages/neon/lib/src/neon.dart +++ b/packages/neon/lib/src/neon.dart @@ -56,11 +56,11 @@ import 'package:window_manager/window_manager.dart'; import 'package:xdg_directories/xdg_directories.dart' as xdg; part 'app.dart'; -part 'pages/home/home.dart'; -part 'pages/login/login.dart'; -part 'pages/settings/account_specific_settings.dart'; -part 'pages/settings/nextcloud_app_specific_settings.dart'; -part 'pages/settings/settings.dart'; +part 'pages/home.dart'; +part 'pages/login.dart'; +part 'pages/account_settings.dart'; +part 'pages/nextcloud_app_settings.dart'; +part 'pages/settings.dart'; part 'platform/abstract.dart'; part 'platform/android.dart'; part 'platform/linux.dart'; diff --git a/packages/neon/lib/src/pages/settings/account_specific_settings.dart b/packages/neon/lib/src/pages/account_settings.dart similarity index 96% rename from packages/neon/lib/src/pages/settings/account_specific_settings.dart rename to packages/neon/lib/src/pages/account_settings.dart index 513e509a..2279627b 100644 --- a/packages/neon/lib/src/pages/settings/account_specific_settings.dart +++ b/packages/neon/lib/src/pages/account_settings.dart @@ -1,7 +1,7 @@ -part of '../../neon.dart'; +part of '../neon.dart'; -class AccountSpecificSettingsPage extends StatelessWidget { - AccountSpecificSettingsPage({ +class AccountSettingsPage extends StatelessWidget { + AccountSettingsPage({ required this.bloc, required this.account, super.key, diff --git a/packages/neon/lib/src/pages/home/home.dart b/packages/neon/lib/src/pages/home.dart similarity index 99% rename from packages/neon/lib/src/pages/home/home.dart rename to packages/neon/lib/src/pages/home.dart index 807963d4..6fb99254 100644 --- a/packages/neon/lib/src/pages/home/home.dart +++ b/packages/neon/lib/src/pages/home.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +part of '../neon.dart'; const kQuickBarWidth = kAvatarSize + 20; @@ -511,7 +511,7 @@ class _HomePageState extends State { onPressed: () async { await Navigator.of(context).push( MaterialPageRoute( - builder: (final context) => AccountSpecificSettingsPage( + builder: (final context) => AccountSettingsPage( bloc: accountsBloc, account: account, ), diff --git a/packages/neon/lib/src/pages/login/login.dart b/packages/neon/lib/src/pages/login.dart similarity index 99% rename from packages/neon/lib/src/pages/login/login.dart rename to packages/neon/lib/src/pages/login.dart index 61a2a005..71834be4 100644 --- a/packages/neon/lib/src/pages/login/login.dart +++ b/packages/neon/lib/src/pages/login.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +part of '../neon.dart'; class LoginPage extends StatefulWidget { const LoginPage({ diff --git a/packages/neon/lib/src/pages/settings/nextcloud_app_specific_settings.dart b/packages/neon/lib/src/pages/nextcloud_app_settings.dart similarity index 93% rename from packages/neon/lib/src/pages/settings/nextcloud_app_specific_settings.dart rename to packages/neon/lib/src/pages/nextcloud_app_settings.dart index 1e5c9b70..3bb72164 100644 --- a/packages/neon/lib/src/pages/settings/nextcloud_app_specific_settings.dart +++ b/packages/neon/lib/src/pages/nextcloud_app_settings.dart @@ -1,7 +1,7 @@ -part of '../../neon.dart'; +part of '../neon.dart'; -class NextcloudAppSpecificSettingsPage extends StatelessWidget { - const NextcloudAppSpecificSettingsPage({ +class NextcloudAppSettingsPage extends StatelessWidget { + const NextcloudAppSettingsPage({ required this.appImplementation, super.key, }); diff --git a/packages/neon/lib/src/pages/settings/settings.dart b/packages/neon/lib/src/pages/settings.dart similarity index 99% rename from packages/neon/lib/src/pages/settings/settings.dart rename to packages/neon/lib/src/pages/settings.dart index 3a7f710f..325adeb8 100644 --- a/packages/neon/lib/src/pages/settings/settings.dart +++ b/packages/neon/lib/src/pages/settings.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +part of '../neon.dart'; class SettingsPage extends StatefulWidget { const SettingsPage({ @@ -85,7 +85,7 @@ class _SettingsPageState extends State { onTap: () async { await Navigator.of(context).push( MaterialPageRoute( - builder: (final context) => NextcloudAppSpecificSettingsPage( + builder: (final context) => NextcloudAppSettingsPage( appImplementation: appImplementation, ), ), @@ -193,7 +193,7 @@ class _SettingsPageState extends State { onTap: () async { await Navigator.of(context).push( MaterialPageRoute( - builder: (final context) => AccountSpecificSettingsPage( + builder: (final context) => AccountSettingsPage( bloc: accountsBloc, account: account, ), diff --git a/packages/neon/lib/src/widgets/text_settings_tile.dart b/packages/neon/lib/src/widgets/text_settings_tile.dart index acebdd2f..14a1bfb4 100644 --- a/packages/neon/lib/src/widgets/text_settings_tile.dart +++ b/packages/neon/lib/src/widgets/text_settings_tile.dart @@ -1,3 +1,6 @@ +// ignore_for_file: use_late_for_private_fields_and_variables +// ^ This is a really strange false positive, it goes of at a very random place without any meaning. Hopefully fixed soon? + part of '../neon.dart'; class TextSettingsTile extends SettingsTile {