Browse Source

Merge pull request #102 from jld3103/refactor/pages

Refactor pages
pull/104/head
jld3103 2 years ago committed by GitHub
parent
commit
832697f019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      packages/neon/lib/src/neon.dart
  2. 6
      packages/neon/lib/src/pages/account_settings.dart
  3. 4
      packages/neon/lib/src/pages/home.dart
  4. 2
      packages/neon/lib/src/pages/login.dart
  5. 6
      packages/neon/lib/src/pages/nextcloud_app_settings.dart
  6. 6
      packages/neon/lib/src/pages/settings.dart
  7. 2
      packages/neon/lib/src/widgets/account_settings_tile.dart
  8. 5
      packages/neon/lib/src/widgets/text_settings_tile.dart

14
packages/neon/lib/src/neon.dart

@ -56,13 +56,11 @@ import 'package:window_manager/window_manager.dart';
import 'package:xdg_directories/xdg_directories.dart' as xdg; import 'package:xdg_directories/xdg_directories.dart' as xdg;
part 'app.dart'; part 'app.dart';
part 'pages/home/home.dart'; part 'pages/home.dart';
part 'pages/login/login.dart'; part 'pages/login.dart';
part 'pages/settings/account_specific_settings.dart'; part 'pages/account_settings.dart';
part 'pages/settings/nextcloud_app_specific_settings.dart'; part 'pages/nextcloud_app_settings.dart';
part 'pages/settings/settings.dart'; part 'pages/settings.dart';
part 'pages/settings/widgets/account_settings_tile.dart';
part 'pages/settings/widgets/text_settings_tile.dart';
part 'platform/abstract.dart'; part 'platform/abstract.dart';
part 'platform/android.dart'; part 'platform/android.dart';
part 'platform/linux.dart'; part 'platform/linux.dart';
@ -88,6 +86,7 @@ part 'utils/storage.dart';
part 'utils/theme.dart'; part 'utils/theme.dart';
part 'utils/validators.dart'; part 'utils/validators.dart';
part 'widgets/account_avatar.dart'; part 'widgets/account_avatar.dart';
part 'widgets/account_settings_tile.dart';
part 'widgets/account_tile.dart'; part 'widgets/account_tile.dart';
part 'widgets/cached_api_image.dart'; part 'widgets/cached_api_image.dart';
part 'widgets/cached_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/relative_time.dart';
part 'widgets/result_stream_builder.dart'; part 'widgets/result_stream_builder.dart';
part 'widgets/standard_rx_result_builder.dart'; part 'widgets/standard_rx_result_builder.dart';
part 'widgets/text_settings_tile.dart';

6
packages/neon/lib/src/pages/settings/account_specific_settings.dart → packages/neon/lib/src/pages/account_settings.dart

@ -1,7 +1,7 @@
part of '../../neon.dart'; part of '../neon.dart';
class AccountSpecificSettingsPage extends StatelessWidget { class AccountSettingsPage extends StatelessWidget {
AccountSpecificSettingsPage({ AccountSettingsPage({
required this.bloc, required this.bloc,
required this.account, required this.account,
super.key, super.key,

4
packages/neon/lib/src/pages/home/home.dart → packages/neon/lib/src/pages/home.dart

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of '../neon.dart';
const kQuickBarWidth = kAvatarSize + 20; const kQuickBarWidth = kAvatarSize + 20;
@ -511,7 +511,7 @@ class _HomePageState extends State<HomePage> {
onPressed: () async { onPressed: () async {
await Navigator.of(context).push( await Navigator.of(context).push(
MaterialPageRoute( MaterialPageRoute(
builder: (final context) => AccountSpecificSettingsPage( builder: (final context) => AccountSettingsPage(
bloc: accountsBloc, bloc: accountsBloc,
account: account, account: account,
), ),

2
packages/neon/lib/src/pages/login/login.dart → packages/neon/lib/src/pages/login.dart

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of '../neon.dart';
class LoginPage extends StatefulWidget { class LoginPage extends StatefulWidget {
const LoginPage({ const LoginPage({

6
packages/neon/lib/src/pages/settings/nextcloud_app_specific_settings.dart → 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 { class NextcloudAppSettingsPage extends StatelessWidget {
const NextcloudAppSpecificSettingsPage({ const NextcloudAppSettingsPage({
required this.appImplementation, required this.appImplementation,
super.key, super.key,
}); });

6
packages/neon/lib/src/pages/settings/settings.dart → packages/neon/lib/src/pages/settings.dart

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of '../neon.dart';
class SettingsPage extends StatefulWidget { class SettingsPage extends StatefulWidget {
const SettingsPage({ const SettingsPage({
@ -85,7 +85,7 @@ class _SettingsPageState extends State<SettingsPage> {
onTap: () async { onTap: () async {
await Navigator.of(context).push( await Navigator.of(context).push(
MaterialPageRoute( MaterialPageRoute(
builder: (final context) => NextcloudAppSpecificSettingsPage( builder: (final context) => NextcloudAppSettingsPage(
appImplementation: appImplementation, appImplementation: appImplementation,
), ),
), ),
@ -193,7 +193,7 @@ class _SettingsPageState extends State<SettingsPage> {
onTap: () async { onTap: () async {
await Navigator.of(context).push( await Navigator.of(context).push(
MaterialPageRoute( MaterialPageRoute(
builder: (final context) => AccountSpecificSettingsPage( builder: (final context) => AccountSettingsPage(
bloc: accountsBloc, bloc: accountsBloc,
account: account, account: account,
), ),

2
packages/neon/lib/src/pages/settings/widgets/account_settings_tile.dart → 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 { class AccountSettingsTile extends SettingsTile {
const AccountSettingsTile({ const AccountSettingsTile({

5
packages/neon/lib/src/pages/settings/widgets/text_settings_tile.dart → packages/neon/lib/src/widgets/text_settings_tile.dart

@ -1,4 +1,7 @@
part of '../../../neon.dart'; // 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 { class TextSettingsTile extends SettingsTile {
const TextSettingsTile({ const TextSettingsTile({
Loading…
Cancel
Save