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:
128
lib/xpress/widget/Bottom_page.dart
Normal file
128
lib/xpress/widget/Bottom_page.dart
Normal file
@@ -0,0 +1,128 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:miler/xpress/views/Dashboard/deliveries/deliveries.dart';
|
||||
import 'package:miler/xpress/views/Dashboard/home/homepage.dart';
|
||||
import 'package:miler/xpress/views/Dashboard/summary/summary.dart';
|
||||
import 'package:miler/xpress/views/Dashboard/profile/Profilepage.dart';
|
||||
import 'package:miler/xpress/views/helpers/constants/Colorconstants.dart';
|
||||
import 'package:miler/xpress/views/helpers/constants/Font_constant.dart';
|
||||
|
||||
class BottomPage extends StatefulWidget {
|
||||
final int initialIndex;
|
||||
final Widget? overridePage;
|
||||
final List<String> acceptedOrders;
|
||||
const BottomPage({
|
||||
super.key,
|
||||
this.initialIndex = 0,
|
||||
this.overridePage,
|
||||
this.acceptedOrders = const [],
|
||||
});
|
||||
@override
|
||||
State<BottomPage> createState() => _BottomPageState();
|
||||
}
|
||||
|
||||
class _BottomPageState extends State<BottomPage> {
|
||||
late int selected;
|
||||
late final List<Widget> _pages;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
selected = widget.initialIndex;
|
||||
_pages = [
|
||||
widget.overridePage ?? const Homepage(),
|
||||
const MyDeliveries(),
|
||||
const Summary(), // Removed Cartpage - active deliveries now shown in deliveries page banner
|
||||
const ProfilePage(),
|
||||
];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
textTheme: Theme.of(
|
||||
context,
|
||||
).textTheme.apply(fontFamily: FontConstants.fontFamily),
|
||||
),
|
||||
child: Scaffold(
|
||||
body: IndexedStack(index: selected, children: _pages),
|
||||
bottomNavigationBar: Container(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black12,
|
||||
blurRadius: 6,
|
||||
offset: Offset(0, -2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: BottomNavigationBar(
|
||||
backgroundColor: Colors.white,
|
||||
currentIndex: selected,
|
||||
onTap: (index) => setState(() => selected = index),
|
||||
type: BottomNavigationBarType.fixed,
|
||||
selectedItemColor: ColorConstants.primaryColor,
|
||||
unselectedItemColor: Colors.grey,
|
||||
selectedFontSize: 14,
|
||||
unselectedFontSize: 12,
|
||||
showUnselectedLabels: true,
|
||||
items: const [
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(
|
||||
AssetImage("assets/images/homeicon.png"),
|
||||
size: 30,
|
||||
color: Colors.grey,
|
||||
),
|
||||
activeIcon: ImageIcon(
|
||||
AssetImage("assets/images/selecthome.png"),
|
||||
size: 30,
|
||||
color: ColorConstants.primaryColor,
|
||||
),
|
||||
label: 'HOME',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(
|
||||
AssetImage("assets/images/deliveryicon.png"),
|
||||
size: 30,
|
||||
color: Colors.grey,
|
||||
),
|
||||
activeIcon: ImageIcon(
|
||||
AssetImage("assets/images/selecteddelivery.png"),
|
||||
size: 30,
|
||||
color: ColorConstants.primaryColor,
|
||||
),
|
||||
label: 'DELIVERIES',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(
|
||||
AssetImage("assets/images/summary.png"),
|
||||
size: 30,
|
||||
color: Colors.grey,
|
||||
),
|
||||
activeIcon: ImageIcon(
|
||||
AssetImage("assets/images/selectedsummary.png"),
|
||||
size: 30,
|
||||
color: ColorConstants.primaryColor,
|
||||
),
|
||||
label: 'SUMMARY',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(
|
||||
AssetImage("assets/images/profileicon.png"),
|
||||
size: 30,
|
||||
color: Colors.grey,
|
||||
),
|
||||
activeIcon: ImageIcon(
|
||||
AssetImage("assets/images/selectedprofile.png"),
|
||||
size: 30,
|
||||
color: ColorConstants.primaryColor,
|
||||
),
|
||||
label: 'PROFILE',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user