fiux stepper in tip calc
This commit is contained in:
@@ -115,7 +115,8 @@ class _MihNumericStepperState extends State<MihNumericStepper> {
|
|||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: _currentValue < (widget.minValue ?? 0) ||
|
visible: _currentValue < (widget.minValue ?? 0) ||
|
||||||
_currentValue > widget.maxValue!,
|
(widget.maxValue != null &&
|
||||||
|
_currentValue > widget.maxValue!),
|
||||||
child: const SizedBox(
|
child: const SizedBox(
|
||||||
height: 21,
|
height: 21,
|
||||||
),
|
),
|
||||||
@@ -197,7 +198,8 @@ class _MihNumericStepperState extends State<MihNumericStepper> {
|
|||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: _currentValue < (widget.minValue ?? 0) ||
|
visible: _currentValue < (widget.minValue ?? 0) ||
|
||||||
_currentValue > widget.maxValue!,
|
(widget.maxValue != null &&
|
||||||
|
_currentValue > widget.maxValue!),
|
||||||
child: const SizedBox(
|
child: const SizedBox(
|
||||||
height: 21,
|
height: 21,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
splitBillController.text = "No";
|
splitBillController.text = "No";
|
||||||
|
noPeopleController.text = "2";
|
||||||
splitPosition = false;
|
splitPosition = false;
|
||||||
splitBillController.addListener(splitSelected);
|
splitBillController.addListener(splitSelected);
|
||||||
}
|
}
|
||||||
@@ -296,17 +297,29 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
secondaryFillColor:
|
secondaryFillColor:
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
onChange: (value) {
|
onChange: (value) {
|
||||||
if (value) {
|
setState(() {
|
||||||
setState(() {
|
splitBillController.text = value ? "Yes" : "No";
|
||||||
splitBillController.text = "Yes";
|
splitPosition = value;
|
||||||
splitPosition = value;
|
if (value) {
|
||||||
});
|
noPeopleController.text =
|
||||||
} else {
|
noPeopleController.text.isEmpty
|
||||||
setState(() {
|
? "2"
|
||||||
splitBillController.text = "No";
|
: noPeopleController.text;
|
||||||
splitPosition = value;
|
} else {
|
||||||
});
|
noPeopleController.clear();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// if (value) {
|
||||||
|
// setState(() {
|
||||||
|
// splitBillController.text = "Yes";
|
||||||
|
// splitPosition = value;
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// setState(() {
|
||||||
|
// splitBillController.text = "No";
|
||||||
|
// splitPosition = value;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ValueListenableBuilder(
|
ValueListenableBuilder(
|
||||||
|
|||||||
Reference in New Issue
Block a user