add ticker page bloc and avatar disk cache

This commit is contained in:
2026-07-12 23:18:53 +02:00
parent 94794ff092
commit 9b5198c6db
18 changed files with 944 additions and 233 deletions
@@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
import '../../../../extensions/date_time.dart';
import '../../../../theming/app_theme.dart';
/// Non-interactive "Aktualisiert am …" mini heading above the content card
/// (refresh is pull-to-refresh). Left-aligned with the card's content indent.
/// Renders nothing when [publishedAt] is missing/unparseable.
class TickerUpdatedBar extends StatelessWidget {
final String? publishedAt;
const TickerUpdatedBar({super.key, this.publishedAt});
@override
Widget build(BuildContext context) {
final iso = publishedAt;
final parsed = iso == null || iso.isEmpty ? null : DateTime.tryParse(iso);
if (parsed == null) return const SizedBox.shrink();
final theme = Theme.of(context);
final muted = theme.colorScheme.onSurfaceVariant;
return Padding(
padding: const EdgeInsets.fromLTRB(
AppSpacing.sm + AppSpacing.md,
AppSpacing.sm,
AppSpacing.md,
AppSpacing.xs,
),
child: Row(
children: [
Icon(Icons.schedule, size: 13, color: muted),
const SizedBox(width: AppSpacing.xs),
Text(
'Aktualisiert am ${parsed.toLocal().formatDateTime()}',
style: theme.textTheme.labelSmall?.copyWith(color: muted),
),
],
),
);
}
}