diff --git a/lib/ui/components/brand_cards/filled_card.dart b/lib/ui/components/brand_cards/filled_card.dart index 3a706c8c..02d46604 100644 --- a/lib/ui/components/brand_cards/filled_card.dart +++ b/lib/ui/components/brand_cards/filled_card.dart @@ -17,18 +17,18 @@ class FilledCard extends StatelessWidget { final bool secondary; @override Widget build(final BuildContext context) => Card( - elevation: 0.0, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(12)), - ), - clipBehavior: clipped ? Clip.antiAlias : Clip.none, - color: error - ? Theme.of(context).colorScheme.errorContainer - : secondary - ? Theme.of(context).colorScheme.secondaryContainer - : tertiary - ? Theme.of(context).colorScheme.tertiaryContainer - : Theme.of(context).colorScheme.surfaceVariant, - child: child, - ); + elevation: 0.0, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + ), + clipBehavior: clipped ? Clip.antiAlias : Clip.none, + color: error + ? Theme.of(context).colorScheme.errorContainer + : secondary + ? Theme.of(context).colorScheme.secondaryContainer + : tertiary + ? Theme.of(context).colorScheme.tertiaryContainer + : Theme.of(context).colorScheme.surfaceVariant, + child: child, + ); } diff --git a/lib/ui/components/brand_cards/outlined_card.dart b/lib/ui/components/brand_cards/outlined_card.dart index 9da63902..dc959dc2 100644 --- a/lib/ui/components/brand_cards/outlined_card.dart +++ b/lib/ui/components/brand_cards/outlined_card.dart @@ -9,14 +9,14 @@ class OutlinedCard extends StatelessWidget { final Widget child; @override Widget build(final BuildContext context) => Card( - elevation: 0.0, - shape: RoundedRectangleBorder( - borderRadius: const BorderRadius.all(Radius.circular(12)), - side: BorderSide( - color: Theme.of(context).colorScheme.outline, - ), - ), - clipBehavior: Clip.antiAlias, - child: child, - ); + elevation: 0.0, + shape: RoundedRectangleBorder( + borderRadius: const BorderRadius.all(Radius.circular(12)), + side: BorderSide( + color: Theme.of(context).colorScheme.outline, + ), + ), + clipBehavior: Clip.antiAlias, + child: child, + ); } diff --git a/lib/ui/components/info_box/info_box.dart b/lib/ui/components/info_box/info_box.dart index 5a4129c2..816053e3 100644 --- a/lib/ui/components/info_box/info_box.dart +++ b/lib/ui/components/info_box/info_box.dart @@ -12,20 +12,20 @@ class InfoBox extends StatelessWidget { @override Widget build(final BuildContext context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Icon( - isWarning ? Icons.warning_amber_outlined : Icons.info_outline, - size: 24, - color: Theme.of(context).colorScheme.onBackground, - ), - const SizedBox(height: 16), - Text( - text, - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - color: Theme.of(context).colorScheme.onBackground, - ), - ), - ], - ); + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + isWarning ? Icons.warning_amber_outlined : Icons.info_outline, + size: 24, + color: Theme.of(context).colorScheme.onBackground, + ), + const SizedBox(height: 16), + Text( + text, + style: Theme.of(context).textTheme.bodyMedium!.copyWith( + color: Theme.of(context).colorScheme.onBackground, + ), + ), + ], + ); } diff --git a/lib/ui/pages/backup_details/backup_details.dart b/lib/ui/pages/backup_details/backup_details.dart index aad55208..b3635d3f 100644 --- a/lib/ui/pages/backup_details/backup_details.dart +++ b/lib/ui/pages/backup_details/backup_details.dart @@ -13,7 +13,6 @@ import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.da import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; - GlobalKey navigatorKey = GlobalKey(); class BackupDetails extends StatefulWidget { diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index e89535ab..bc608339 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -52,7 +52,9 @@ class _DevicesScreenState extends State { const SizedBox(height: 16), const Divider(height: 1), const SizedBox(height: 16), - InfoBox(text: 'devices.main_screen.tip'.tr(),), + InfoBox( + text: 'devices.main_screen.tip'.tr(), + ), ], const SizedBox(height: 24), ], diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index 521cf723..60169e5a 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -29,7 +29,9 @@ class RecoveryKeyReceiving extends StatelessWidget { const SizedBox(height: 16), const Divider(), const SizedBox(height: 16), - InfoBox(text: 'recovery_key.key_receiving_info'.tr(),), + InfoBox( + text: 'recovery_key.key_receiving_info'.tr(), + ), const SizedBox(height: 16), FilledButton( title: 'recovery_key.key_receiving_done'.tr(), diff --git a/lib/ui/pages/server_storage/data_migration.dart b/lib/ui/pages/server_storage/data_migration.dart index 05948840..6a3756a9 100644 --- a/lib/ui/pages/server_storage/data_migration.dart +++ b/lib/ui/pages/server_storage/data_migration.dart @@ -51,17 +51,20 @@ class _DataMigrationPageState extends State { /// Check the services and if a service is moved (in a serviceToDisk entry) /// subtract the used storage from the old volume and add it to the new volume. /// The old volume is the volume the service is currently on, shown in services list. - DiskVolume recalculatedDiskUsages(final DiskVolume volume, final List services) { + DiskVolume recalculatedDiskUsages( + final DiskVolume volume, final List services) { DiskSize used = volume.sizeUsed; for (final Service service in services) { if (service.storageUsage.volume != null) { if (service.storageUsage.volume == volume.name) { - if (serviceToDisk[service.id] != null && serviceToDisk[service.id] != volume.name) { + if (serviceToDisk[service.id] != null && + serviceToDisk[service.id] != volume.name) { used -= service.storageUsage.used; } } else { - if (serviceToDisk[service.id] != null && serviceToDisk[service.id] == volume.name) { + if (serviceToDisk[service.id] != null && + serviceToDisk[service.id] == volume.name) { used += service.storageUsage.used; } } @@ -101,7 +104,8 @@ class _DataMigrationPageState extends State { (final volume) => Column( children: [ ServerStorageListItem( - volume: recalculatedDiskUsages(volume, widget.services), + volume: recalculatedDiskUsages( + volume, widget.services), dense: true, ), const SizedBox(height: headerVerticalPadding), @@ -119,7 +123,8 @@ class _DataMigrationPageState extends State { body: ListView( padding: const EdgeInsets.all(16.0), children: [ - if (widget.services.isEmpty) const Center(child: CircularProgressIndicator()), + if (widget.services.isEmpty) + const Center(child: CircularProgressIndicator()), ...widget.services .map( (final service) => Column( @@ -139,7 +144,10 @@ class _DataMigrationPageState extends State { .toList(), Padding( padding: const EdgeInsets.all(8.0), - child: InfoBox(text: 'providers.storage.data_migration_notice'.tr(), isWarning: true,), + child: InfoBox( + text: 'providers.storage.data_migration_notice'.tr(), + isWarning: true, + ), ), const SizedBox(height: 16), FilledButton( diff --git a/lib/ui/pages/server_storage/disk_status.dart b/lib/ui/pages/server_storage/disk_status.dart index a4f921e9..2a37ad77 100644 --- a/lib/ui/pages/server_storage/disk_status.dart +++ b/lib/ui/pages/server_storage/disk_status.dart @@ -68,15 +68,16 @@ class DiskVolume { final bool? isResizable, final ServerDiskVolume? serverDiskVolume, final ServerVolume? providerVolume, - }) => DiskVolume( - sizeUsed: sizeUsed ?? this.sizeUsed, - sizeTotal: sizeTotal ?? this.sizeTotal, - name: name ?? this.name, - root: root ?? this.root, - isResizable: isResizable ?? this.isResizable, - serverDiskVolume: serverDiskVolume ?? this.serverDiskVolume, - providerVolume: providerVolume ?? this.providerVolume, - ); + }) => + DiskVolume( + sizeUsed: sizeUsed ?? this.sizeUsed, + sizeTotal: sizeTotal ?? this.sizeTotal, + name: name ?? this.name, + root: root ?? this.root, + isResizable: isResizable ?? this.isResizable, + serverDiskVolume: serverDiskVolume ?? this.serverDiskVolume, + providerVolume: providerVolume ?? this.providerVolume, + ); } class DiskStatus {