Implements complete refactor of Ionic Angular logistics app to Flutter/Dart with: - Svrnty dark mode console theme (Material Design 3) - Responsive layouts (mobile, tablet, desktop) following FRONTEND standards - CQRS API integration with Result<T> error handling - OAuth2/OIDC authentication support (mocked for initial testing) - Delivery route and delivery management features - Multi-language support (EN/FR) with i18n - Native integrations (camera, phone calls, maps) - Strict typing throughout codebase - Mock data for UI testing without backend Follows all FRONTEND style guides, design patterns, and conventions. App is running in dark mode and fully responsive across all device sizes. Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
628 B
Dart
25 lines
628 B
Dart
class UserProfile {
|
|
final String firstName;
|
|
final String lastName;
|
|
final String email;
|
|
|
|
const UserProfile({
|
|
required this.firstName,
|
|
required this.lastName,
|
|
required this.email,
|
|
});
|
|
|
|
String get fullName => '$firstName $lastName';
|
|
|
|
factory UserProfile.fromJwtClaims(Map<String, dynamic> claims) {
|
|
return UserProfile(
|
|
firstName: claims['given_name'] as String? ?? '',
|
|
lastName: claims['family_name'] as String? ?? '',
|
|
email: claims['email'] as String? ?? '',
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() => 'UserProfile(firstName: $firstName, lastName: $lastName, email: $email)';
|
|
}
|