diff --git a/lib/screens/channel_chat_screen.dart b/lib/screens/channel_chat_screen.dart index 564e274..cabd631 100644 --- a/lib/screens/channel_chat_screen.dart +++ b/lib/screens/channel_chat_screen.dart @@ -687,7 +687,8 @@ class _ChannelChatScreenState extends State { ], ], ), - if (message.hopCount != null && message.hopCount! > 0) ...[ + if (message.hopCount != null && + message.hopCount! > 0) ...[ const SizedBox(height: 4), _buildHopBadge(context, message), ], @@ -1312,7 +1313,9 @@ class _ChannelChatScreenState extends State { } } recentTime.forEach((name, time) { - candidates.add(MentionCandidate(name: name, recent: true, lastSeen: time)); + candidates.add( + MentionCandidate(name: name, recent: true, lastSeen: time), + ); seen.add(name.toLowerCase()); }); @@ -1445,8 +1448,9 @@ class _ChannelChatScreenState extends State { _ensureDateFormats(context); final now = DateTime.now(); final today = DateTime(now.year, now.month, now.day); - final daysAgo = - today.difference(DateTime(time.year, time.month, time.day)).inDays; + final daysAgo = today + .difference(DateTime(time.year, time.month, time.day)) + .inDays; final label = daysAgo == 0 ? 'Today' : daysAgo == 1 diff --git a/lib/screens/settings/settings_shell.dart b/lib/screens/settings/settings_shell.dart index 2d0c1a5..02ceb57 100644 --- a/lib/screens/settings/settings_shell.dart +++ b/lib/screens/settings/settings_shell.dart @@ -84,8 +84,9 @@ class _SettingsShellState extends State { leading: Icon(category.icon), title: Text(category.title), selected: i == selected, - selectedTileColor: - Theme.of(context).colorScheme.surfaceContainerHighest, + selectedTileColor: Theme.of( + context, + ).colorScheme.surfaceContainerHighest, onTap: () => setState(() => _selected = i), ); }, @@ -117,8 +118,9 @@ class _SettingsShellState extends State { return ListTile( leading: Icon(category.icon), title: Text(category.title), - subtitle: - category.subtitle != null ? Text(category.subtitle!) : null, + subtitle: category.subtitle != null + ? Text(category.subtitle!) + : null, trailing: const Icon(Icons.chevron_right), onTap: () => _openDetail(context, category), ); diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 56ffb8e..3fb9b95 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -143,7 +143,8 @@ class _SettingsScreenState extends State { title: Text(l10n.radioStats_settingsTile), subtitle: Text(l10n.radioStats_settingsSubtitle), trailing: const Icon(Icons.chevron_right), - enabled: connector.isConnected && + enabled: + connector.isConnected && connector.supportsCompanionRadioStats, onTap: () => pushCompanionRadioStatsScreen(context), ), @@ -167,8 +168,9 @@ class _SettingsScreenState extends State { ListTile( leading: const Icon(Icons.person_outline), title: Text(l10n.settings_nodeName), - subtitle: - Text(connector.selfName ?? l10n.settings_nodeNameNotSet), + subtitle: Text( + connector.selfName ?? l10n.settings_nodeNameNotSet, + ), trailing: const Icon(Icons.chevron_right), onTap: () => _editNodeName(context, connector), ), diff --git a/lib/widgets/gif_picker.dart b/lib/widgets/gif_picker.dart index 7cd335e..fcae16e 100644 --- a/lib/widgets/gif_picker.dart +++ b/lib/widgets/gif_picker.dart @@ -22,8 +22,7 @@ class _GifPickerState extends State { // Giphy API key — injected at build time, never hardcoded. Provide it via: // flutter build ... --dart-define-from-file=dart_defines.json // (or --dart-define=GIPHY_API_KEY=). Empty when unset → the picker shows a hint. - static const String _giphyApiKey = - String.fromEnvironment('GIPHY_API_KEY'); + static const String _giphyApiKey = String.fromEnvironment('GIPHY_API_KEY'); @override void initState() { @@ -39,8 +38,10 @@ class _GifPickerState extends State { Future _loadTrendingGifs() async { if (_giphyApiKey.isEmpty) { - setState(() => _error = - 'GIF picker needs a Giphy API key (build with --dart-define=GIPHY_API_KEY=).'); + setState( + () => _error = + 'GIF picker needs a Giphy API key (build with --dart-define=GIPHY_API_KEY=).', + ); return; } setState(() { diff --git a/lib/widgets/mention_autocomplete.dart b/lib/widgets/mention_autocomplete.dart index df43ca7..26dd575 100644 --- a/lib/widgets/mention_autocomplete.dart +++ b/lib/widgets/mention_autocomplete.dart @@ -26,7 +26,12 @@ class _Entry { final String? emoji; // leading glyph (emoji rows) final IconData? icon; // leading icon (mention rows) final String insert; // replacement text for the trigger token - const _Entry({required this.label, this.emoji, this.icon, required this.insert}); + const _Entry({ + required this.label, + this.emoji, + this.icon, + required this.insert, + }); } /// Wraps [ByteCountedTextField] with autocomplete for `@`-mentions and @@ -287,7 +292,13 @@ class _MentionAutocompleteFieldState extends State { // Best 8, then reversed so the best sits at the bottom (nearest the input). final top = names.take(8).toList().reversed.toList(); _matches = top - .map((k) => _Entry(label: ':$k:', emoji: shortcodes[k], insert: shortcodes[k]!)) + .map( + (k) => _Entry( + label: ':$k:', + emoji: shortcodes[k], + insert: shortcodes[k]!, + ), + ) .toList(); _recentStart = _matches.length; // no divider for emoji _highlighted = _matches.length - 1; @@ -390,7 +401,9 @@ class _MentionAutocompleteFieldState extends State { final children = []; for (var i = 0; i < _matches.length; i++) { - if (i == _recentStart && _recentStart > 0 && _recentStart < _matches.length) { + if (i == _recentStart && + _recentStart > 0 && + _recentStart < _matches.length) { children.add(_recentDivider(theme)); } final e = _matches[i]; @@ -422,8 +435,9 @@ class _MentionAutocompleteFieldState extends State { overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 13, - fontWeight: - selected ? FontWeight.w600 : FontWeight.normal, + fontWeight: selected + ? FontWeight.w600 + : FontWeight.normal, ), ), ),