You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
891 B
33 lines
891 B
import 'package:intl/intl.dart';
|
|
|
|
class AllProblemsModel {
|
|
String problem='';
|
|
String audio='';
|
|
String description='';
|
|
String video='';
|
|
String date='';
|
|
String problemId='';
|
|
List picture = [];
|
|
String image='';
|
|
bool isAudioButtonEnabled=false;
|
|
DateTime dateForFilter=new DateTime.now();
|
|
String dateNew='';
|
|
|
|
AllProblemsModel();
|
|
|
|
factory AllProblemsModel.fromJson(Map<String, dynamic> json){
|
|
AllProblemsModel rtvm = new AllProblemsModel();
|
|
|
|
rtvm.problem = json['name'] ?? '';
|
|
rtvm.audio = json['audio'] ?? '';
|
|
rtvm.description = json['description'] ?? '';
|
|
rtvm.video = json['video'] ?? '';
|
|
rtvm.date = json['date'] ?? '';
|
|
rtvm.dateForFilter = DateFormat('dd-MM-yyyy').parse(rtvm.date);
|
|
rtvm.problemId = json['reportId'] ?? '';
|
|
rtvm.picture = json['picture'] ?? [];
|
|
rtvm.image=json['picture'][0]['url']??'';
|
|
return rtvm;
|
|
}
|
|
|
|
} |