mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: bump dart sdk to 3.8 (#20355)
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
9b3718120b
commit
e52b9d15b5
643 changed files with 32561 additions and 35292 deletions
|
|
@ -13,12 +13,7 @@ class ActivityTextField extends HookConsumerWidget {
|
|||
final String? likeId;
|
||||
final Function(String) onSubmit;
|
||||
|
||||
const ActivityTextField({
|
||||
required this.onSubmit,
|
||||
this.isEnabled = true,
|
||||
this.likeId,
|
||||
super.key,
|
||||
});
|
||||
const ActivityTextField({required this.onSubmit, this.isEnabled = true, this.likeId, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
|
|
@ -31,13 +26,10 @@ class ActivityTextField extends HookConsumerWidget {
|
|||
final liked = likeId != null;
|
||||
|
||||
// Show keyboard immediately on activities open
|
||||
useEffect(
|
||||
() {
|
||||
inputFocusNode.requestFocus();
|
||||
return null;
|
||||
},
|
||||
[],
|
||||
);
|
||||
useEffect(() {
|
||||
inputFocusNode.requestFocus();
|
||||
return null;
|
||||
}, []);
|
||||
|
||||
// Pass text to callback and reset controller
|
||||
void onEditingComplete() {
|
||||
|
|
@ -70,29 +62,19 @@ class ActivityTextField extends HookConsumerWidget {
|
|||
prefixIcon: user != null
|
||||
? Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: UserCircleAvatar(
|
||||
user: user,
|
||||
size: 30,
|
||||
radius: 15,
|
||||
),
|
||||
child: UserCircleAvatar(user: user, size: 30, radius: 15),
|
||||
)
|
||||
: null,
|
||||
suffixIcon: Padding(
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
liked ? Icons.favorite_rounded : Icons.favorite_border_rounded,
|
||||
),
|
||||
icon: Icon(liked ? Icons.favorite_rounded : Icons.favorite_border_rounded),
|
||||
onPressed: liked ? removeLike : addLike,
|
||||
),
|
||||
),
|
||||
suffixIconColor: liked ? Colors.red[700] : null,
|
||||
hintText: !isEnabled ? 'shared_album_activities_input_disable'.tr() : 'say_something'.tr(),
|
||||
hintStyle: TextStyle(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 14,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
hintStyle: TextStyle(fontWeight: FontWeight.normal, fontSize: 14, color: Colors.grey[600]),
|
||||
),
|
||||
onEditingComplete: onEditingComplete,
|
||||
onTapOutside: (_) => inputFocusNode.unfocus(),
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@ class ActivityTile extends HookConsumerWidget {
|
|||
? Container(
|
||||
width: 44,
|
||||
alignment: Alignment.center,
|
||||
child: Icon(
|
||||
Icons.favorite_rounded,
|
||||
color: Colors.red[700],
|
||||
),
|
||||
child: Icon(Icons.favorite_rounded, color: Colors.red[700]),
|
||||
)
|
||||
: UserCircleAvatar(user: activity.user),
|
||||
title: _ActivityTitle(
|
||||
|
|
@ -50,11 +47,7 @@ class _ActivityTitle extends StatelessWidget {
|
|||
final String createdAt;
|
||||
final bool leftAlign;
|
||||
|
||||
const _ActivityTitle({
|
||||
required this.userName,
|
||||
required this.createdAt,
|
||||
required this.leftAlign,
|
||||
});
|
||||
const _ActivityTitle({required this.userName, required this.createdAt, required this.leftAlign});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -65,16 +58,8 @@ class _ActivityTitle extends StatelessWidget {
|
|||
mainAxisAlignment: leftAlign ? MainAxisAlignment.start : MainAxisAlignment.spaceBetween,
|
||||
mainAxisSize: leftAlign ? MainAxisSize.min : MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
userName,
|
||||
style: textStyle,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
if (leftAlign)
|
||||
Text(
|
||||
" • ",
|
||||
style: textStyle,
|
||||
),
|
||||
Text(userName, style: textStyle, overflow: TextOverflow.ellipsis),
|
||||
if (leftAlign) Text(" • ", style: textStyle),
|
||||
Expanded(
|
||||
child: Text(
|
||||
createdAt,
|
||||
|
|
@ -101,9 +86,7 @@ class _ActivityAssetThumbnail extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
||||
image: DecorationImage(
|
||||
image: ImmichRemoteThumbnailProvider(
|
||||
assetId: assetId,
|
||||
),
|
||||
image: ImmichRemoteThumbnailProvider(assetId: assetId),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -8,20 +8,13 @@ class DismissibleActivity extends StatelessWidget {
|
|||
final ActivityTile body;
|
||||
final Function(String)? onDismiss;
|
||||
|
||||
const DismissibleActivity(
|
||||
this.activityId,
|
||||
this.body, {
|
||||
this.onDismiss,
|
||||
super.key,
|
||||
});
|
||||
const DismissibleActivity(this.activityId, this.body, {this.onDismiss, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dismissible(
|
||||
key: Key(activityId),
|
||||
dismissThresholds: const {
|
||||
DismissDirection.horizontal: 0.7,
|
||||
},
|
||||
dismissThresholds: const {DismissDirection.horizontal: 0.7},
|
||||
direction: DismissDirection.horizontal,
|
||||
confirmDismiss: (direction) => onDismiss != null
|
||||
? showDialog(
|
||||
|
|
@ -51,10 +44,7 @@ class _DismissBackground extends StatelessWidget {
|
|||
final AlignmentDirectional alignment;
|
||||
final bool withDeleteIcon;
|
||||
|
||||
const _DismissBackground({
|
||||
required this.withDeleteIcon,
|
||||
this.alignment = AlignmentDirectional.centerStart,
|
||||
});
|
||||
const _DismissBackground({required this.withDeleteIcon, this.alignment = AlignmentDirectional.centerStart});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -64,10 +54,7 @@ class _DismissBackground extends StatelessWidget {
|
|||
child: withDeleteIcon
|
||||
? const Padding(
|
||||
padding: EdgeInsets.all(15),
|
||||
child: Icon(
|
||||
Icons.delete_sweep_rounded,
|
||||
color: Colors.black,
|
||||
),
|
||||
child: Icon(Icons.delete_sweep_rounded, color: Colors.black),
|
||||
)
|
||||
: null,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue