feat(ui): every app's frame around its tabs, Learn's moved into halkyon_ui
NavigationFrame is Learn's AppShell without its router and its tabs: a navigation rail from medium windows on with the app's icon on top, leading to the first tab, a bar floating above the foot below, the background of the screen in view around it, and a tick on every choice. TabsStack is Learn's container of the tabs' navigators, every tab kept alive and told whether it shows. Learn's shell is built on both, its tests unchanged; Train's is next. The rail's icon is drawn from 120 px at most in memory, as Learn's was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
57262ebf73
commit
b45db6ea7c
1 changed files with 444 additions and 171 deletions
|
|
@ -61,4 +61,23 @@ void main() {
|
|||
|
||||
expect(visible, isTrue);
|
||||
});
|
||||
|
||||
testWidgets('the tabs stack shows the tab chosen, keeps the others alive, '
|
||||
'and tells each whether it shows', (tester) async {
|
||||
final visible = <String, bool>{};
|
||||
Widget tab(String name) => Builder(
|
||||
builder: (context) {
|
||||
visible[name] = TabVisibility.of(context);
|
||||
return Text(name);
|
||||
},
|
||||
);
|
||||
await tester.pumpWidget(
|
||||
testApp(TabsStack(index: 1, children: [tab('Home'), tab('Maps')])),
|
||||
);
|
||||
|
||||
expect(find.text('Maps'), findsOneWidget);
|
||||
expect(find.text('Home'), findsNothing, reason: 'offstage');
|
||||
expect(find.text('Home', skipOffstage: false), findsOneWidget);
|
||||
expect(visible, {'Home': false, 'Maps': true});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue