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:
@@ -1,5 +1,6 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:miler/views/helpers/constants/Font_constant.dart';
|
||||
import 'package:miler/views/helpers/constants/Colorconstants.dart';
|
||||
@@ -175,7 +176,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
SizedBox(height: 20.h),
|
||||
|
||||
_buildSectionHeader(
|
||||
icon: Icons.camera_alt_rounded,
|
||||
icon: LucideIcons.camera,
|
||||
title: _isDelivery ? 'Delivery Photo' : 'Parcel Photo',
|
||||
badge: 'Required',
|
||||
isComplete: _photoVerified,
|
||||
@@ -189,7 +190,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
// a first-mile pickup, so it was pure friction on every stop.
|
||||
if (!_isDelivery) ...[
|
||||
_buildSectionHeader(
|
||||
icon: Icons.inventory_2_rounded,
|
||||
icon: LucideIcons.package,
|
||||
title: 'Parcel Details (Optional)',
|
||||
isComplete: _weightController.text.isNotEmpty,
|
||||
),
|
||||
@@ -199,7 +200,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
],
|
||||
|
||||
_buildSectionHeader(
|
||||
icon: Icons.lock_outline_rounded,
|
||||
icon: LucideIcons.lock,
|
||||
title: _isDelivery ? 'Delivery OTP' : 'Pickup Code',
|
||||
badge: 'Required',
|
||||
isComplete: _otpController.text.isNotEmpty,
|
||||
@@ -219,7 +220,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
).copyWith(
|
||||
counterText: '',
|
||||
prefixIcon: Icon(
|
||||
Icons.lock_outline_rounded,
|
||||
LucideIcons.lock,
|
||||
color: ColorConstants.secondaryText,
|
||||
size: 20.sp,
|
||||
),
|
||||
@@ -255,7 +256,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
leading: IconButton(
|
||||
tooltip: 'Back',
|
||||
icon: Icon(
|
||||
Icons.arrow_back_ios_new_rounded,
|
||||
LucideIcons.chevronLeft,
|
||||
color: ColorConstants.onSurface,
|
||||
size: 20.sp,
|
||||
),
|
||||
@@ -271,7 +272,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
style: TextStyle(
|
||||
fontSize: 21.sp,
|
||||
color: ColorConstants.onSurface,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
),
|
||||
@@ -337,7 +338,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
),
|
||||
),
|
||||
child: Icon(
|
||||
done ? Icons.check_rounded : Icons.circle_outlined,
|
||||
done ? LucideIcons.check : LucideIcons.circle,
|
||||
color: done ? Colors.white : ColorConstants.secondaryText,
|
||||
size: 16.sp,
|
||||
),
|
||||
@@ -347,7 +348,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
fontWeight: done ? FontWeight.w700 : FontWeight.w500,
|
||||
fontWeight: done ? FontWeight.w600 : FontWeight.w500,
|
||||
color: done
|
||||
? _successGreen
|
||||
: ColorConstants.onSurfaceVariant,
|
||||
@@ -411,7 +412,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
),
|
||||
@@ -426,7 +427,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
_customerName,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
@@ -452,7 +453,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
),
|
||||
SizedBox(height: 12.h),
|
||||
_buildLocationRow(
|
||||
Icons.location_on_rounded,
|
||||
LucideIcons.mapPin,
|
||||
_pickupAddress,
|
||||
_isDelivery ? 'DELIVERY' : 'PICKUP',
|
||||
ColorConstants.warning.withValues(alpha: 0.40),
|
||||
@@ -488,7 +489,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 9.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: accentColor,
|
||||
letterSpacing: 0.8,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
@@ -529,7 +530,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
borderRadius: BorderRadius.circular(DesignConstants.radiusLg),
|
||||
),
|
||||
child: Icon(
|
||||
isComplete ? Icons.check_circle_rounded : icon,
|
||||
isComplete ? LucideIcons.circleCheck : icon,
|
||||
size: 16.sp,
|
||||
color: isComplete ? _successGreen : ColorConstants.onSurfaceVariant,
|
||||
),
|
||||
@@ -540,7 +541,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 15.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: ColorConstants.onSurface,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
@@ -557,7 +558,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
badge,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: _primaryRed,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
@@ -622,7 +623,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.check_circle_rounded,
|
||||
LucideIcons.circleCheck,
|
||||
color: Colors.white,
|
||||
size: 16.sp,
|
||||
),
|
||||
@@ -649,7 +650,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.check_rounded,
|
||||
LucideIcons.check,
|
||||
color: Colors.white,
|
||||
size: 14.sp,
|
||||
),
|
||||
@@ -668,7 +669,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.camera_alt_rounded,
|
||||
LucideIcons.camera,
|
||||
color: ColorConstants.secondaryText,
|
||||
size: 36.sp,
|
||||
),
|
||||
@@ -678,7 +679,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
'Tap to take parcel photo',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: ColorConstants.onSurfaceVariant,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
@@ -737,7 +738,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 13.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: ColorConstants.onSurface,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
@@ -749,7 +750,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
style: TextStyle(
|
||||
fontSize: 13.sp,
|
||||
color: _primaryRed,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
),
|
||||
@@ -790,7 +791,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.lock_outline_rounded,
|
||||
LucideIcons.lock,
|
||||
color: ColorConstants.secondaryText,
|
||||
size: 18.sp,
|
||||
),
|
||||
@@ -805,7 +806,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
: 'Complete all fields to continue',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: ColorConstants.secondaryText,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
@@ -843,7 +844,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 15.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
fontFamily: FontConstants.fontFamily,
|
||||
),
|
||||
@@ -855,7 +856,7 @@ class _PickupVerificationPageState extends State<PickupVerificationPage>
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.check_rounded,
|
||||
LucideIcons.check,
|
||||
size: 22.sp,
|
||||
color: ColorConstants.primary,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user