WT1.1.17 +4 pointer fix

This commit is contained in:
bossanyit
2021-05-16 23:48:57 +02:00
parent 7b0d15aede
commit 4b6b4dafc7
18 changed files with 187 additions and 93 deletions
+64 -12
View File
@@ -221,11 +221,13 @@ class CustomerModifyPage extends StatelessWidget with Trans {
SfLinearGauge(
minimum: 1950,
maximum: 2020,
labelPosition: LinearLabelPosition.outside,
tickPosition: LinearElementPosition.outside,
markerPointers: [
LinearWidgetPointer(
value: customerBloc.year!.toDouble(),
offset: 5,
position: LinearElementPosition.inside,
position: LinearElementPosition.outside,
markerAlignment: LinearMarkerAlignment.center,
child: Container(
height: 14,
@@ -241,8 +243,11 @@ class CustomerModifyPage extends StatelessWidget with Trans {
),
LinearShapePointer(
value: customerBloc.year!.toDouble(),
height: 35,
width: 15,
position: LinearElementPosition.inside,
shapeType: LinearShapePointerType.triangle,
color: Colors.blue,
height: 55,
width: 25,
onValueChanged: (value) => {
customerBloc.add(CustomerBirthYearChange(year: value.toInt())),
},
@@ -273,7 +278,53 @@ class CustomerModifyPage extends StatelessWidget with Trans {
fontWeight: FontWeight.normal,
fontSize: 18,
)),
SfRadialGauge(
Divider(
color: Colors.transparent,
),
SfLinearGauge(
minimum: 40,
maximum: 150,
labelPosition: LinearLabelPosition.outside,
tickPosition: LinearElementPosition.outside,
markerPointers: [
LinearWidgetPointer(
value: customerBloc.weight,
offset: 5,
position: LinearElementPosition.outside,
markerAlignment: LinearMarkerAlignment.center,
child: Container(
height: 14,
width: 44,
color: Colors.transparent,
child: Text(customerBloc.weight.toStringAsFixed(1),
style: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Colors.indigo,
)),
),
),
LinearShapePointer(
position: LinearElementPosition.inside,
shapeType: LinearShapePointerType.triangle,
value: customerBloc.weight,
height: 55,
width: 25,
color: Colors.blue,
onValueChanged: (value) => {
customerBloc.add(CustomerWeightChange(weight: value)),
},
),
],
orientation: LinearGaugeOrientation.horizontal,
majorTickStyle: LinearTickStyle(length: 20),
axisLabelStyle: TextStyle(fontSize: 12.0, color: Colors.black),
axisTrackStyle: LinearAxisTrackStyle(
color: Colors.cyan, edgeStyle: LinearEdgeStyle.bothFlat, thickness: 1.0, borderColor: Colors.grey)),
Divider(
color: Colors.transparent,
),
/* SfRadialGauge(
axes: <RadialAxis>[
RadialAxis(
axisLineStyle: AxisLineStyle(
@@ -301,15 +352,15 @@ class CustomerModifyPage extends StatelessWidget with Trans {
knobStyle: KnobStyle(color: Colors.blue[800]),
value: customerBloc.weight.toDouble(),
enableAnimation: true,
enableDragging: true,
needleStartWidth: 6,
//enableDragging: true,
needleStartWidth: 1,
needleEndWidth: 12,
onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))},
//onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))},
)
],
)
],
),
), */
]),
),
Divider(
@@ -353,8 +404,8 @@ class CustomerModifyPage extends StatelessWidget with Trans {
position: LinearElementPosition.inside,
markerAlignment: LinearMarkerAlignment.center,
child: Container(
height: 14,
width: 44,
height: 25,
width: 55,
color: Colors.transparent,
child: Text(customerBloc.height.toString(),
style: GoogleFonts.inter(
@@ -365,8 +416,9 @@ class CustomerModifyPage extends StatelessWidget with Trans {
),
),
LinearShapePointer(
height: 15,
width: 35,
height: 25,
width: 55,
color: Colors.blue,
value: customerBloc.height,
onValueChanged: (value) => {
customerBloc.add(CustomerHeightChange(height: value.toInt())),
+1 -1
View File
@@ -251,7 +251,7 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
onPressed: () {
if (Cache().userLoggedIn == null) {
Navigator.pop(context);
bloc.add(ExerciseNewAddError(message: "Please log in"));
bloc.add(ExerciseNewAddError(message: "Please log in, because we can calculate the best suggestions for you"));
} else {
saveAll(bloc);
if (executeBloc.existsActivePlan() == true) {
@@ -244,6 +244,7 @@ class _ExercisePlanDetailAddPage extends State<ExercisePlanDetailAddPage> with T
if (value.isNotEmpty)
{
value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
bloc.add(ExercisePlanCustomAddChangeQuantityUnit(quantity: double.parse(value)))
}
})
+2
View File
@@ -92,6 +92,8 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
args['customerId'] = Cache().userLoggedIn!.customerId,
Navigator.of(context).pushNamed('mydevelopmentBodyPage', arguments: args)
}
else
{}
},
isLocked: true,
),