WT 1.1.0+39 evaluation, health data
This commit is contained in:
+17
-17
@@ -5,7 +5,8 @@ import 'package:flutter/material.dart';
|
||||
class LoadingScreenMain extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Image _backgroundImage = Image.asset('asset/image/WT01_loading_layers.png',
|
||||
final Image _backgroundImage = Image.asset(
|
||||
'asset/image/WT01_loading_layers.png',
|
||||
fit: BoxFit.cover,
|
||||
height: double.infinity,
|
||||
width: double.infinity,
|
||||
@@ -23,13 +24,14 @@ class LoadingScreenMain extends StatelessWidget {
|
||||
new Container(
|
||||
decoration: BoxDecoration(color: Colors.white),
|
||||
),
|
||||
|
||||
/// Render the background image
|
||||
new Container(
|
||||
child: SafeArea(
|
||||
bottom: false,
|
||||
child: _backgroundImage,
|
||||
)
|
||||
),
|
||||
child: SafeArea(
|
||||
bottom: false,
|
||||
child: _backgroundImage,
|
||||
)),
|
||||
|
||||
/// Render the Title widget, loader and messages below each other
|
||||
new Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -37,15 +39,14 @@ class LoadingScreenMain extends StatelessWidget {
|
||||
new Expanded(
|
||||
flex: 3,
|
||||
child: new Container(
|
||||
child: new Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new Padding(
|
||||
padding: const EdgeInsets.only(top: 30.0),
|
||||
),
|
||||
|
||||
],
|
||||
)),
|
||||
child: new Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new Padding(
|
||||
padding: const EdgeInsets.only(top: 30.0),
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
@@ -54,8 +55,7 @@ class LoadingScreenMain extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
/// Loader Animation Widget
|
||||
CircularProgressIndicator(
|
||||
valueColor: new AlwaysStoppedAnimation<Color>(
|
||||
Colors.lightGreenAccent),
|
||||
valueColor: new AlwaysStoppedAnimation<Color>(Colors.lightGreenAccent),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 20.0),
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
import 'package:aitrainer_app/util/trans.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NumberPickerWidget extends StatefulWidget {
|
||||
final Function(double) onChange;
|
||||
final int minValue;
|
||||
final int maxValue;
|
||||
final int initalValue;
|
||||
final String unit;
|
||||
final Color color;
|
||||
|
||||
const NumberPickerWidget({Key key, this.minValue, this.maxValue, this.initalValue, this.unit, this.color, this.onChange})
|
||||
: super(key: key);
|
||||
@override
|
||||
_NumberPickerWidgetState createState() => _NumberPickerWidgetState();
|
||||
}
|
||||
|
||||
class _NumberPickerWidgetState extends State<NumberPickerWidget> with Trans {
|
||||
Widget durationPicker({bool inSeconds = false, bool inHundredths = false}) {
|
||||
double value = 0;
|
||||
return CupertinoPicker(
|
||||
scrollController: FixedExtentScrollController(initialItem: widget.initalValue),
|
||||
backgroundColor: Colors.transparent,
|
||||
onSelectedItemChanged: (x) {
|
||||
currentData = x.toDouble();
|
||||
value = x.toDouble();
|
||||
//print("sec" + seconds.toStringAsFixed(2));
|
||||
setState(() {});
|
||||
widget.onChange(value);
|
||||
},
|
||||
children: List.generate(widget.maxValue, (index) => Text('$index ' + widget.unit, style: TextStyle(color: widget.color))),
|
||||
itemExtent: 40,
|
||||
);
|
||||
}
|
||||
|
||||
double currentData = 0;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
setContext(context);
|
||||
return Container(
|
||||
//color: Colors.white24,
|
||||
width: MediaQuery.of(context).size.width * .45,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
color: Colors.transparent,
|
||||
width: MediaQuery.of(context).size.width * .3,
|
||||
child: Center(
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
width: MediaQuery.of(context).size.width * 0.95,
|
||||
height: MediaQuery.of(context).size.height * 0.25,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(child: durationPicker()),
|
||||
],
|
||||
)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user