chore(#19): dart format baseline (whitespace-only)

Run dart format across the repo to clean drift in 5 files (channel_chat_screen, settings_screen, settings_shell, gif_picker, mention_autocomplete) from earlier straight-to-dev commits that never hit the format CI. No logic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pull/27/head
Strycher 1 month ago
parent 7d0080f2cd
commit 794faf1880

@ -687,7 +687,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
],
],
),
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<ChannelChatScreen> {
}
}
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<ChannelChatScreen> {
_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

@ -84,8 +84,9 @@ class _SettingsShellState extends State<SettingsShell> {
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<SettingsShell> {
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),
);

@ -143,7 +143,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
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<SettingsScreen> {
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),
),

@ -22,8 +22,7 @@ class _GifPickerState extends State<GifPicker> {
// 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=<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<GifPicker> {
Future<void> _loadTrendingGifs() async {
if (_giphyApiKey.isEmpty) {
setState(() => _error =
'GIF picker needs a Giphy API key (build with --dart-define=GIPHY_API_KEY=<key>).');
setState(
() => _error =
'GIF picker needs a Giphy API key (build with --dart-define=GIPHY_API_KEY=<key>).',
);
return;
}
setState(() {

@ -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<MentionAutocompleteField> {
// 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<MentionAutocompleteField> {
final children = <Widget>[];
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<MentionAutocompleteField> {
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 13,
fontWeight:
selected ? FontWeight.w600 : FontWeight.normal,
fontWeight: selected
? FontWeight.w600
: FontWeight.normal,
),
),
),

Loading…
Cancel
Save

Powered by TurnKey Linux.