16 lines
No EOL
409 B
Dart
16 lines
No EOL
409 B
Dart
import 'package:gitea_client/model/repository.dart';
|
|
|
|
class SearchResult {
|
|
final bool ok;
|
|
final List<Repository> data;
|
|
|
|
const SearchResult(this.ok, this.data);
|
|
|
|
SearchResult.fromJson(Map<String, dynamic> jsonM) : ok=jsonM['ok'], data = []{
|
|
jsonM['data'].map((dynamic json) {
|
|
Repository repo = Repository.fromJson(json);
|
|
data.add(repo);
|
|
return repo;
|
|
}).toList() as List;
|
|
}
|
|
} |