Commit dde0b5c1 authored by Stefan Haslinger's avatar Stefan Haslinger

wrapped 28 Scaffold bodies in SafeArea

parent 72b98c48
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.10/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.10/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.1+5/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-07-09 10:44:02.070415","version":"1.17.5"}
\ No newline at end of file
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.10/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.10/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.1+5/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-07-09 15:11:31.883034","version":"1.17.5"}
\ No newline at end of file
......@@ -35,79 +35,81 @@ class _AddFilterScreenState extends State<AddFilterScreen> {
backgroundColor: MyColor.settings,
title: const Text('Add Filter'),
),
body: Column(
children: <Widget>[
const Card(
child: ListTile(
subtitle:
Text('Tags within the same group are applied with an OR '
'operation, filters from different groups with an AND '
'operation.'),
body: SafeArea(
child: Column(
children: <Widget>[
const Card(
child: ListTile(
subtitle:
Text('Tags within the same group are applied with an OR '
'operation, filters from different groups with an AND '
'operation.'),
),
),
),
Expanded(
child: StaggeredGridView.countBuilder(
shrinkWrap: true,
crossAxisCount:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
itemCount: tagGroups == null ? 0 : tagGroups.length,
itemBuilder: (BuildContext context, int index) => Card(
child: ListTile(
title: Text(tagGroups[index].name),
subtitle: Wrap(
spacing: 10,
children: <Widget>[
for (Tag tag in tagGroups[index].cachedTags)
FilterChip(
label: Text(
tag.name,
style: TextStyle(
color: MyColor.textColor(
selected:
widget.athlete.filters.contains(tag.id),
backgroundColor: Color(tag.color ?? 99999),
Expanded(
child: StaggeredGridView.countBuilder(
shrinkWrap: true,
crossAxisCount:
MediaQuery.of(context).orientation == Orientation.portrait
? 1
: 2,
itemCount: tagGroups == null ? 0 : tagGroups.length,
itemBuilder: (BuildContext context, int index) => Card(
child: ListTile(
title: Text(tagGroups[index].name),
subtitle: Wrap(
spacing: 10,
children: <Widget>[
for (Tag tag in tagGroups[index].cachedTags)
FilterChip(
label: Text(
tag.name,
style: TextStyle(
color: MyColor.textColor(
selected:
widget.athlete.filters.contains(tag.id),
backgroundColor: Color(tag.color ?? 99999),
),
),
),
),
avatar: CircleAvatar(
backgroundColor: Color(tag.color ?? 99999),
),
onSelected: (bool selected) {
setState(() {
if (selected)
widget.athlete.filters.add(tag.id);
else
widget.athlete.filters.removeWhere(
(int tagId) => tagId == tag.id);
});
},
selected: widget.athlete.filters.contains(tag.id),
selectedColor: Color(tag.color ?? 99999),
backgroundColor: MyColor.white,
elevation: 3,
padding: const EdgeInsets.all(10),
)
],
avatar: CircleAvatar(
backgroundColor: Color(tag.color ?? 99999),
),
onSelected: (bool selected) {
setState(() {
if (selected)
widget.athlete.filters.add(tag.id);
else
widget.athlete.filters.removeWhere(
(int tagId) => tagId == tag.id);
});
},
selected: widget.athlete.filters.contains(tag.id),
selectedColor: Color(tag.color ?? 99999),
backgroundColor: MyColor.white,
elevation: 3,
padding: const EdgeInsets.all(10),
)
],
),
),
),
staggeredTileBuilder: (_) => const StaggeredTile.fit(1),
mainAxisSpacing: 3,
crossAxisSpacing: 3,
),
staggeredTileBuilder: (_) => const StaggeredTile.fit(1),
mainAxisSpacing: 3,
crossAxisSpacing: 3,
),
),
Row(mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[
MyButton.save(
child: const Text('Save'),
onPressed: () {
Navigator.of(context).pop();
},
),
const SizedBox(width: 20),
]),
],
Row(mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[
MyButton.save(
child: const Text('Save'),
onPressed: () {
Navigator.of(context).pop();
},
),
const SizedBox(width: 20),
]),
],
),
),
);
}
......
......@@ -71,88 +71,90 @@ class _AddHeartRateZoneScreenState extends State<AddHeartRateZoneScreen> {
title: const Text('Add your HeartRateZone'),
backgroundColor: MyColor.settings,
),
body: ListView(
padding: const EdgeInsets.all(20),
children: <Widget>[
TextFormField(
decoration: const InputDecoration(labelText: 'Name'),
initialValue: widget.heartRateZone.name,
onChanged: (String value) => widget.heartRateZone.name = value,
),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Limit in bpm'),
controller: lowerLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.lowerLimit = int.parse(value);
widget.heartRateZone.lowerPercentage =
(int.parse(value) * 100 / widget.base).round();
lowerPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Limit in bpm'),
controller: upperLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.upperLimit = int.parse(value);
widget.heartRateZone.upperPercentage =
(int.parse(value) * 100 / widget.base).round();
upperPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Percentage in %'),
controller: lowerPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.lowerPercentage = int.parse(value);
widget.heartRateZone.lowerLimit =
(int.parse(value) * widget.base / 100).round();
lowerLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Percentage in %'),
controller: upperPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.upperPercentage = int.parse(value);
widget.heartRateZone.upperLimit =
(int.parse(value) * widget.base / 100).round();
upperLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
const SizedBox(height: 10),
Row(children: <Widget>[
const Text('Color'),
const Spacer(),
CircleAvatar(
backgroundColor: Color(widget.heartRateZone.color),
radius: 20.0,
body: SafeArea(
child: ListView(
padding: const EdgeInsets.all(20),
children: <Widget>[
TextFormField(
decoration: const InputDecoration(labelText: 'Name'),
initialValue: widget.heartRateZone.name,
onChanged: (String value) => widget.heartRateZone.name = value,
),
const Spacer(),
MyButton.detail(
onPressed: openColorPicker,
child: const Text('Edit'),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Limit in bpm'),
controller: lowerLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.lowerLimit = int.parse(value);
widget.heartRateZone.lowerPercentage =
(int.parse(value) * 100 / widget.base).round();
lowerPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Limit in bpm'),
controller: upperLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.upperLimit = int.parse(value);
widget.heartRateZone.upperPercentage =
(int.parse(value) * 100 / widget.base).round();
upperPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Percentage in %'),
controller: lowerPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.lowerPercentage = int.parse(value);
widget.heartRateZone.lowerLimit =
(int.parse(value) * widget.base / 100).round();
lowerLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
]),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
MyButton.delete(onPressed: () => deleteHeartRateZone(context)),
const SizedBox(width: 5),
MyButton.cancel(onPressed: () => Navigator.of(context).pop()),
const SizedBox(width: 5),
MyButton.save(onPressed: () => saveHeartRateZone(context)),
],
),
],
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Percentage in %'),
controller: upperPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.heartRateZone.upperPercentage = int.parse(value);
widget.heartRateZone.upperLimit =
(int.parse(value) * widget.base / 100).round();
upperLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
const SizedBox(height: 10),
Row(children: <Widget>[
const Text('Color'),
const Spacer(),
CircleAvatar(
backgroundColor: Color(widget.heartRateZone.color),
radius: 20.0,
),
const Spacer(),
MyButton.detail(
onPressed: openColorPicker,
child: const Text('Edit'),
),
]),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
MyButton.delete(onPressed: () => deleteHeartRateZone(context)),
const SizedBox(width: 5),
MyButton.cancel(onPressed: () => Navigator.of(context).pop()),
const SizedBox(width: 5),
MyButton.save(onPressed: () => saveHeartRateZone(context)),
],
),
],
),
),
);
}
......
......@@ -71,88 +71,90 @@ class _AddPowerZoneScreenState extends State<AddPowerZoneScreen> {
title: const Text('Add your PowerZone'),
backgroundColor: MyColor.settings,
),
body: ListView(
padding: const EdgeInsets.all(20),
children: <Widget>[
TextFormField(
decoration: const InputDecoration(labelText: 'Name'),
initialValue: widget.powerZone.name,
onChanged: (String value) => widget.powerZone.name = value,
),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Limit in W'),
controller: lowerLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.lowerLimit = int.parse(value);
widget.powerZone.lowerPercentage =
(int.parse(value) * 100 / widget.base).round();
lowerPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Limit in W'),
controller: upperLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.upperLimit = int.parse(value);
widget.powerZone.upperPercentage =
(int.parse(value) * 100 / widget.base).round();
upperPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Percentage in %'),
controller: lowerPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.lowerPercentage = int.parse(value);
widget.powerZone.lowerLimit =
(int.parse(value) * widget.base / 100).round();
lowerLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Percentage in %'),
controller: upperPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.upperPercentage = int.parse(value);
widget.powerZone.upperLimit =
(int.parse(value) * widget.base / 100).round();
upperLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
const SizedBox(height: 10),
Row(children: <Widget>[
const Text('Color'),
const Spacer(),
CircleAvatar(
backgroundColor: Color(widget.powerZone.color),
radius: 20.0,
body: SafeArea(
child: ListView(
padding: const EdgeInsets.all(20),
children: <Widget>[
TextFormField(
decoration: const InputDecoration(labelText: 'Name'),
initialValue: widget.powerZone.name,
onChanged: (String value) => widget.powerZone.name = value,
),
const Spacer(),
MyButton.detail(
onPressed: openColorPicker,
child: const Text('Edit'),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Limit in W'),
controller: lowerLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.lowerLimit = int.parse(value);
widget.powerZone.lowerPercentage =
(int.parse(value) * 100 / widget.base).round();
lowerPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Limit in W'),
controller: upperLimitController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.upperLimit = int.parse(value);
widget.powerZone.upperPercentage =
(int.parse(value) * 100 / widget.base).round();
upperPercentageController.text =
(int.parse(value) * 100 / widget.base).round().toString();
},
),
TextFormField(
decoration: const InputDecoration(labelText: 'Lower Percentage in %'),
controller: lowerPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.lowerPercentage = int.parse(value);
widget.powerZone.lowerLimit =
(int.parse(value) * widget.base / 100).round();
lowerLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
]),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
MyButton.delete(onPressed: () => deletePowerZone(context)),
const SizedBox(width: 5),
MyButton.cancel(onPressed: () => Navigator.of(context).pop()),
const SizedBox(width: 5),
MyButton.save(onPressed: () => savePowerZone(context)),
],
),
],
TextFormField(
decoration: const InputDecoration(labelText: 'Upper Percentage in %'),
controller: upperPercentageController,
keyboardType: TextInputType.number,
onChanged: (String value) {
widget.powerZone.upperPercentage = int.parse(value);
widget.powerZone.upperLimit =
(int.parse(value) * widget.base / 100).round();
upperLimitController.text =
(int.parse(value) * widget.base / 100).round().toString();
},
),
const SizedBox(height: 10),
Row(children: <Widget>[
const Text('Color'),
const Spacer(),
CircleAvatar(
backgroundColor: Color(widget.powerZone.color),
radius: 20.0,
),
const Spacer(),
MyButton.detail(
onPressed: openColorPicker,
child: const Text('Edit'),
),
]),
const SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
MyButton.delete(onPressed: () => deletePowerZone(context)),
const SizedBox(width: 5),
MyButton.cancel(onPressed: () => Navigator.of(context).pop()),
const SizedBox(width: 5),
MyButton.save(onPressed: () => savePowerZone(context)),
],
),
],
),
),
);
}
......
......@@ -74,103 +74,105 @@ class _AddTagGroupScreenState extends State<AddTagGroupScreen> {
backgroundColor: MyColor.settings,
title: const Text('Add Tag Group'),
),
body: ListView(
padding: const EdgeInsets.only(left: 20, right: 20),
children: <Widget>[
TextFormField(
decoration: const InputDecoration(labelText: 'Name'),
initialValue: widget.tagGroup.name,
onChanged: (String value) => widget.tagGroup.name = value,
),
const SizedBox(height: 20),
Row(children: <Widget>[
const Text('Color'),
const Spacer(),
CircleAvatar(
backgroundColor: Color(widget.tagGroup.color),
radius: 20.0,
body: SafeArea(
child: ListView(
padding: const EdgeInsets.only(left: 20, right: 20),
children: <Widget>[
TextFormField(
decoration: const InputDecoration(labelText: 'Name'),
initialValue: widget.tagGroup.name,
onChanged: (String value) => widget.tagGroup.name = value,
),
const Spacer(),
MyButton.detail(
onPressed: openColorPicker,
child: const Text('Edit'),
),
]),
const SizedBox(height: 20),
DataTable(
headingRowHeight: kMinInteractiveDimension * 0.80,
dataRowHeight: kMinInteractiveDimension * 0.75,
columnSpacing: 20,
horizontalMargin: 10,
columns: const <DataColumn>[
DataColumn(label: Text('Tag')),
DataColumn(label: Text('Color')),
DataColumn(label: Text('Edit')),
],
rows: tags.map((Tag tag) {
return DataRow(
key: ValueKey<int>(tag.id),
cells: <DataCell>[
DataCell(Text(tag.name)),
DataCell(CircleColor(
circleSize: 20,
elevation: 0,
color: Color(tag.color),
)),
DataCell(
MyIcon.edit,
onTap: () async {
await Navigator.push(
context,
MaterialPageRoute<BuildContext>(
builder: (BuildContext context) => AddTagScreen(
tag: tag,
const SizedBox(height: 20),
Row(children: <Widget>[
const Text('Color'),
const Spacer(),
CircleAvatar(
backgroundColor: Color(widget.tagGroup.color),
radius: 20.0,
),
const Spacer(),
MyButton.detail(
onPressed: openColorPicker,
child: const Text('Edit'),
),
]),
const SizedBox(height: 20),
DataTable(
headingRowHeight: kMinInteractiveDimension * 0.80,
dataRowHeight: kMinInteractiveDimension * 0.75,
columnSpacing: 20,
horizontalMargin: 10,
columns: const <DataColumn>[
DataColumn(label: Text('Tag')),
DataColumn(label: Text('Color')),
DataColumn(label: Text('Edit')),
],
rows: tags.map((Tag tag) {
return DataRow(