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

@ -274,8 +274,10 @@ class ImmichAppBarDialog extends HookConsumerWidget {
right: horizontalPadding,
bottom: isHorizontal ? 20 : 100,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(20),
),
),
child: SizedBox(
child: SingleChildScrollView(

View file

@ -96,8 +96,8 @@ class AppBarProfileInfoBox extends HookConsumerWidget {
child: Material(
color: context.colorScheme.surfaceContainerHighest,
elevation: 3,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50.0),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(50.0)),
),
child: Padding(
padding: const EdgeInsets.all(5.0),

View file

@ -1,10 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart' hide Store;
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/extensions/theme_extensions.dart';
import 'package:immich_mobile/models/server_info/server_info.model.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:immich_mobile/providers/locale_provider.dart';
import 'package:immich_mobile/providers/server_info.provider.dart';
import 'package:immich_mobile/utils/url_helper.dart';
@ -173,7 +173,8 @@ class AppBarServerInfo extends HookConsumerWidget {
verticalOffset: 0,
decoration: BoxDecoration(
color: context.primaryColor.withValues(alpha: 0.9),
borderRadius: BorderRadius.circular(10),
borderRadius:
const BorderRadius.all(Radius.circular(10)),
),
textStyle: TextStyle(
color: