Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class _InputScreenState extends State<InputScreen> {
}

return Scaffold(
resizeToAvoidBottomInset: false,
bottomNavigationBar: NavigationBar(
labelBehavior: labelBehavior,
selectedIndex: currentPageIndex,
Expand Down
9 changes: 6 additions & 3 deletions lib/widgets/records_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import 'package:intl/intl.dart';

class RecordsTable extends StatelessWidget {
const RecordsTable({super.key, required this.records});

final List<Record> records;

@override
Widget build(BuildContext context) {
return DataTable(
columnSpacing: 20.0,
columns: const [
DataColumn(label: Text('Date')),
DataColumn(
Expand All @@ -28,7 +29,9 @@ class RecordsTable extends StatelessWidget {
.map(
(record) => DataRow(
cells: [
DataCell(Text(DateFormat('EEE hh:mm a').format(record.date))),
DataCell(
Text(DateFormat('E MMM d hh:mm a').format(record.date)),
),
DataCell(Text(record.systolic.toString())),
DataCell(Text(record.diastolic.toString())),
DataCell(Text(record.heartRate.toString())),
Expand All @@ -38,4 +41,4 @@ class RecordsTable extends StatelessWidget {
.toList(),
);
}
}
}
4 changes: 2 additions & 2 deletions test/widgets/records_table_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void main() {

// Verify that the 1st record is displayed
expect(
find.text(DateFormat('EEE hh:mm a').format(records[0].date)),
find.text(DateFormat('E MMM d hh:mm a').format(records[0].date)),
findsOneWidget,
);
expect(find.text(records[0].systolic.toString()), findsOneWidget);
Expand All @@ -50,7 +50,7 @@ void main() {

// Verify that the 2nd record is displayed
expect(
find.text(DateFormat('EEE hh:mm a').format(records[1].date)),
find.text(DateFormat('E MMM d hh:mm a').format(records[1].date)),
findsOneWidget,
);
expect(find.text(records[1].systolic.toString()), findsOneWidget);
Expand Down