mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
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:
parent
05064f87f0
commit
5b0575b956
130 changed files with 338 additions and 264 deletions
|
|
@ -106,7 +106,9 @@ class AlbumThumbnailCard extends ConsumerWidget {
|
|||
width: cardSize,
|
||||
height: cardSize,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
child: album.thumbnail.value == null
|
||||
? buildEmptyThumbnail()
|
||||
: buildAlbumThumbnail(),
|
||||
|
|
|
|||
|
|
@ -59,13 +59,17 @@ class AlbumTitleTextField extends ConsumerWidget {
|
|||
splashRadius: 10,
|
||||
)
|
||||
: null,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(color: Colors.transparent),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.transparent),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(color: Colors.transparent),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.transparent),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
),
|
||||
),
|
||||
hintText: 'add_a_title'.tr(),
|
||||
hintStyle: context.themeData.inputDecorationTheme.hintStyle?.copyWith(
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class RenderAssetGridElement {
|
|||
final int offset;
|
||||
final int totalCount;
|
||||
|
||||
RenderAssetGridElement(
|
||||
const RenderAssetGridElement(
|
||||
this.type, {
|
||||
this.title,
|
||||
required this.date,
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ class DraggableScrollbar extends StatefulWidget {
|
|||
BoxConstraints? labelConstraints,
|
||||
}) {
|
||||
final scrollThumb = ClipPath(
|
||||
clipper: ArrowClipper(),
|
||||
clipper: const ArrowClipper(),
|
||||
child: Container(
|
||||
height: height,
|
||||
width: 20.0,
|
||||
|
|
@ -570,6 +570,7 @@ class ArrowCustomPainter extends CustomPainter {
|
|||
|
||||
///This cut 2 lines in arrow shape
|
||||
class ArrowClipper extends CustomClipper<Path> {
|
||||
const ArrowClipper();
|
||||
@override
|
||||
Path getClip(Size size) {
|
||||
Path path = Path();
|
||||
|
|
|
|||
|
|
@ -479,6 +479,7 @@ class ArrowCustomPainter extends CustomPainter {
|
|||
|
||||
///This cut 2 lines in arrow shape
|
||||
class ArrowClipper extends CustomClipper<Path> {
|
||||
const ArrowClipper();
|
||||
@override
|
||||
Path getClip(Size size) {
|
||||
Path path = Path();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ class AdvancedBottomSheet extends HookConsumerWidget {
|
|||
color: context.isDarkTheme
|
||||
? Colors.grey[900]
|
||||
: Colors.grey[200],
|
||||
borderRadius: BorderRadius.circular(15.0),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
|
|
|
|||
|
|
@ -83,8 +83,10 @@ class GalleryAppBar extends ConsumerWidget {
|
|||
addToAlbum(Asset addToAlbumAsset) {
|
||||
showModalBottomSheet(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(15.0),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
context: context,
|
||||
builder: (BuildContext _) {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import 'package:immich_mobile/models/backup/available_album.model.dart';
|
|||
import 'package:immich_mobile/providers/album/album.provider.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/providers/backup/backup.provider.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
import 'package:immich_mobile/providers/haptic_feedback.provider.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/widgets/common/immich_toast.dart';
|
||||
|
||||
|
|
@ -46,7 +46,9 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
if (isSelected) {
|
||||
return Chip(
|
||||
visualDensity: VisualDensity.compact,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
),
|
||||
label: Text(
|
||||
"album_info_card_backup_album_included",
|
||||
style: TextStyle(
|
||||
|
|
@ -60,7 +62,9 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
} else if (isExcluded) {
|
||||
return Chip(
|
||||
visualDensity: VisualDensity.compact,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
),
|
||||
label: Text(
|
||||
"album_info_card_backup_album_excluded",
|
||||
style: TextStyle(
|
||||
|
|
@ -125,7 +129,9 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||
clipBehavior: Clip.hardEdge,
|
||||
margin: const EdgeInsets.all(1),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12), // if you need this
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(12), // if you need this
|
||||
),
|
||||
side: BorderSide(
|
||||
color: isDarkTheme
|
||||
? const Color.fromARGB(255, 37, 35, 35)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ class BackupInfoCard extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20), // if you need this
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20), // if you need this
|
||||
),
|
||||
side: BorderSide(
|
||||
color: context.colorScheme.outlineVariant,
|
||||
width: 1,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -172,11 +172,15 @@ class _DateTimePicker extends HookWidget {
|
|||
ListTile(
|
||||
tileColor: context.colorScheme.surfaceContainerHighest,
|
||||
shape: ShapeBorder.lerp(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
),
|
||||
),
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
),
|
||||
),
|
||||
1,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
|
|||
useRootNavigator: false,
|
||||
builder: (ctx) => const ImmichAppBarDialog(),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
child: Badge(
|
||||
label: Container(
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -120,7 +120,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
|
|||
|
||||
return InkWell(
|
||||
onTap: () => context.pushRoute(const BackupControllerRoute()),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
child: Badge(
|
||||
label: Container(
|
||||
width: widgetSize / 2,
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class _ProfileIndicator extends ConsumerWidget {
|
|||
useRootNavigator: false,
|
||||
builder: (ctx) => const ImmichAppBarDialog(),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
child: Badge(
|
||||
label: Container(
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -185,7 +185,7 @@ class _BackupIndicator extends ConsumerWidget {
|
|||
|
||||
return InkWell(
|
||||
onTap: () => context.pushRoute(const BackupControllerRoute()),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
child: Badge(
|
||||
label: Container(
|
||||
width: widgetSize / 2,
|
||||
|
|
|
|||
|
|
@ -47,25 +47,33 @@ class SearchField extends StatelessWidget {
|
|||
color: context.themeData.colorScheme.onSurfaceSecondary,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(25),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: context.colorScheme.surfaceDim,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(25),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: context.colorScheme.surfaceContainer,
|
||||
),
|
||||
),
|
||||
disabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(25),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: context.colorScheme.surfaceDim,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(25),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: context.colorScheme.primary.withAlpha(100),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -394,7 +394,9 @@ class LoginForm extends HookConsumerWidget {
|
|||
decoration: BoxDecoration(
|
||||
color:
|
||||
context.isDarkTheme ? Colors.red.shade700 : Colors.red.shade100,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(8),
|
||||
),
|
||||
border: Border.all(
|
||||
color:
|
||||
context.isDarkTheme ? Colors.red.shade900 : Colors.red[200]!,
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ class MemoryCard extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
color: Colors.black,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
side: const BorderSide(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(25.0)),
|
||||
side: BorderSide(
|
||||
color: Colors.black,
|
||||
width: 1.0,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import 'package:immich_mobile/widgets/photo_view/photo_view.dart'
|
|||
PhotoViewImageScaleEndCallback,
|
||||
PhotoViewImageLongPressStartCallback,
|
||||
ScaleStateCycle;
|
||||
|
||||
import 'package:immich_mobile/widgets/photo_view/src/controller/photo_view_controller.dart';
|
||||
import 'package:immich_mobile/widgets/photo_view/src/controller/photo_view_scalestate_controller.dart';
|
||||
import 'package:immich_mobile/widgets/photo_view/src/core/photo_view_gesture_detector.dart';
|
||||
|
|
@ -358,7 +357,7 @@ class PhotoViewGalleryPageOptions {
|
|||
childSize = null,
|
||||
assert(imageProvider != null);
|
||||
|
||||
PhotoViewGalleryPageOptions.customChild({
|
||||
const PhotoViewGalleryPageOptions.customChild({
|
||||
required this.child,
|
||||
this.childSize,
|
||||
this.heroAttributes,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class PersonNameEditFormResult {
|
|||
final bool success;
|
||||
final String updatedName;
|
||||
|
||||
PersonNameEditFormResult(this.success, this.updatedName);
|
||||
const PersonNameEditFormResult(this.success, this.updatedName);
|
||||
}
|
||||
|
||||
class PersonNameEditForm extends HookConsumerWidget {
|
||||
|
|
@ -47,7 +47,7 @@ class PersonNameEditForm extends HookConsumerWidget {
|
|||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => context.pop(
|
||||
PersonNameEditFormResult(false, ''),
|
||||
const PersonNameEditFormResult(false, ''),
|
||||
),
|
||||
child: Text(
|
||||
"cancel",
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ class SearchDropdown<T> extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final menuStyle = MenuStyle(
|
||||
final menuStyle = const MenuStyle(
|
||||
shape: WidgetStatePropertyAll<OutlinedBorder>(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class BackgroundBackupSettings extends ConsumerWidget {
|
|||
onBatteryInfo: showBatteryOptimizationInfoToUser,
|
||||
),
|
||||
if (Platform.isIOS && iosSettings?.appRefreshEnabled != true)
|
||||
_IOSBackgroundRefreshDisabled(),
|
||||
const _IOSBackgroundRefreshDisabled(),
|
||||
if (Platform.isIOS && iosSettings != null)
|
||||
IosDebugInfoTile(settings: iosSettings),
|
||||
],
|
||||
|
|
@ -106,6 +106,8 @@ class BackgroundBackupSettings extends ConsumerWidget {
|
|||
}
|
||||
|
||||
class _IOSBackgroundRefreshDisabled extends StatelessWidget {
|
||||
const _IOSBackgroundRefreshDisabled();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsButtonListTile(
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ class ExternalNetworkPreference extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final entries =
|
||||
useState([AuxilaryEndpoint(url: '', status: AuxCheckStatus.unknown)]);
|
||||
final entries = useState(
|
||||
[const AuxilaryEndpoint(url: '', status: AuxCheckStatus.unknown)],
|
||||
);
|
||||
final canSave = useState(false);
|
||||
|
||||
saveEndpointList() {
|
||||
|
|
@ -169,7 +170,7 @@ class ExternalNetworkPreference extends HookConsumerWidget {
|
|||
? () {
|
||||
entries.value = [
|
||||
...entries.value,
|
||||
AuxilaryEndpoint(
|
||||
const AuxilaryEndpoint(
|
||||
url: '',
|
||||
status: AuxCheckStatus.unknown,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
|||
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
||||
import 'package:immich_mobile/providers/theme.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart';
|
||||
import 'package:immich_mobile/theme/color_scheme.dart';
|
||||
import 'package:immich_mobile/theme/dynamic_theme.dart';
|
||||
import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart';
|
||||
|
||||
class PrimaryColorSetting extends HookConsumerWidget {
|
||||
const PrimaryColorSetting({
|
||||
|
|
@ -136,8 +136,8 @@ class PrimaryColorSetting extends HookConsumerWidget {
|
|||
dense: true,
|
||||
activeColor: context.primaryColor,
|
||||
tileColor: context.colorScheme.surfaceContainerHigh,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
title: Text(
|
||||
'theme_setting_system_primary_color_title'.tr(),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class SettingsRadioGroup<T> {
|
|||
final String title;
|
||||
final T value;
|
||||
|
||||
SettingsRadioGroup({required this.title, required this.value});
|
||||
const SettingsRadioGroup({required this.title, required this.value});
|
||||
}
|
||||
|
||||
class SettingsRadioListTile<T> extends StatelessWidget {
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ class SharedLinkItem extends ConsumerWidget {
|
|||
verticalOffset: 0,
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.primary.withValues(alpha: 0.9),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||
),
|
||||
textStyle: TextStyle(
|
||||
color: isDarkMode ? Colors.black : Colors.white,
|
||||
|
|
@ -268,7 +268,7 @@ class SharedLinkItem extends ConsumerWidget {
|
|||
verticalOffset: 0,
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.primary.withValues(alpha: 0.9),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||
),
|
||||
textStyle: TextStyle(
|
||||
color: isDarkMode ? Colors.black : Colors.white,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue