WT 1.1.11+4 bug fixes

This commit is contained in:
bossanyit
2021-04-12 18:51:50 +02:00
parent 10c8a0a2d8
commit db103a1015
12 changed files with 79 additions and 25 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ class Search extends StatelessWidget with Trans {
searchBoxDecoration: InputDecoration(
contentPadding: EdgeInsets.only(left: 15, top: 5, bottom: 5),
labelText: t("Search Exercises..."),
labelStyle: GoogleFonts.inter(fontSize: 14, color: Colors.grey[400]),
labelStyle: GoogleFonts.inter(fontSize: 12, color: Colors.grey[400]),
fillColor: Colors.white24,
filled: true,
border: OutlineInputBorder(
+16 -3
View File
@@ -30,6 +30,7 @@ class NumberPickerWidget extends StatefulWidget {
class _NumberPickerWidgetState extends State<NumberPickerWidget> with Trans {
late FixedExtentScrollController _scrollController;
double value = 0;
@override
void initState() {
@@ -38,13 +39,22 @@ class _NumberPickerWidgetState extends State<NumberPickerWidget> with Trans {
_scrollController.animateToItem(widget.initalValue, duration: Duration(milliseconds: 100), curve: Curves.easeIn);
}
@override
void dispose() {
_scrollController.dispose();
super.dispose();
}
@override
void didUpdateWidget(NumberPickerWidget oldWidget) {
//print("value $value initial ${widget.initalValue}");
if (value == 0) {
_scrollController.animateToItem(widget.initalValue, duration: Duration(milliseconds: 100), curve: Curves.easeIn);
}
super.didUpdateWidget(oldWidget);
}
Widget durationPicker({bool inSeconds = false, bool inHundredths = false}) {
double value = 0;
return CupertinoPicker(
scrollController: _scrollController,
useMagnifier: true,
@@ -54,9 +64,11 @@ class _NumberPickerWidgetState extends State<NumberPickerWidget> with Trans {
selectionOverlay: Container(),
onSelectedItemChanged: (x) {
currentData = x.toDouble();
value = x.toDouble();
//print("sec" + seconds.toStringAsFixed(2));
setState(() {});
setState(() {
value = x.toDouble();
});
widget.onChange(value);
},
children: List.generate(
@@ -69,6 +81,7 @@ class _NumberPickerWidgetState extends State<NumberPickerWidget> with Trans {
@override
Widget build(BuildContext context) {
setContext(context);
value = 0;
return Container(
color: Colors.transparent,
width: MediaQuery.of(context).size.width * .40,