Commit 94a5a795 authored by Administrator's avatar Administrator

extracting icons

parent e98adb37
import 'package:flutter/material.dart';
class MyIcon {
// A
static final amount = Icon(Icons.playlist_add);
// F
static final formPower = Icon(Icons.ev_station);
// S
static final sdev = Icon(Icons.unfold_more);
}
......@@ -4,6 +4,7 @@ import 'package:encrateia/models/event.dart';
import 'package:encrateia/utils/list_utils.dart';
import 'package:encrateia/utils/num_utils.dart';
import 'activity_form_power_chart.dart';
import 'package:encrateia/utils/icon_utils.dart';
class ActivityFormPowerWidget extends StatefulWidget {
final Activity activity;
......@@ -37,17 +38,17 @@ class _ActivityFormPowerWidgetState extends State<ActivityFormPowerWidget> {
children: <Widget>[
ActivityFormPowerChart(records: records, activity: widget.activity),
ListTile(
leading: Icon(Icons.ev_station),
leading: MyIcon.formPower,
title: Text(avgFormPowerString),
subtitle: Text("average form power"),
),
ListTile(
leading: Icon(Icons.unfold_more),
leading: MyIcon.sdev,
title: Text(sdevFormPowerString),
subtitle: Text("standard deviation form power"),
),
ListTile(
leading: Icon(Icons.playlist_add),
leading: MyIcon.amount,
title: Text(records.length.toString()),
subtitle: Text("number of measurements"),
),
......
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