Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some models that will be used in the ascension material's calcu…
…lator page
- Loading branch information
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
lib/models/calculator_asc_materials/ascention_materials_summary.dart
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,14 @@ | ||
import 'package:flutter/foundation.dart'; | ||
|
||
import '../../common/enums/material_type.dart'; | ||
import '../models.dart'; | ||
|
||
class AscentionMaterialsSummary { | ||
final MaterialType type; | ||
final List<ItemAscentionMaterialModel> materials; | ||
|
||
const AscentionMaterialsSummary({ | ||
@required this.type, | ||
@required this.materials, | ||
}); | ||
} |
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,13 @@ | ||
import 'package:flutter/foundation.dart'; | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'character_skill.freezed.dart'; | ||
|
||
@freezed | ||
abstract class CharacterSkill with _$CharacterSkill { | ||
const factory CharacterSkill.skill({ | ||
@required String name, | ||
@required int currentLevel, | ||
@required int desiredLevel, | ||
}) = _CharacterSkill; | ||
} |
37 changes: 37 additions & 0 deletions
37
lib/models/calculator_asc_materials/item_ascention_materials.dart
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,37 @@ | ||
import 'package:flutter/foundation.dart'; | ||
|
||
import '../models.dart'; | ||
|
||
class ItemAscentionMaterials { | ||
final String key; | ||
final String name; | ||
final String image; | ||
final int rarity; | ||
final bool isCharacter; | ||
final List<ItemAscentionMaterialModel> materials; | ||
|
||
ItemAscentionMaterials({ | ||
@required this.key, | ||
@required this.name, | ||
@required this.image, | ||
@required this.rarity, | ||
@required this.isCharacter, | ||
@required this.materials, | ||
}); | ||
|
||
ItemAscentionMaterials.forCharacters({ | ||
@required this.key, | ||
@required this.name, | ||
@required this.image, | ||
@required this.rarity, | ||
@required this.materials, | ||
}) : isCharacter = true; | ||
|
||
ItemAscentionMaterials.forWeapons({ | ||
@required this.key, | ||
@required this.name, | ||
@required this.image, | ||
@required this.rarity, | ||
@required this.materials, | ||
}) : isCharacter = false; | ||
} |
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