dart format whole tree

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-03 21:51:59 +02:00
co-authored by Claude
parent c436e72c5c
commit 9c7ec008dc
102 changed files with 1176 additions and 1282 deletions
+2 -1
View File
@@ -39,7 +39,8 @@ class ClideAccordion extends StatelessWidget {
ClideIcon(expanded ? PhosphorIcons.caretDown : PhosphorIcons.caretRight, size: 10, color: tokens.globalTextMuted),
const SizedBox(width: 6),
if (leading != null) ...[leading!, const SizedBox(width: 6)],
ClideText('$label · $count', fontSize: clideFontSmall, color: hovered ? tokens.globalForeground : tokens.sidebarSectionHeader, fontFamily: clideMonoFamily),
ClideText('$label · $count',
fontSize: clideFontSmall, color: hovered ? tokens.globalForeground : tokens.sidebarSectionHeader, fontFamily: clideMonoFamily),
],
),
),
+1 -2
View File
@@ -52,6 +52,5 @@ class _IconPainterAdapter extends CustomPainter {
}
@override
bool shouldRepaint(covariant _IconPainterAdapter old) =>
old.painter != painter || old.color != color;
bool shouldRepaint(covariant _IconPainterAdapter old) => old.painter != painter || old.color != color;
}
+12 -3
View File
@@ -130,7 +130,10 @@ class ClideMarkdown extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisSize: MainAxisSize.min,
children: [for (final c in el.children ?? const []) if (c is md.Element) _buildListItem(c, tokens, onRecordTap, ordered: false)],
children: [
for (final c in el.children ?? const [])
if (c is md.Element) _buildListItem(c, tokens, onRecordTap, ordered: false)
],
),
);
case 'ol':
@@ -266,12 +269,18 @@ class ClideMarkdown extends StatelessWidget {
case 'strong':
return TextSpan(
style: const TextStyle(fontWeight: FontWeight.w700),
children: [for (final c in el.children ?? const []) if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)],
children: [
for (final c in el.children ?? const [])
if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)
],
);
case 'em':
return TextSpan(
style: const TextStyle(fontStyle: FontStyle.italic),
children: [for (final c in el.children ?? const []) if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)],
children: [
for (final c in el.children ?? const [])
if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)
],
);
case 'code':
return TextSpan(
+6 -5
View File
@@ -151,12 +151,13 @@ class _Header extends StatelessWidget {
],
),
),
if (trailing != null) ...trailing!.map(
(w) => Padding(
padding: const EdgeInsets.only(left: 6),
child: w,
if (trailing != null)
...trailing!.map(
(w) => Padding(
padding: const EdgeInsets.only(left: 6),
child: w,
),
),
),
if (onClose != null)
Padding(
padding: const EdgeInsets.only(left: 6),
+1 -4
View File
@@ -47,8 +47,5 @@ class ScrollbarTheme extends InheritedWidget {
final Color track;
@override
bool updateShouldNotify(ScrollbarTheme old) =>
slider != old.slider ||
sliderHover != old.sliderHover ||
track != old.track;
bool updateShouldNotify(ScrollbarTheme old) => slider != old.slider || sliderHover != old.sliderHover || track != old.track;
}
+1 -2
View File
@@ -37,8 +37,7 @@ class ClideText extends StatelessWidget {
@override
Widget build(BuildContext context) {
final tokens = ClideTheme.of(context).surface;
final resolved =
color ?? (muted ? tokens.globalTextMuted : tokens.globalForeground);
final resolved = color ?? (muted ? tokens.globalTextMuted : tokens.globalForeground);
return Text(
data,
maxLines: maxLines,
+1 -2
View File
@@ -18,8 +18,7 @@ class PlugIcon extends ClideIconPainter {
..moveTo(0.30, 0.30)
..lineTo(0.60, 0.30)
..lineTo(0.60, 0.55)
..arcToPoint(const Offset(0.30, 0.55),
radius: const Radius.circular(0.15), clockwise: false)
..arcToPoint(const Offset(0.30, 0.55), radius: const Radius.circular(0.15), clockwise: false)
..close();
canvas.drawPath(body, p);
// cord