Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The weapon page now shows the crafting materials for weapons that can…
… be crafted
- Loading branch information
Showing
10 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
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
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
30 changes: 30 additions & 0 deletions
30
lib/presentation/weapon/widgets/weapon_detail_crafting_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,30 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:genshindb/domain/models/models.dart'; | ||
import 'package:genshindb/generated/l10n.dart'; | ||
import 'package:genshindb/presentation/shared/item_description_detail.dart'; | ||
import 'package:genshindb/presentation/shared/wrapped_ascension_material.dart'; | ||
|
||
class WeaponCraftingMaterials extends StatelessWidget { | ||
final List<WeaponCraftedFileModel> materials; | ||
final Color rarityColor; | ||
|
||
const WeaponCraftingMaterials({ | ||
Key key, | ||
@required this.materials, | ||
@required this.rarityColor, | ||
}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final s = S.of(context); | ||
final rows = materials.map((m) => WrappedAscensionMaterial(image: m.fullImagePath, quantity: m.quantity, size: 50)).toList(); | ||
|
||
final body = Wrap( | ||
alignment: WrapAlignment.center, | ||
crossAxisAlignment: WrapCrossAlignment.center, | ||
children: rows, | ||
); | ||
|
||
return ItemDescriptionDetail(title: s.craftingMaterials, body: body, textColor: rarityColor); | ||
} | ||
} |