Implement premium UI/UX refinements for Apple-like polish

Add three major UI components with animations and dark mode support:

- PremiumRouteCard: Enhanced route cards with left accent bar, delivery count badge, animated hover effects (1.02x scale), and dynamic shadow elevation
- DarkModeMapComponent: Google Maps integration with dark theme styling, custom info panels, navigation buttons, and delivery status indicators
- DeliveryListItem: Animated list items with staggered entrance animations, status badges with icons, contact indicators, and hover states

Updates:
- RoutesPage: Now uses PremiumRouteCard with improved visual hierarchy
- DeliveriesPage: Integrated DarkModeMapComponent and DeliveryListItem with proper theme awareness
- Animation system: Leverages existing AppAnimations constants for 200ms fast interactions and easeOut curves

Design philosophy:
- Element separation through left accent bars (status-coded)
- Elevation and shadow for depth (0.1-0.3 opacity)
- Staggered animations for list items (50ms delays)
- Dark mode optimized for evening use (reduced brightness)
- Responsive hover states with tactile feedback

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jean-Philippe Brule
2025-11-15 14:41:32 -05:00
parent ccb817e3c6
commit 3f31a509e0
23 changed files with 3519 additions and 791 deletions
-368
View File
@@ -1,368 +0,0 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;
import 'app_localizations_en.dart';
import 'app_localizations_fr.dart';
// ignore_for_file: type=lint
/// Callers can lookup localized strings with an instance of AppLocalizations
/// returned by `AppLocalizations.of(context)`.
///
/// Applications need to include `AppLocalizations.delegate()` in their app's
/// `localizationDelegates` list, and the locales they support in the app's
/// `supportedLocales` list. For example:
///
/// ```dart
/// import 'l10n/app_localizations.dart';
///
/// return MaterialApp(
/// localizationsDelegates: AppLocalizations.localizationsDelegates,
/// supportedLocales: AppLocalizations.supportedLocales,
/// home: MyApplicationHome(),
/// );
/// ```
///
/// ## Update pubspec.yaml
///
/// Please make sure to update your pubspec.yaml to include the following
/// packages:
///
/// ```yaml
/// dependencies:
/// # Internationalization support.
/// flutter_localizations:
/// sdk: flutter
/// intl: any # Use the pinned version from flutter_localizations
///
/// # Rest of dependencies
/// ```
///
/// ## iOS Applications
///
/// iOS applications define key application metadata, including supported
/// locales, in an Info.plist file that is built into the application bundle.
/// To configure the locales supported by your app, youll need to edit this
/// file.
///
/// First, open your projects ios/Runner.xcworkspace Xcode workspace file.
/// Then, in the Project Navigator, open the Info.plist file under the Runner
/// projects Runner folder.
///
/// Next, select the Information Property List item, select Add Item from the
/// Editor menu, then select Localizations from the pop-up menu.
///
/// Select and expand the newly-created Localizations item then, for each
/// locale your application supports, add a new item and select the locale
/// you wish to add from the pop-up menu in the Value field. This list should
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
/// property.
abstract class AppLocalizations {
AppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
final String localeName;
static AppLocalizations of(BuildContext context) {
return Localizations.of<AppLocalizations>(context, AppLocalizations)!;
}
static const LocalizationsDelegate<AppLocalizations> delegate =
_AppLocalizationsDelegate();
/// A list of this localizations delegate along with the default localizations
/// delegates.
///
/// Returns a list of localizations delegates containing this delegate along with
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
/// and GlobalWidgetsLocalizations.delegate.
///
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];
/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('en'),
Locale('fr'),
];
/// No description provided for @appTitle.
///
/// In en, this message translates to:
/// **'Plan B Logistics'**
String get appTitle;
/// No description provided for @appDescription.
///
/// In en, this message translates to:
/// **'Delivery Management System'**
String get appDescription;
/// No description provided for @loginWithKeycloak.
///
/// In en, this message translates to:
/// **'Login with Keycloak'**
String get loginWithKeycloak;
/// No description provided for @deliveryRoutes.
///
/// In en, this message translates to:
/// **'Delivery Routes'**
String get deliveryRoutes;
/// No description provided for @routes.
///
/// In en, this message translates to:
/// **'Routes'**
String get routes;
/// No description provided for @deliveries.
///
/// In en, this message translates to:
/// **'Deliveries'**
String get deliveries;
/// No description provided for @settings.
///
/// In en, this message translates to:
/// **'Settings'**
String get settings;
/// No description provided for @profile.
///
/// In en, this message translates to:
/// **'Profile'**
String get profile;
/// No description provided for @logout.
///
/// In en, this message translates to:
/// **'Logout'**
String get logout;
/// No description provided for @completed.
///
/// In en, this message translates to:
/// **'Completed'**
String get completed;
/// No description provided for @pending.
///
/// In en, this message translates to:
/// **'Pending'**
String get pending;
/// No description provided for @todo.
///
/// In en, this message translates to:
/// **'To Do'**
String get todo;
/// No description provided for @delivered.
///
/// In en, this message translates to:
/// **'Delivered'**
String get delivered;
/// No description provided for @newCustomer.
///
/// In en, this message translates to:
/// **'New Customer'**
String get newCustomer;
/// No description provided for @items.
///
/// In en, this message translates to:
/// **'{count} items'**
String items(int count);
/// No description provided for @moneyCurrency.
///
/// In en, this message translates to:
/// **'{amount} MAD'**
String moneyCurrency(double amount);
/// No description provided for @call.
///
/// In en, this message translates to:
/// **'Call'**
String get call;
/// No description provided for @map.
///
/// In en, this message translates to:
/// **'Map'**
String get map;
/// No description provided for @more.
///
/// In en, this message translates to:
/// **'More'**
String get more;
/// No description provided for @markAsCompleted.
///
/// In en, this message translates to:
/// **'Mark as Completed'**
String get markAsCompleted;
/// No description provided for @markAsUncompleted.
///
/// In en, this message translates to:
/// **'Mark as Uncompleted'**
String get markAsUncompleted;
/// No description provided for @uploadPhoto.
///
/// In en, this message translates to:
/// **'Upload Photo'**
String get uploadPhoto;
/// No description provided for @viewDetails.
///
/// In en, this message translates to:
/// **'View Details'**
String get viewDetails;
/// No description provided for @deliverySuccessful.
///
/// In en, this message translates to:
/// **'Delivery marked as completed'**
String get deliverySuccessful;
/// No description provided for @deliveryFailed.
///
/// In en, this message translates to:
/// **'Failed to mark delivery'**
String get deliveryFailed;
/// No description provided for @noDeliveries.
///
/// In en, this message translates to:
/// **'No deliveries'**
String get noDeliveries;
/// No description provided for @noRoutes.
///
/// In en, this message translates to:
/// **'No routes available'**
String get noRoutes;
/// No description provided for @error.
///
/// In en, this message translates to:
/// **'Error: {message}'**
String error(String message);
/// No description provided for @retry.
///
/// In en, this message translates to:
/// **'Retry'**
String get retry;
/// No description provided for @authenticationRequired.
///
/// In en, this message translates to:
/// **'Authentication required'**
String get authenticationRequired;
/// No description provided for @phoneCall.
///
/// In en, this message translates to:
/// **'Call customer'**
String get phoneCall;
/// No description provided for @navigateToAddress.
///
/// In en, this message translates to:
/// **'Show on map'**
String get navigateToAddress;
/// No description provided for @language.
///
/// In en, this message translates to:
/// **'Language'**
String get language;
/// No description provided for @english.
///
/// In en, this message translates to:
/// **'English'**
String get english;
/// No description provided for @french.
///
/// In en, this message translates to:
/// **'French'**
String get french;
/// No description provided for @appVersion.
///
/// In en, this message translates to:
/// **'App Version'**
String get appVersion;
/// No description provided for @about.
///
/// In en, this message translates to:
/// **'About'**
String get about;
/// No description provided for @fullName.
///
/// In en, this message translates to:
/// **'{firstName} {lastName}'**
String fullName(String firstName, String lastName);
/// No description provided for @completedDeliveries.
///
/// In en, this message translates to:
/// **'{completed}/{total} completed'**
String completedDeliveries(int completed, int total);
}
class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate();
@override
Future<AppLocalizations> load(Locale locale) {
return SynchronousFuture<AppLocalizations>(lookupAppLocalizations(locale));
}
@override
bool isSupported(Locale locale) =>
<String>['en', 'fr'].contains(locale.languageCode);
@override
bool shouldReload(_AppLocalizationsDelegate old) => false;
}
AppLocalizations lookupAppLocalizations(Locale locale) {
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'en':
return AppLocalizationsEn();
case 'fr':
return AppLocalizationsFr();
}
throw FlutterError(
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.',
);
}