feat(todo): Display's layouts as pictures with radio buttons, its rows grouped in rounded boxes

As Todoist's (the developer's review of 3 Nov 2026, ADR 0033, D22): each
layout a phone's outline with its picture, its name below on one line (no
"Calenda/r" split across two), a radio button marking the one in use; the
switches, the sorting and the filters each a group in a rounded box under a
plain heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-03 21:44:52 +01:00
commit c7ad78f88d
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -472,6 +472,8 @@ void main() {
String setting,
String value,
) async {
await tester.ensureVisible(find.widgetWithText(ListTile, setting));
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(ListTile, setting));
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(ListTile, value).last);
@ -511,6 +513,39 @@ void main() {
.compareTo(tester.getCenter(row(b)).dy),
);
testWidgets("the layouts as Todoist's: a picture of each above its "
'name, on one line each, and a radio button marking the one in '
"use (the developer's review, 3 Nov 2026)", (tester) async {
await inboxOf(tester);
await display(tester);
final line = tester.getSize(find.text('List')).height;
for (final name in ['List', 'Board', 'Calendar']) {
expect(tester.getSize(find.text(name)).height, line, reason: name);
}
final radios = find.byType(Radio<ProjectLayout>);
expect(radios, findsNWidgets(3));
expect(
tester
.widget<RadioGroup<ProjectLayout>>(
find.byType(RadioGroup<ProjectLayout>),
)
.groupValue,
ProjectLayout.list,
);
await tester.tap(find.text('Board'));
await tester.pumpAndSettle();
expect(
tester
.widget<RadioGroup<ProjectLayout>>(
find.byType(RadioGroup<ProjectLayout>),
)
.groupValue,
ProjectLayout.board,
);
});
testWidgets('sorting by name orders the list, kept in the project for '
'every device; a dot marks the button; Reset all puts it back', (
tester,
@ -569,6 +604,9 @@ void main() {
await inboxOf(tester);
await display(tester);
// Below the layouts' pictures: scrolled to on a phone.
await tester.ensureVisible(find.widgetWithText(ListTile, 'Priority'));
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(ListTile, 'Priority'));
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(CheckboxListTile, 'Priority 1'));
@ -1183,6 +1221,9 @@ void main() {
expect(find.text('Someday'), findsOneWidget);
await display(tester);
// Below the layouts' pictures: scrolled to on a phone.
await tester.ensureVisible(find.widgetWithText(ListTile, 'Priority'));
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(ListTile, 'Priority'));
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(CheckboxListTile, 'Priority 1'));