feat(App): update Finlytic Flutter app UI and blocs

This commit is contained in:
2026-08-09 21:01:46 +02:00
parent e7427b7464
commit a708d2977c
591 changed files with 1095105 additions and 0 deletions
@@ -0,0 +1,22 @@
class AdminCreateUserRequestDto {
final String email;
final String password;
final String fullName;
final String role;
AdminCreateUserRequestDto({
required this.email,
required this.password,
required this.fullName,
required this.role,
});
Map<String, dynamic> toJson() {
return {
'email': email,
'password': password,
'fullName': fullName,
'role': role,
};
}
}
@@ -0,0 +1,16 @@
class AdminUpdateUserRequestDto {
final String role;
final bool isActive;
AdminUpdateUserRequestDto({
required this.role,
required this.isActive,
});
Map<String, dynamic> toJson() {
return {
'role': role,
'isActive': isActive,
};
}
}
@@ -0,0 +1,40 @@
import 'package:equatable/equatable.dart';
class AdminUserModel extends Equatable {
final String id;
final String email;
final String fullName;
final String role;
final bool isActive;
const AdminUserModel({
required this.id,
required this.email,
required this.fullName,
required this.role,
required this.isActive,
});
factory AdminUserModel.fromJson(Map<String, dynamic> json) {
return AdminUserModel(
id: json['id']?.toString() ?? '',
email: json['email']?.toString() ?? '',
fullName: json['fullName']?.toString() ?? json['name']?.toString() ?? '',
role: json['role']?.toString() ?? 'User',
isActive: json['isActive'] == true || json['IsActive'] == true,
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'email': email,
'fullName': fullName,
'role': role,
'isActive': isActive,
};
}
@override
List<Object?> get props => [id, email, fullName, role, isActive];
}