feat(App): update Finlytic Flutter app UI and blocs
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
class DiscoveryAssetModel {
|
||||
final String isin;
|
||||
final String symbol;
|
||||
final String name;
|
||||
final String type;
|
||||
final String category;
|
||||
final String? image;
|
||||
final List<String> tags;
|
||||
|
||||
const DiscoveryAssetModel({
|
||||
required this.isin,
|
||||
required this.symbol,
|
||||
required this.name,
|
||||
required this.type,
|
||||
required this.category,
|
||||
this.image,
|
||||
this.tags = const [],
|
||||
});
|
||||
|
||||
factory DiscoveryAssetModel.fromJson(Map<String, dynamic> json) {
|
||||
return DiscoveryAssetModel(
|
||||
isin: json['isin'] ?? '',
|
||||
symbol: (json['symbol'] != null && json['symbol'].toString().isNotEmpty)
|
||||
? json['symbol'].toString()
|
||||
: (json['isin'] ?? ''),
|
||||
name: json['name'] ?? '',
|
||||
type: json['type'] ?? 'stock',
|
||||
category: json['category'] ?? '',
|
||||
image: json['image'],
|
||||
tags: (json['tags'] as List<dynamic>?)?.map((e) => e.toString()).toList() ?? [],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user