mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 09:14:58 +03: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:
@@ -15,28 +15,20 @@ import 'package:immich_mobile/widgets/common/mesmerizing_sliver_app_bar.dart';
|
||||
class DriftPartnerDetailPage extends StatelessWidget {
|
||||
final PartnerUserDto partner;
|
||||
|
||||
const DriftPartnerDetailPage({
|
||||
super.key,
|
||||
required this.partner,
|
||||
});
|
||||
const DriftPartnerDetailPage({super.key, required this.partner});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ProviderScope(
|
||||
overrides: [
|
||||
timelineServiceProvider.overrideWith(
|
||||
(ref) {
|
||||
final timelineService = ref.watch(timelineFactoryProvider).remoteAssets(partner.id);
|
||||
ref.onDispose(timelineService.dispose);
|
||||
return timelineService;
|
||||
},
|
||||
),
|
||||
timelineServiceProvider.overrideWith((ref) {
|
||||
final timelineService = ref.watch(timelineFactoryProvider).remoteAssets(partner.id);
|
||||
ref.onDispose(timelineService.dispose);
|
||||
return timelineService;
|
||||
}),
|
||||
],
|
||||
child: Timeline(
|
||||
appBar: MesmerizingSliverAppBar(
|
||||
title: partner.name,
|
||||
icon: Icons.person_outline,
|
||||
),
|
||||
appBar: MesmerizingSliverAppBar(title: partner.name, icon: Icons.person_outline),
|
||||
topSliverWidget: _InfoBox(partner: partner),
|
||||
topSliverWidgetHeight: 110,
|
||||
bottomSheet: const PartnerDetailBottomSheet(),
|
||||
@@ -48,9 +40,7 @@ class DriftPartnerDetailPage extends StatelessWidget {
|
||||
class _InfoBox extends ConsumerStatefulWidget {
|
||||
final PartnerUserDto partner;
|
||||
|
||||
const _InfoBox({
|
||||
required this.partner,
|
||||
});
|
||||
const _InfoBox({required this.partner});
|
||||
|
||||
@override
|
||||
ConsumerState<_InfoBox> createState() => _InfoBoxState();
|
||||
@@ -72,10 +62,7 @@ class _InfoBoxState extends ConsumerState<_InfoBox> {
|
||||
}
|
||||
|
||||
try {
|
||||
await ref.read(partnerUsersProvider.notifier).toggleShowInTimeline(
|
||||
widget.partner.id,
|
||||
user.id,
|
||||
);
|
||||
await ref.read(partnerUsersProvider.notifier).toggleShowInTimeline(widget.partner.id, user.id);
|
||||
|
||||
setState(() {
|
||||
_inTimeline = !_inTimeline;
|
||||
@@ -101,18 +88,10 @@ class _InfoBoxState extends ConsumerState<_InfoBox> {
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0, top: 16.0),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: context.colorScheme.onSurface.withAlpha(10),
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
border: Border.all(color: context.colorScheme.onSurface.withAlpha(10), width: 1),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
context.colorScheme.primary.withAlpha(10),
|
||||
context.colorScheme.primary.withAlpha(15),
|
||||
],
|
||||
colors: [context.colorScheme.primary.withAlpha(10), context.colorScheme.primary.withAlpha(15)],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
@@ -122,18 +101,13 @@ class _InfoBoxState extends ConsumerState<_InfoBox> {
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
"Show in timeline",
|
||||
style: context.textTheme.titleSmall?.copyWith(
|
||||
color: context.colorScheme.primary,
|
||||
),
|
||||
style: context.textTheme.titleSmall?.copyWith(color: context.colorScheme.primary),
|
||||
),
|
||||
subtitle: Text(
|
||||
"Show photos and videos from this user in your timeline",
|
||||
style: context.textTheme.bodyMedium,
|
||||
),
|
||||
trailing: Switch(
|
||||
value: _inTimeline,
|
||||
onChanged: (_) => _toggleInTimeline(),
|
||||
),
|
||||
trailing: Switch(value: _inTimeline, onChanged: (_) => _toggleInTimeline()),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user