chore: add always_put_control_body_on_new_line lint (#28352)

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-05-12 00:47:24 +07:00
committed by GitHub
parent 7837d40f57
commit 12f7b2a005
122 changed files with 774 additions and 263 deletions
@@ -50,7 +50,9 @@ class _AddActionButtonState extends ConsumerState<AddActionButton> {
List<Widget> _buildMenuChildren() {
final asset = ref.read(assetViewerProvider).currentAsset;
if (asset == null) return [];
if (asset == null) {
return [];
}
final user = ref.read(currentUserProvider);
final isOwner = asset is RemoteAsset && asset.ownerId == user?.id;
@@ -12,7 +12,9 @@ import 'package:immich_mobile/widgets/common/immich_toast.dart';
// used to allow performing archive action from different sources (without duplicating code)
Future<void> performArchiveAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async {
if (!context.mounted) return;
if (!context.mounted) {
return;
}
if (source == ActionSource.viewer) {
EventStream.shared.emit(const ViewerReloadAssetEvent());
@@ -54,7 +54,9 @@ class DeleteActionButton extends ConsumerWidget {
],
),
);
if (confirm != true) return;
if (confirm != true) {
return;
}
}
if (source == ActionSource.viewer) {
@@ -33,7 +33,9 @@ class DeletePermanentActionButton extends ConsumerWidget {
builder: (context) => PermanentDeleteDialog(count: count),
) ??
false;
if (!confirm) return;
if (!confirm) {
return;
}
if (source == ActionSource.viewer) {
EventStream.shared.emit(const ViewerReloadAssetEvent());
@@ -12,7 +12,9 @@ import 'package:immich_mobile/widgets/common/immich_toast.dart';
// Reusable helper: move to locked folder from any source (e.g called from menu)
Future<void> performMoveToLockFolderAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async {
if (!context.mounted) return;
if (!context.mounted) {
return;
}
if (source == ActionSource.viewer) {
EventStream.shared.emit(const ViewerReloadAssetEvent());
@@ -14,7 +14,9 @@ import 'package:immich_mobile/domain/utils/event_stream.dart';
// used to allow performing unarchive action from different sources (without duplicating code)
Future<void> performUnArchiveAction(BuildContext context, WidgetRef ref, {required ActionSource source}) async {
if (!context.mounted) return;
if (!context.mounted) {
return;
}
if (source == ActionSource.viewer) {
EventStream.shared.emit(const ViewerReloadAssetEvent());