feat(app): responsive asset detail layout, full width chart, reactive hero header, shimmer loaders and enriched fundamentals
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class MatchedAssetModel extends Equatable {
|
||||
final String isin;
|
||||
final String symbol;
|
||||
final String name;
|
||||
|
||||
const MatchedAssetModel({
|
||||
required this.isin,
|
||||
required this.symbol,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
factory MatchedAssetModel.fromJson(Map<String, dynamic> json) {
|
||||
return MatchedAssetModel(
|
||||
isin: (json['isin'] ?? json['Isin'])?.toString() ?? '',
|
||||
symbol: (json['symbol'] ?? json['Symbol'] ?? json['ticker'] ?? json['Ticker'])?.toString() ?? '',
|
||||
name: (json['name'] ?? json['Name'] ?? json['companyName'] ?? json['CompanyName'])?.toString() ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'isin': isin,
|
||||
'symbol': symbol,
|
||||
'name': name,
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [isin, symbol, name];
|
||||
}
|
||||
Reference in New Issue
Block a user