refactor: DCM - const border radius, constructor & switch expressions (#19515)

* enable border radius, switch exp, const constructor

* regenerate provider

* more formatting

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2025-06-25 13:06:24 +05:30 committed by GitHub
parent 05064f87f0
commit 5b0575b956
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
130 changed files with 338 additions and 264 deletions

View file

@ -4,12 +4,12 @@ import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/providers/map/map_state.provider.dart';
import 'package:immich_mobile/widgets/map/map_settings_sheet.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
import 'package:immich_mobile/utils/selection_handlers.dart';
import 'package:immich_mobile/widgets/map/map_settings_sheet.dart';
class MapAppBar extends HookWidget implements PreferredSizeWidget {
final ValueNotifier<Set<Asset>> selectedAssets;
@ -24,7 +24,7 @@ class MapAppBar extends HookWidget implements PreferredSizeWidget {
valueListenable: selectedAssets,
builder: (ctx, value, child) => value.isNotEmpty
? _SelectionRow(selectedAssets: selectedAssets)
: _NonSelectionRow(),
: const _NonSelectionRow(),
),
);
}
@ -34,6 +34,8 @@ class MapAppBar extends HookWidget implements PreferredSizeWidget {
}
class _NonSelectionRow extends StatelessWidget {
const _NonSelectionRow();
@override
Widget build(BuildContext context) {
void onSettingsPressed() {

View file

@ -185,7 +185,7 @@ class MapAssetGrid extends HookConsumerWidget {
},
loading: () => const SizedBox.shrink(),
)
: _MapNoAssetsInSheet(),
: const _MapNoAssetsInSheet(),
),
),
_MapSheetDragRegion(
@ -201,6 +201,8 @@ class MapAssetGrid extends HookConsumerWidget {
}
class _MapNoAssetsInSheet extends StatelessWidget {
const _MapNoAssetsInSheet();
@override
Widget build(BuildContext context) {
const image = Image(

View file

@ -108,7 +108,7 @@ class _PinPainter extends CustomPainter {
final double primaryRadius;
final double secondaryRadius;
_PinPainter({
const _PinPainter({
required this.primaryColor,
required this.secondaryColor,
required this.primaryRadius,