checkpoint
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
import '../models/delivery_route.dart';
|
||||
import '../theme/spacing_system.dart';
|
||||
import '../theme/size_system.dart';
|
||||
@@ -72,6 +73,7 @@ class _CollapsibleRoutesSidebarState extends ConsumerState<CollapsibleRoutesSide
|
||||
final isMobile = context.isMobile;
|
||||
final isDarkMode = Theme.of(context).brightness == Brightness.dark;
|
||||
final isExpanded = ref.watch(collapseStateProvider);
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
// On mobile, always show as collapsible
|
||||
if (isMobile) {
|
||||
@@ -95,7 +97,7 @@ class _CollapsibleRoutesSidebarState extends ConsumerState<CollapsibleRoutesSide
|
||||
children: [
|
||||
if (isExpanded)
|
||||
Text(
|
||||
'Routes',
|
||||
l10n.routes,
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
@@ -146,7 +148,7 @@ class _CollapsibleRoutesSidebarState extends ConsumerState<CollapsibleRoutesSide
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: AppSpacing.md),
|
||||
child: Text(
|
||||
'Routes',
|
||||
l10n.routes,
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import '../models/delivery.dart';
|
||||
import '../theme/animation_system.dart';
|
||||
import '../theme/color_system.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
|
||||
class DeliveryListItem extends StatefulWidget {
|
||||
final Delivery delivery;
|
||||
@@ -94,6 +95,7 @@ class _DeliveryListItemState extends State<DeliveryListItem>
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final statusColor = _getStatusColor(widget.delivery);
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
// Collapsed view: Show only the badge
|
||||
if (widget.isCollapsed) {
|
||||
@@ -296,7 +298,7 @@ class _DeliveryListItemState extends State<DeliveryListItem>
|
||||
Text(
|
||||
widget.delivery.deliveryAddress
|
||||
?.formattedAddress ??
|
||||
'No address',
|
||||
l10n.noAddress,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import '../models/delivery_route.dart';
|
||||
import '../theme/animation_system.dart';
|
||||
import '../theme/color_system.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
|
||||
class RouteListItem extends StatefulWidget {
|
||||
final DeliveryRoute route;
|
||||
@@ -79,6 +80,7 @@ class _RouteListItemState extends State<RouteListItem>
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final statusColor = _getStatusColor(widget.route);
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
// Collapsed view: Show only the badge
|
||||
if (widget.isCollapsed) {
|
||||
@@ -229,7 +231,7 @@ class _RouteListItemState extends State<RouteListItem>
|
||||
const SizedBox(height: 4),
|
||||
// Route details
|
||||
Text(
|
||||
'${widget.route.deliveredCount}/${widget.route.deliveriesCount} deliveries',
|
||||
l10n.routeDeliveries(widget.route.deliveredCount, widget.route.deliveriesCount),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
|
||||
Reference in New Issue
Block a user