Compact floating tab bars with circular selection and equal edge gaps
The floating tab bar is now sized to its icon tabs at the bottom right on every width, the selected icon sits in a tinted circle on both hosts, and the gap from each outer circle to the pill's sides equals the gap to its top, bottom and neighbours.
This commit is contained in:
@@ -192,12 +192,16 @@ void main() {
|
||||
expect(pill.width, lessThan(1200 * 0.6));
|
||||
});
|
||||
|
||||
testWidgets('$host 390: the bar spans the phone', (tester) async {
|
||||
testWidgets('$host 390: the bar hugs its tabs at the phone\'s bottom '
|
||||
'right', (tester) async {
|
||||
await setSize(tester, const Size(390, 844));
|
||||
await tester.pumpWidget(shell(cupertino: cupertino, split: false));
|
||||
await tester.pump();
|
||||
final pill = destinationPill(tester);
|
||||
expect(pill.left, closeTo(kFloatingBarMargin, 0.5));
|
||||
expect(
|
||||
pill.width,
|
||||
FloatingDestinationBar.pillWidth(cupertino: cupertino, tabs: 4),
|
||||
);
|
||||
expect(pill.right, closeTo(390 - kFloatingBarMargin, 0.5));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user