Ok i will move on from calculator from now on

This commit is contained in:
dan63047 2024-09-27 01:34:27 +03:00
parent 24ad72c029
commit 1350007e1d
1 changed files with 9 additions and 5 deletions

View File

@ -404,6 +404,8 @@ class _DestinationCalculatorState extends State<DestinationCalculator> {
int idCounter = 0;
Rules rules = Rules();
CalcCards card = CalcCards.calc;
@override
void initState() {
super.initState();
@ -750,7 +752,10 @@ class _DestinationCalculatorState extends State<DestinationCalculator> {
children: [
SizedBox(
height: widget.constraints.maxHeight -32,
child: getDamageCalculator(),
child: switch (card){
CalcCards.calc => getCalculator(),
CalcCards.damage => getDamageCalculator()
}
),
SegmentedButton<CalcCards>(
showSelectedIcon: false,
@ -764,11 +769,10 @@ class _DestinationCalculatorState extends State<DestinationCalculator> {
label: Text('Damage Calculator'),
),
],
selected: <CalcCards>{CalcCards.damage},
selected: <CalcCards>{card},
onSelectionChanged: (Set<CalcCards> newSelection) {
setState(() {
// cardMod = CardMod.info;
// rightCard = newSelection.first;
card = newSelection.first;
});})
],
);