28 lines
659 B
Dart
28 lines
659 B
Dart
import 'dart:convert';
|
|
import 'dart:ffi';
|
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'stocks_dto.g.dart';
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class StocksDto {
|
|
final List<StockDataDto>? stocks;
|
|
|
|
const StocksDto({this.stocks});
|
|
|
|
factory StocksDto.fromJson(Map<String, dynamic> json) => _$StocksDtoFromJson(json);
|
|
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class StockDataDto {
|
|
final int? fdcId;
|
|
final String? name;
|
|
final double? price;
|
|
final String? image;
|
|
|
|
const StockDataDto({this.fdcId, this.name, this.price, this.image});
|
|
|
|
factory StockDataDto.fromJson(Map<String, dynamic> json) => _$StockDataDtoFromJson(json);
|
|
} |