-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
尝试修复第三方图片缓存组件失效的问题 添加英雄获取方式
- Loading branch information
jay
committed
Apr 6, 2022
1 parent
bd98bdc
commit 0f5988a
Showing
29 changed files
with
465 additions
and
73 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,41 @@ | ||
class Field { | ||
final String id; | ||
final int width; | ||
final int height; | ||
final int baseTerrain; | ||
final List<List<int>> terrain; | ||
Field({ | ||
required this.id, | ||
required this.width, | ||
required this.height, | ||
required this.baseTerrain, | ||
required this.terrain, | ||
}); | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'id': id, | ||
'width': width, | ||
'height': height, | ||
'base_terrain': baseTerrain, | ||
'terrain': terrain, | ||
}; | ||
} | ||
|
||
factory Field.fromJson(Map<String, dynamic> map) { | ||
return Field( | ||
id: map['id'] ?? '', | ||
width: map['width']?.toInt() ?? 0, | ||
height: map['height']?.toInt() ?? 0, | ||
baseTerrain: map['base_terrain']?.toInt() ?? 0, | ||
terrain: (map["terrain"] as List<dynamic>) | ||
.map((e) => (e as List<dynamic>).cast<int>()) | ||
.toList(), | ||
); | ||
} | ||
|
||
@override | ||
String toString() { | ||
return 'Field(id: $id, width: $width, height: $height, base_terrain: $baseTerrain, terrain: $terrain)'; | ||
} | ||
} |
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.