feat(app): runs list day labels are section headings
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import '../../../ui/layout/section_heading.dart';
|
||||
import '../../../ui/motion/motion.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -142,12 +143,13 @@ class RunsList extends StatelessWidget {
|
||||
itemBuilder: (context, index) {
|
||||
final entry = entries[index];
|
||||
if (entry.label case final label?) {
|
||||
final style = usesCupertinoHost(context)
|
||||
? CupertinoTheme.of(context).textTheme.textStyle
|
||||
: Theme.of(context).textTheme.labelLarge;
|
||||
// A day heading reads as a divider between groups of runs.
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16, 12, 16, 4),
|
||||
child: Semantics(header: true, child: Text(label, style: style)),
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Semantics(
|
||||
header: true,
|
||||
child: SectionHeading(title: label, minHeight: 32),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Arrival(
|
||||
|
||||
Reference in New Issue
Block a user