Coach is the centre tab: questions about routines, slips, streak, today, active time and debt, answered on the device from the user's own data, with a target bar chart and buttons that start routines or open the right screen. The palette moves to neutral grey, near-black and one orange accent, and Home's header becomes a light panel. The nav is now overlapping frosted circles whose active disc pops forward, and tabs fade and rise in on switch. Goals leaves the nav for Coach and stays one tap away in Home's category row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
25 lines
687 B
Dart
25 lines
687 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'FloatingNavState.dart';
|
|
|
|
typedef NavEntry = ({IconData icon, String label, VoidCallback onTap});
|
|
|
|
/// The floating tab bar, after the reference: a row of frosted circles that
|
|
/// just overlap, icons only. The open tab is a solid white disc that pops
|
|
/// forward over its neighbours; a pressed circle dips. It switches tabs in
|
|
/// place — nothing here pushes a page.
|
|
class FloatingNav extends StatefulWidget {
|
|
final List<NavEntry> entries;
|
|
|
|
final int selected;
|
|
|
|
const FloatingNav({
|
|
super.key,
|
|
required this.entries,
|
|
required this.selected,
|
|
});
|
|
|
|
@override
|
|
State<FloatingNav> createState() => FloatingNavState();
|
|
}
|