dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
@@ -11,7 +11,11 @@ class AppointmentTile extends StatelessWidget {
final Appointment appointment;
final bool crossedOut;
const AppointmentTile({super.key, required this.appointment, this.crossedOut = false});
const AppointmentTile({
super.key,
required this.appointment,
this.crossedOut = false,
});
@override
Widget build(BuildContext context) {
@@ -56,11 +60,15 @@ class AppointmentTile extends StatelessWidget {
),
),
] else ...[
for (final line in description
.split('\n')
.where((p) => p.isNotEmpty)
.take(2))
_ScaledLine(text: line, fontSize: kAppointmentBodyFontSize),
for (final line
in description
.split('\n')
.where((p) => p.isNotEmpty)
.take(2))
_ScaledLine(
text: line,
fontSize: kAppointmentBodyFontSize,
),
],
],
),
@@ -72,7 +80,10 @@ class AppointmentTile extends StatelessWidget {
borderRadius: _radius,
child: DecoratedBox(
decoration: BoxDecoration(
border: Border.all(width: 2, color: Colors.red.withAlpha(200)),
border: Border.all(
width: 2,
color: Colors.red.withAlpha(200),
),
borderRadius: _radius,
),
child: CustomPaint(painter: CrossPainter()),
@@ -114,7 +125,10 @@ class _AdaptiveTitle extends StatelessWidget {
builder: (context, constraints) {
// Probe at the minimum size: if even that overflows, we have to ellipsize.
final probe = TextPainter(
text: TextSpan(text: text, style: baseStyle.copyWith(fontSize: minFontSize)),
text: TextSpan(
text: text,
style: baseStyle.copyWith(fontSize: minFontSize),
),
textDirection: TextDirection.ltr,
maxLines: 1,
textScaler: textScaler,
@@ -131,12 +145,7 @@ class _AdaptiveTitle extends StatelessWidget {
return FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(
text,
style: baseStyle,
maxLines: 1,
softWrap: false,
),
child: Text(text, style: baseStyle, maxLines: 1, softWrap: false),
);
},
);
@@ -187,24 +196,17 @@ class _ScaledLine extends StatelessWidget {
final String text;
final double fontSize;
const _ScaledLine({
required this.text,
required this.fontSize,
});
const _ScaledLine({required this.text, required this.fontSize});
@override
Widget build(BuildContext context) => FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(
text,
style: TextStyle(
color: Colors.white,
fontSize: fontSize,
height: 1.1,
),
maxLines: 1,
softWrap: false,
),
);
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(
text,
style: TextStyle(color: Colors.white, fontSize: fontSize, height: 1.1),
maxLines: 1,
softWrap: false,
),
);
}