-
Notifications
You must be signed in to change notification settings - Fork 88
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 #290 from RishavKumarSinha/fix#267
Hyperledger UI Added
- Loading branch information
Showing
10 changed files
with
668 additions
and
14 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
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,43 @@ | ||
class HyperledgerProjectModal { | ||
String name; | ||
String wiki; | ||
List<String> mentors; | ||
String year; | ||
|
||
HyperledgerProjectModal({ | ||
required this.name, | ||
required this.wiki, | ||
required this.mentors, | ||
required this.year, | ||
}); | ||
|
||
factory HyperledgerProjectModal.fromJson(Map<String, dynamic> json) { | ||
List<String> mentorsList = []; | ||
if (json['mentors'] is List) { | ||
mentorsList = List<String>.from(json['mentors']); | ||
} else if (json['mentors'] is String) { | ||
mentorsList = [json['mentors']]; | ||
} | ||
|
||
return HyperledgerProjectModal( | ||
name: json['title'], | ||
wiki: json['link'], | ||
mentors: mentorsList, | ||
year: json['year'].toString(), // Ensure year is converted to string if necessary | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'title': name, | ||
'link': wiki, | ||
'mentors': mentors, | ||
'year': year, | ||
}; | ||
} | ||
|
||
@override | ||
String toString() { | ||
return 'HyperledgerProjectModal(name: $name, wiki: $wiki, mentors: $mentors, 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.