Commit 518f2f15 authored by Administrator's avatar Administrator

fix the getChildren() for parent.id == null bug with if-conditions

parent 2d3369c2
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/home/stefan/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-05-15 19:03:35.227067","version":"1.17.1"}
\ 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":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/home/stefan/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-05-15 19:45:41.979156","version":"1.17.1"}
\ No newline at end of file
This diff is collapsed.
......@@ -23,9 +23,11 @@ class HeartRateZone extends ChangeNotifier {
..color = color ?? 0xFFFFc107;
if (lowerPercentage != null)
db.lowerLimit = (lowerPercentage * heartRateZoneSchema.db.base / 100).round();
db.lowerLimit =
(lowerPercentage * heartRateZoneSchema.db.base / 100).round();
if (upperPercentage != null)
db.upperLimit = (upperPercentage * heartRateZoneSchema.db.base / 100).round();
db.upperLimit =
(upperPercentage * heartRateZoneSchema.db.base / 100).round();
}
HeartRateZone.fromDb(this.db);
......@@ -37,6 +39,7 @@ class HeartRateZone extends ChangeNotifier {
static Future<List<HeartRateZone>> all(
{@required HeartRateZoneSchema heartRateZoneSchema}) async {
if (heartRateZoneSchema.db.id != null) {
var dbHeartRateZoneList = await heartRateZoneSchema.db
.getDbHeartRateZones()
.orderByDesc('lowerlimit')
......@@ -45,5 +48,7 @@ class HeartRateZone extends ChangeNotifier {
.map((dbHeartRateZone) => HeartRateZone.fromDb(dbHeartRateZone))
.toList();
return heartRateZones;
} else
return [];
}
}
......@@ -37,6 +37,7 @@ class PowerZone extends ChangeNotifier {
static Future<List<PowerZone>> all(
{@required PowerZoneSchema powerZoneSchema}) async {
if (powerZoneSchema.db.id != null) {
var dbPowerZoneList = await powerZoneSchema.db
.getDbPowerZones()
.orderByDesc('lowerlimit')
......@@ -45,5 +46,7 @@ class PowerZone extends ChangeNotifier {
.map((dbPowerZone) => PowerZone.fromDb(dbPowerZone))
.toList();
return powerZones;
} else
return [];
}
}
......@@ -25,10 +25,11 @@ class Tag extends ChangeNotifier {
}
static Future<List<Tag>> all({@required TagGroup tagGroup}) async {
print(tagGroup.db.id);
if (tagGroup.db.id != null) {
var dbTagList = await tagGroup.db.getDbTags().orderBy('name').toList();
print(dbTagList.length);
var tags = dbTagList.map((dbTag) => Tag.fromDb(dbTag)).toList();
return tags;
} else
return [];
}
}
......@@ -204,7 +204,6 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
}
recalculate() async {
print("Start");
List<Activity> activities;
activities = await Activity.all(athlete: widget.athlete);
int index = 0;
......
......@@ -615,14 +615,14 @@ packages:
name: sqfentity
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.3+1"
version: "1.3.5+3"
sqfentity_gen:
dependency: "direct main"
description:
name: sqfentity_gen
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.3+3"
version: "1.3.5+4"
sqflite:
dependency: transitive
description:
......
......@@ -12,8 +12,8 @@ dependencies:
flutter_launcher_icons: ^0.7.2
cupertino_icons: ^0.1.2
strava_flutter: ^1.2.1+54
sqfentity: 1.2.3+1
sqfentity_gen: 1.2.3+3
sqfentity: 1.3.5+3
sqfentity_gen: 1.3.5+4
dio: ^3.0.7
dio_cookie_manager: ^1.0.0
......
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