-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from RishavKumarSinha/fix#293
FOSSASIA Codeheat UI Page Added
- Loading branch information
Showing
9 changed files
with
718 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
class FOSSASIAProjectModel { | ||
String name; | ||
String description; | ||
List<String> techStack; | ||
String link; | ||
String year; | ||
|
||
FOSSASIAProjectModel({ | ||
required this.name, | ||
required this.description, | ||
required this.techStack, | ||
required this.link, | ||
required this.year, | ||
}); | ||
|
||
factory FOSSASIAProjectModel.fromJson(Map<String, dynamic> json) { | ||
List<String> techStackList = []; | ||
if (json['TechStack'] is List) { | ||
techStackList = List<String>.from(json['TechStack']); | ||
} else if (json['TechStack'] is String) { | ||
techStackList = [json['TechStack']]; | ||
} | ||
|
||
return FOSSASIAProjectModel( | ||
name: json['Name'], | ||
description: json['Description'], | ||
techStack: techStackList, | ||
link: json['link'], | ||
year: json['Year'].toString(), | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'Name': name, | ||
'Description': description, | ||
'TechStack': techStack, | ||
'link': link, | ||
'Year': year, | ||
}; | ||
} | ||
|
||
@override | ||
String toString() { | ||
return 'FOSSASIAProjectModel(name: $name, description: $description, techStack: $techStack, link: $link, year: $year)'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.