Commit 8a5fe475 authored by Administrator's avatar Administrator

remove unnecessary new keywords

parent 4a5dce3b
......@@ -70,7 +70,7 @@ class _DashboardState extends State<Dashboard> {
ButtonBar(
children: <Widget>[
FlatButton(
child: const Text('CREATE NEW ATHLETE'),
child: const Text('Create new Athlete'),
onPressed: () {
Navigator.push(
context,
......
......@@ -20,7 +20,7 @@ class ListActivitiesScreen extends StatefulWidget {
class _ListActivitiesScreenState extends State<ListActivitiesScreen> {
@override
Widget build(BuildContext context) {
return new ChangeNotifierProvider.value(
return ChangeNotifierProvider.value(
value: widget.athlete,
child: Consumer<Athlete>(
builder: (context, athlete, _child) => Scaffold(
......
......@@ -27,17 +27,17 @@ class _ActivitiesListWidgetState extends State<ActivitiesListWidget> {
initState() {
getActivities();
new Future<Null>.delayed(
Future<Null>.delayed(
Duration(seconds: 2),
() {
if (widget.athlete.email == null)
Scaffold.of(context).showSnackBar(SnackBar(
content: new Text("Strava email not provided yet!"),
content: Text("Strava email not provided yet!"),
backgroundColor: Colors.red,
));
if (widget.athlete.password == null)
Scaffold.of(context).showSnackBar(SnackBar(
content: new Text("Strava password not provided yet!"),
content: Text("Strava password not provided yet!"),
backgroundColor: Colors.red,
));
},
......
......@@ -23,7 +23,7 @@ class ActivityFormPowerChart extends StatelessWidget {
);
List<Series<dynamic, num>> data = [
new Series<IntPlotPoint, int>(
Series<IntPlotPoint, int>(
id: 'Form power',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (IntPlotPoint record, _) => record.domain,
......
......@@ -23,7 +23,7 @@ class ActivityGroundTimeChart extends StatelessWidget {
);
List<Series<dynamic, num>> data = [
new Series<DoublePlotPoint, int>(
Series<DoublePlotPoint, int>(
id: 'Ground Time',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (DoublePlotPoint record, _) => record.domain,
......
......@@ -24,7 +24,7 @@ class ActivityHeartRateChart extends StatelessWidget {
);
List<Series<dynamic, num>> data = [
new Series<IntPlotPoint, int>(
Series<IntPlotPoint, int>(
id: 'Heart Rate',
colorFn: (_, __) => MaterialPalette.red.shadeDefault,
domainFn: (IntPlotPoint point, _) => point.domain,
......
......@@ -23,7 +23,7 @@ class ActivityLegSpringStiffnessChart extends StatelessWidget {
);
List<Series<dynamic, num>> data = [
new Series<DoublePlotPoint, int>(
Series<DoublePlotPoint, int>(
id: 'Leg spring stiffness',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (DoublePlotPoint record, _) => record.domain,
......
......@@ -11,7 +11,7 @@ class ActivityMetadataWidget extends StatelessWidget {
@override
Widget build(context) {
return new ListTileTheme(
return ListTileTheme(
iconColor: Colors.deepOrange,
child: ListView(
padding: EdgeInsets.only(left: 25),
......
......@@ -11,7 +11,7 @@ class ActivityOverviewWidget extends StatelessWidget {
@override
Widget build(context) {
return new ListTileTheme(
return ListTileTheme(
iconColor: Colors.deepOrange,
child: ListView(
padding: EdgeInsets.only(left: 25),
......
......@@ -23,7 +23,7 @@ class ActivityPowerChart extends StatelessWidget {
);
List<Series<dynamic, num>> data = [
new Series<IntPlotPoint, int>(
Series<IntPlotPoint, int>(
id: 'Power',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (IntPlotPoint record, _) => record.domain,
......
......@@ -23,7 +23,7 @@ class ActivityStrydCadenceChart extends StatelessWidget {
);
List<Series<dynamic, num>> data = [
new Series<DoublePlotPoint, int>(
Series<DoublePlotPoint, int>(
id: 'Cadence',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (DoublePlotPoint record, _) => record.domain,
......
......@@ -23,7 +23,7 @@ class ActivityVerticalOscillationChart extends StatelessWidget {
);
List<Series<dynamic, num>> data = [
new Series<DoublePlotPoint, int>(
Series<DoublePlotPoint, int>(
id: 'Vertical Oscillation',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (DoublePlotPoint record, _) => record.domain,
......
......@@ -17,7 +17,7 @@ class LapFormPowerChart extends StatelessWidget {
var offset = nonZero.first.db.distance.round();
List<Series<dynamic, num>> data = [
new Series<Event, int>(
Series<Event, int>(
id: 'Form Power',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (Event record, _) => record.db.distance.round() - offset,
......@@ -26,7 +26,7 @@ class LapFormPowerChart extends StatelessWidget {
)
];
return new Container(
return Container(
height: 300,
child: LineChart(
data,
......
......@@ -18,7 +18,7 @@ class LapGroundTimeChart extends StatelessWidget {
var offset = nonZero.first.db.distance.round();
List<Series<dynamic, num>> data = [
new Series<Event, int>(
Series<Event, int>(
id: 'Ground Time',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (Event record, _) => record.db.distance.round() - offset,
......@@ -27,7 +27,7 @@ class LapGroundTimeChart extends StatelessWidget {
)
];
return new Container(
return Container(
height: 300,
child: LineChart(
data,
......
......@@ -14,7 +14,7 @@ class LapHeartRateChart extends StatelessWidget {
var offset = nonZero.first.db.distance.round();
List<Series<dynamic, num>> data = [
new Series<Event, int>(
Series<Event, int>(
id: 'Heart Rate',
colorFn: (_, __) => MaterialPalette.red.shadeDefault,
domainFn: (Event record, _) => record.db.distance.round() - offset,
......@@ -23,7 +23,7 @@ class LapHeartRateChart extends StatelessWidget {
)
];
return new Container(
return Container(
height: 300,
child: LineChart(
data,
......
......@@ -19,7 +19,7 @@ class LapLegSpringStiffnessChart extends StatelessWidget {
var offset = nonZero.first.db.distance.round();
List<Series<dynamic, num>> data = [
new Series<Event, int>(
Series<Event, int>(
id: 'Leg Spring Stiffness',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (Event record, _) => record.db.distance.round() - offset,
......@@ -28,7 +28,7 @@ class LapLegSpringStiffnessChart extends StatelessWidget {
)
];
return new Container(
return Container(
height: 300,
child: LineChart(
data,
......
......@@ -11,7 +11,7 @@ class LapMetadataWidget extends StatelessWidget {
@override
Widget build(context) {
return new ListTileTheme(
return ListTileTheme(
iconColor: Colors.lightGreen,
child: ListView(
padding: EdgeInsets.only(left: 25),
......
......@@ -11,7 +11,7 @@ class LapOverviewWidget extends StatelessWidget {
@override
Widget build(context) {
return new ListTileTheme(
return ListTileTheme(
iconColor: Colors.lightGreen,
child: ListView(
padding: EdgeInsets.only(left: 25),
......
......@@ -17,7 +17,7 @@ class LapPowerChart extends StatelessWidget {
var offset = nonZero.first.db.distance.round();
List<Series<dynamic, num>> data = [
new Series<Event, int>(
Series<Event, int>(
id: 'Power',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (Event record, _) => record.db.distance.round() - offset,
......@@ -26,7 +26,7 @@ class LapPowerChart extends StatelessWidget {
)
];
return new Container(
return Container(
height: 300,
child: LineChart(
data,
......
......@@ -17,7 +17,7 @@ class LapStrydCadenceChart extends StatelessWidget {
var offset = nonZero.first.db.distance.round();
List<Series<dynamic, num>> data = [
new Series<Event, int>(
Series<Event, int>(
id: 'Stryd Cadence',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (Event record, _) => record.db.distance.round() - offset,
......@@ -26,7 +26,7 @@ class LapStrydCadenceChart extends StatelessWidget {
)
];
return new Container(
return Container(
height: 300,
child: LineChart(
data,
......
......@@ -19,7 +19,7 @@ class LapVerticalOscillationChart extends StatelessWidget {
var offset = nonZero.first.db.distance.round();
List<Series<dynamic, num>> data = [
new Series<Event, int>(
Series<Event, int>(
id: 'Vertical Oscillation',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (Event record, _) => record.db.distance.round() - offset,
......@@ -28,7 +28,7 @@ class LapVerticalOscillationChart extends StatelessWidget {
)
];
return new Container(
return Container(
height: 300,
child: LineChart(
data,
......
......@@ -17,7 +17,7 @@ class PowerDurationChart extends StatelessWidget {
PowerDuration powerDuration = PowerDuration(records: nonZero);
List<Series<dynamic, num>> data = [
new Series<IntPlotPoint, int>(
Series<IntPlotPoint, int>(
id: 'Power Duration',
colorFn: (_, __) => MaterialPalette.green.shadeDefault,
domainFn: (IntPlotPoint record, _) => record.domain,
......@@ -49,7 +49,7 @@ class PowerDurationChart extends StatelessWidget {
),
];
return new Container(
return Container(
height: 300,
padding: EdgeInsets.all(2),
child: LineChart(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment