Miler rider app: surface system, visible design language, backend lifecycle

Design system
- MilerSurface ladder (canvas → working → raised → floating) with MilerPanel
  as layer 1; canvas moved to #DEE3EA so white separates at 1.290:1.
- Visible vocabulary applied across Home, Deliveries, Activity, Account and
  the sheets: hero heads (tabular numeral + small caption, clamped at 1.3x),
  canvas wells for anything that opens, small filled tags for shelf labels,
  demoted placeholders. Recorded in DESIGN_SYSTEM.md §6.
- One icon family: 222 Material glyphs migrated to Lucide; none left outside
  lib/xpress.
- Colour semantics corrected: amber only for what is genuinely owed, brand red
  reserved for the live stop, disabled primaries go neutral rather than pale.

Data and lifecycle
- lib/data/lifecycle.dart reads mutations for what they prove; route_order.dart
  makes admin sequence the single ordering authority; service_day.dart, and
  stop_area.dart rewritten against live Coimbatore addresses (digit-token
  stripping, city stoplist, street suffixes, stammer collapse).
- countLabel states the load once, in bags.

Testing
- 1440 tests passing; golden shot harnesses for Home, Deliveries, Activity,
  sheets and verify, with test/failures/ now gitignored (diff debris).
- New pins: home_gutter_test, stop_area_test, plus updated structural bounds.

Note: this commit also carries pre-existing working-tree deletions that were
present before this work (API_SPEC.md, README.md, demo test fixtures).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 05:40:35 +05:30
parent c8350563d9
commit d7348e253f
387 changed files with 80693 additions and 12272 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:ui' show ImageFilter, lerpDouble;
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -10,6 +11,7 @@ import 'package:miler/views/Dashboard/profile/Profilepage.dart';
import 'package:miler/views/helpers/constants/Font_constant.dart';
import 'package:miler/views/helpers/constants/Colorconstants.dart';
import 'package:miler/views/helpers/constants/design_constants.dart';
import 'package:miler/data/service_profile.dart';
class BottomPage extends StatefulWidget {
final int initialIndex;
@@ -162,19 +164,30 @@ class _BottomPageState extends State<BottomPage> with TickerProviderStateMixin {
static const double _compactAfter = 24;
static const double _expandAfter = 6;
static const _navItems = [
_NavItem(Icons.home_rounded, Icons.home_outlined, 'Home'),
/// ── The work tab is named by the line the rider is on ──
///
/// The two rider apps this one replaces called a job by two different names:
/// **booking** on the parcel side, **delivery** on the meal side. Merging them
/// did not make one of those wrong — a rider collecting a consignment for the
/// hub is not delivering it, and a rider handing somebody lunch has not taken
/// a booking. So the tab reads the noun off the profile instead of picking a
/// winner, and a rider (who only ever belongs to one line) sees the word he
/// already uses. See [ServiceProfile.jobNoun].
///
/// No longer `const`: the label is resolved per build, not baked in.
static List<_NavItem> get _navItems => [
const _NavItem(LucideIcons.house, LucideIcons.house, 'Home'),
_NavItem(
Icons.local_shipping_rounded,
Icons.local_shipping_outlined,
'Bookings',
LucideIcons.truck,
LucideIcons.truck,
ServiceProfile.active.workTabLabel,
),
// Was Earnings. A pay figure is a once-or-twice-a-day read and it did not
// need a permanent quarter of the bar — it opens from Account now. What the
// rider glances at between stops is what he has already finished, which
// used to sit on Home clogging the list he decides from.
_NavItem(Icons.history_rounded, Icons.history_outlined, 'Activity'),
_NavItem(Icons.person_rounded, Icons.person_outline, 'Account'),
const _NavItem(LucideIcons.history, LucideIcons.history, 'Activity'),
const _NavItem(LucideIcons.user, LucideIcons.user, 'Account'),
];
@override
@@ -544,7 +557,7 @@ class _NavBarItem extends StatelessWidget {
fontSize: 10.5.sp,
fontWeight: FontWeight.lerp(
FontWeight.w500,
FontWeight.w700,
FontWeight.w600,
lit,
),
fontFamily: FontConstants.fontFamily,