feat: enhance UI, branding assets, onboarding flow, and screen layouts

This commit is contained in:
R-Bharathraj
2026-09-18 15:23:30 +05:30
parent cafffd27e0
commit 5122eebc11
68 changed files with 1661 additions and 470 deletions

View File

@@ -33,27 +33,36 @@ class TimecardsScreen extends ConsumerWidget {
),
],
),
body: cards.isEmpty
? const Padding(
padding: EdgeInsets.all(20),
child: EmptyState(
icon: LucideIcons.fileText,
title: 'No timecards yet',
message: 'One is filed automatically every time you clock out.',
),
)
: ListView.separated(
padding: const EdgeInsets.fromLTRB(20, 16, 20, 28),
itemCount: cards.length,
separatorBuilder: (_, _) => const SizedBox(height: 11),
itemBuilder: (context, i) => _TimecardTile(card: cards[i]),
),
body: ListView(
padding: const EdgeInsets.fromLTRB(20, 16, 20, 28),
children: timecardItems(cards),
),
);
}
}
class _TimecardTile extends StatelessWidget {
const _TimecardTile({required this.card});
/// The timecard list as plain children, so the Clock tab can drop them into
/// its sliver list and the pushed screen into a ListView, with one layout.
List<Widget> timecardItems(List<Timecard> cards) {
if (cards.isEmpty) {
return const [
EmptyState(
icon: LucideIcons.fileText,
title: 'No timecards yet',
message: 'One is filed automatically every time you clock out.',
),
];
}
return [
for (var i = 0; i < cards.length; i++) ...[
if (i > 0) const SizedBox(height: 11),
TimecardTile(card: cards[i]),
],
];
}
class TimecardTile extends StatelessWidget {
const TimecardTile({super.key, required this.card});
final Timecard card;