From 38f43a48ec894c32f4eb0980189a7568a19e93f7 Mon Sep 17 00:00:00 2001 From: spinel Date: Mon, 21 Mar 2022 01:29:36 +0100 Subject: [PATCH] various updates --- lib/main.dart | 4 +- lib/models/log_entry.dart | 17 +- lib/navigation.dart | 4 +- lib/objectbox-model.json | 2213 +++++++++++++++++++------------------ lib/objectbox.g.dart | 533 ++++----- pubspec.lock | 12 + 6 files changed, 1321 insertions(+), 1462 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index caf29fc..89483c7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,8 +18,8 @@ import 'package:diameter/screens/bolus/bolus_profile_detail.dart'; import 'package:diameter/screens/log/log_overview.dart'; import 'package:diameter/screens/reports/daily_chart.dart'; import 'package:diameter/screens/log/log_entry/log_entry.dart'; -import 'package:diameter/screens/log/log_event_detail.dart'; -import 'package:diameter/screens/log/log_event_list.dart'; +import 'package:diameter/screens/log/log_event/log_event_detail.dart'; +import 'package:diameter/screens/log/log_event/log_event_list.dart'; import 'package:diameter/screens/meal/meal_detail.dart'; import 'package:diameter/screens/meal/meal_list.dart'; import 'package:diameter/screens/reports/export.dart'; diff --git a/lib/models/log_entry.dart b/lib/models/log_entry.dart index 41ae732..97f687e 100644 --- a/lib/models/log_entry.dart +++ b/lib/models/log_entry.dart @@ -63,22 +63,7 @@ class LogEntry { entry.time.isBefore(endOfDay)); }).toList(); } - - @override - String toString() { - return DateTimeUtils.displayDateTime(time); - } - - static List getAllForDate(DateTime date) { - DateTime startOfDay = DateTime(date.year, date.month, date.day); - DateTime endOfDay = startOfDay.add(const Duration(days: 1)); - QueryBuilder builder = box.query(LogEntry_.deleted.equals(false)) - ..order(LogEntry_.time, flags: Order.descending); - return builder.build().find().where((entry) { - return (entry.time.compareTo(startOfDay) >= 0 && entry.time.isBefore(endOfDay)); - }).toList(); - } - + @override String toString() { return DateTimeUtils.displayDateTime(time); diff --git a/lib/navigation.dart b/lib/navigation.dart index 02151c9..996c38e 100644 --- a/lib/navigation.dart +++ b/lib/navigation.dart @@ -19,8 +19,8 @@ import 'package:diameter/screens/log/log_entry/log_bolus_detail.dart'; import 'package:diameter/screens/log/log_overview.dart'; import 'package:diameter/screens/reports/daily_chart.dart'; import 'package:diameter/screens/log/log_entry/log_entry.dart'; -import 'package:diameter/screens/log/log_event_detail.dart'; -import 'package:diameter/screens/log/log_event_list.dart'; +import 'package:diameter/screens/log/log_event/log_event_detail.dart'; +import 'package:diameter/screens/log/log_event/log_event_list.dart'; import 'package:diameter/screens/log/log_entry/log_meal_detail.dart'; import 'package:diameter/screens/meal/meal_detail.dart'; import 'package:diameter/screens/meal/meal_list.dart'; diff --git a/lib/objectbox-model.json b/lib/objectbox-model.json index 34518f3..a96c422 100644 --- a/lib/objectbox-model.json +++ b/lib/objectbox-model.json @@ -1,1107 +1,1132 @@ { - "_note1": "KEEP THIS FILE! Check it into a version control system (VCS) like git.", - "_note2": "ObjectBox manages crucial IDs for your object model. See docs for details.", - "_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.", - "entities": [ + "_note1": "KEEP THIS FILE! Check it into a version control system (VCS) like git.", + "_note2": "ObjectBox manages crucial IDs for your object model. See docs for details.", + "_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.", + "entities": [ + { + "id": "2:1467758525778521891", + "lastPropertyId": "6:3409466778841164684", + "name": "Basal", + "flags": 2, + "properties": [ { - "id": "2:1467758525778521891", - "lastPropertyId": "6:3409466778841164684", - "name": "Basal", - "flags": 2, - "properties": [ - { - "id": "1:4281816825522738642", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:4009055523978371979", - "name": "startTime", - "type": 10 - }, - { - "id": "3:4023788962759622162", - "name": "endTime", - "type": 10 - }, - { - "id": "4:7477362011547874977", - "name": "units", - "type": 8 - }, - { - "id": "5:3908367275335317130", - "name": "basalProfileId", - "type": 11, - "flags": 520, - "indexId": "1:8279975749291974737", - "relationTarget": "BasalProfile" - }, - { - "id": "6:3409466778841164684", - "name": "deleted", - "type": 1 - } - ], - "relations": [] + "id": "1:4281816825522738642", + "name": "id", + "type": 6, + "flags": 1 }, { - "id": "3:3613736032926903785", - "lastPropertyId": "5:8140071977687660397", - "name": "BasalProfile", - "flags": 2, - "properties": [ - { - "id": "1:353771983641472117", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:3551375678911240048", - "name": "name", - "type": 9 - }, - { - "id": "3:8867907906620144161", - "name": "active", - "type": 1 - }, - { - "id": "4:6719547342639071472", - "name": "notes", - "type": 9 - }, - { - "id": "5:8140071977687660397", - "name": "deleted", - "type": 1 - } - ], - "relations": [] + "id": "2:4009055523978371979", + "name": "startTime", + "type": 10 }, { - "id": "4:3417770529060202389", - "lastPropertyId": "9:7440090146687096977", - "name": "Bolus", - "flags": 2, - "properties": [ - { - "id": "1:8141647919190345775", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:5125398907947855021", - "name": "startTime", - "type": 10 - }, - { - "id": "3:4407971823097024949", - "name": "endTime", - "type": 10 - }, - { - "id": "4:2189083553538343203", - "name": "units", - "type": 8 - }, - { - "id": "5:1743412468359480761", - "name": "carbs", - "type": 8 - }, - { - "id": "6:6172996718025500229", - "name": "mgPerDl", - "type": 6 - }, - { - "id": "7:5407916209359443797", - "name": "mmolPerL", - "type": 8 - }, - { - "id": "8:7679622918986671917", - "name": "bolusProfileId", - "type": 11, - "flags": 520, - "indexId": "2:1936045997906240691", - "relationTarget": "BolusProfile" - }, - { - "id": "9:7440090146687096977", - "name": "deleted", - "type": 1 - } - ], - "relations": [] + "id": "3:4023788962759622162", + "name": "endTime", + "type": 10 }, { - "id": "5:8812452529027052317", - "lastPropertyId": "5:8082994824481464395", - "name": "BolusProfile", - "flags": 2, - "properties": [ - { - "id": "1:4233863196673391978", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:1213341428301430611", - "name": "name", - "type": 9 - }, - { - "id": "3:8255411532896152868", - "name": "active", - "type": 1 - }, - { - "id": "4:3030493484602726372", - "name": "notes", - "type": 9 - }, - { - "id": "5:8082994824481464395", - "name": "deleted", - "type": 1 - } - ], - "relations": [] + "id": "4:7477362011547874977", + "name": "units", + "type": 8 }, { - "id": "6:752131069307970560", - "lastPropertyId": "10:2505303363495348118", - "name": "LogEntry", - "flags": 2, - "properties": [ - { - "id": "1:5528657304180237933", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:2227745196606148370", - "name": "time", - "type": 10 - }, - { - "id": "3:6679353626542225935", - "name": "mgPerDl", - "type": 6 - }, - { - "id": "4:7624273251826662730", - "name": "mmolPerL", - "type": 8 - }, - { - "id": "8:6492273995038150006", - "name": "notes", - "type": 9 - }, - { - "id": "9:1692732373071965573", - "name": "deleted", - "type": 1 - }, - { - "id": "10:2505303363495348118", - "name": "glucoseTrend", - "type": 8 - } - ], - "relations": [] + "id": "5:3908367275335317130", + "name": "basalProfileId", + "type": 11, + "flags": 520, + "indexId": "1:8279975749291974737", + "relationTarget": "BasalProfile" }, { - "id": "7:4303325892753185970", - "lastPropertyId": "12:3041952167628926163", - "name": "LogEvent", - "flags": 2, - "properties": [ - { - "id": "1:6648501734758557663", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:4564145770032506132", - "name": "time", - "type": 10 - }, - { - "id": "3:1956029073259700909", - "name": "endTime", - "type": 10 - }, - { - "id": "4:289190785515853098", - "name": "hasEndTime", - "type": 1 - }, - { - "id": "5:3285255817130847007", - "name": "notes", - "type": 9 - }, - { - "id": "8:2514297323717317184", - "name": "eventTypeId", - "type": 11, - "flags": 520, - "indexId": "5:1417691902662024007", - "relationTarget": "LogEventType" - }, - { - "id": "9:8477413048577624801", - "name": "deleted", - "type": 1 - }, - { - "id": "10:987218091728524211", - "name": "bolusProfileId", - "type": 11, - "flags": 520, - "indexId": "25:2500612771974500993", - "relationTarget": "BolusProfile" - }, - { - "id": "11:2013538196800336796", - "name": "basalProfileId", - "type": 11, - "flags": 520, - "indexId": "26:4562998391990896273", - "relationTarget": "BasalProfile" - }, - { - "id": "12:3041952167628926163", - "name": "reminderDuration", - "type": 6 - } - ], - "relations": [] - }, - { - "id": "8:8362795406595606110", - "lastPropertyId": "8:1869014400856897151", - "name": "LogEventType", - "flags": 2, - "properties": [ - { - "id": "1:1430413826199774000", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:2680646402943052466", - "name": "value", - "type": 9 - }, - { - "id": "3:8730441532702098240", - "name": "hasEndTime", - "type": 1 - }, - { - "id": "4:236107426012682102", - "name": "defaultReminderDuration", - "type": 6 - }, - { - "id": "5:7361377572496986196", - "name": "notes", - "type": 9 - }, - { - "id": "6:5428344494256722438", - "name": "deleted", - "type": 1 - }, - { - "id": "7:9194648252717310397", - "name": "bolusProfileId", - "type": 11, - "flags": 520, - "indexId": "27:758221514459743282", - "relationTarget": "BolusProfile" - }, - { - "id": "8:1869014400856897151", - "name": "basalProfileId", - "type": 11, - "flags": 520, - "indexId": "28:4563029809754152081", - "relationTarget": "BasalProfile" - } - ], - "relations": [] - }, - { - "id": "9:411177866700467286", - "lastPropertyId": "19:8965198821438347033", - "name": "LogMeal", - "flags": 2, - "properties": [ - { - "id": "1:962999525294133158", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:4212591835755306346", - "name": "value", - "type": 9 - }, - { - "id": "3:2349971916492396452", - "name": "carbsRatio", - "type": 8 - }, - { - "id": "4:6619360836320223700", - "name": "portionSize", - "type": 8 - }, - { - "id": "6:8074052538574863399", - "name": "bolus", - "type": 8 - }, - { - "id": "9:1920579694098037947", - "name": "notes", - "type": 9 - }, - { - "id": "10:1795064951424581062", - "name": "logEntryId", - "type": 11, - "flags": 520, - "indexId": "6:2834631406671335954", - "relationTarget": "LogEntry" - }, - { - "id": "11:1891119831250929825", - "name": "mealId", - "type": 11, - "flags": 520, - "indexId": "7:7173877404300881319", - "relationTarget": "Meal" - }, - { - "id": "12:4842743668630588125", - "name": "mealSourceId", - "type": 11, - "flags": 520, - "indexId": "8:7798251372140622457", - "relationTarget": "MealSource" - }, - { - "id": "13:2354087448211548018", - "name": "mealCategoryId", - "type": 11, - "flags": 520, - "indexId": "9:169838544472067864", - "relationTarget": "MealCategory" - }, - { - "id": "14:6539714286499574550", - "name": "mealPortionTypeId", - "type": 11, - "flags": 520, - "indexId": "10:5017472742879643357", - "relationTarget": "MealPortionType" - }, - { - "id": "15:6038336651358102122", - "name": "portionSizeAccuracyId", - "type": 11, - "flags": 520, - "indexId": "11:7222637893025102905", - "relationTarget": "Accuracy" - }, - { - "id": "16:7121997990741934484", - "name": "carbsRatioAccuracyId", - "type": 11, - "flags": 520, - "indexId": "12:35287836658362611", - "relationTarget": "Accuracy" - }, - { - "id": "17:7341439841011629937", - "name": "deleted", - "type": 1 - }, - { - "id": "18:7405129785654054238", - "name": "amount", - "type": 8 - }, - { - "id": "19:8965198821438347033", - "name": "totalCarbs", - "type": 8 - } - ], - "relations": [] - }, - { - "id": "10:382130101578692012", - "lastPropertyId": "15:8283810711091063880", - "name": "Meal", - "flags": 2, - "properties": [ - { - "id": "1:612386612600420389", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:681065067668661250", - "name": "value", - "type": 9 - }, - { - "id": "3:2286464176896471045", - "name": "carbsRatio", - "type": 8 - }, - { - "id": "4:416562598768357192", - "name": "portionSize", - "type": 8 - }, - { - "id": "5:1888298906034647156", - "name": "carbsPerPortion", - "type": 8 - }, - { - "id": "6:3569732290918220814", - "name": "delayedBolusDuration", - "type": 6 - }, - { - "id": "8:6111684052388229887", - "name": "notes", - "type": 9 - }, - { - "id": "9:5739692923906084863", - "name": "mealSourceId", - "type": 11, - "flags": 520, - "indexId": "13:5996617393160420536", - "relationTarget": "MealSource" - }, - { - "id": "10:8193290820580187413", - "name": "mealCategoryId", - "type": 11, - "flags": 520, - "indexId": "14:2128681772675444526", - "relationTarget": "MealCategory" - }, - { - "id": "11:3434302594951612479", - "name": "mealPortionTypeId", - "type": 11, - "flags": 520, - "indexId": "15:6211229960970898621", - "relationTarget": "MealPortionType" - }, - { - "id": "12:7588894964037003621", - "name": "portionSizeAccuracyId", - "type": 11, - "flags": 520, - "indexId": "16:7050212577048329568", - "relationTarget": "Accuracy" - }, - { - "id": "13:4890778480468380841", - "name": "carbsRatioAccuracyId", - "type": 11, - "flags": 520, - "indexId": "17:9108886538013386415", - "relationTarget": "Accuracy" - }, - { - "id": "14:3567196286623536415", - "name": "deleted", - "type": 1 - }, - { - "id": "15:8283810711091063880", - "name": "delayedBolusPercentage", - "type": 8 - } - ], - "relations": [] - }, - { - "id": "11:3158200688796904913", - "lastPropertyId": "4:824435977543069541", - "name": "MealCategory", - "flags": 2, - "properties": [ - { - "id": "1:3678943122076184840", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:1327341169479604917", - "name": "value", - "type": 9 - }, - { - "id": "3:3543757971350345683", - "name": "notes", - "type": 9 - }, - { - "id": "4:824435977543069541", - "name": "deleted", - "type": 1 - } - ], - "relations": [] - }, - { - "id": "12:2111511899235985637", - "lastPropertyId": "4:5680236937391945907", - "name": "MealPortionType", - "flags": 2, - "properties": [ - { - "id": "1:65428405312238271", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:5681230398840506311", - "name": "value", - "type": 9 - }, - { - "id": "3:1950852666001613408", - "name": "notes", - "type": 9 - }, - { - "id": "4:5680236937391945907", - "name": "deleted", - "type": 1 - } - ], - "relations": [] - }, - { - "id": "13:1283034494527412242", - "lastPropertyId": "8:4547899751779962180", - "name": "MealSource", - "flags": 2, - "properties": [ - { - "id": "1:7205380295259922130", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:5768595544243621991", - "name": "value", - "type": 9 - }, - { - "id": "3:458760914712162612", - "name": "notes", - "type": 9 - }, - { - "id": "4:2034134758700899120", - "name": "defaultMealCategoryId", - "type": 11, - "flags": 520, - "indexId": "18:3223820950176501928", - "relationTarget": "MealCategory" - }, - { - "id": "5:8956771998294100216", - "name": "defaultMealPortionTypeId", - "type": 11, - "flags": 520, - "indexId": "19:2932086504877178672", - "relationTarget": "MealPortionType" - }, - { - "id": "6:7521960537811004317", - "name": "defaultCarbsRatioAccuracyId", - "type": 11, - "flags": 520, - "indexId": "20:2257356658656760706", - "relationTarget": "Accuracy" - }, - { - "id": "7:5852853174931678667", - "name": "defaultPortionSizeAccuracyId", - "type": 11, - "flags": 520, - "indexId": "21:1931330716440762729", - "relationTarget": "Accuracy" - }, - { - "id": "8:4547899751779962180", - "name": "deleted", - "type": 1 - } - ], - "relations": [] - }, - { - "id": "14:8033487006694871160", - "lastPropertyId": "18:7503231998671134983", - "name": "LogBolus", - "flags": 2, - "properties": [ - { - "id": "1:8254237730262024662", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:7669701519569266656", - "name": "units", - "type": 8 - }, - { - "id": "3:1967840431906109999", - "name": "carbs", - "type": 8 - }, - { - "id": "4:5520321978435312625", - "name": "delay", - "type": 6 - }, - { - "id": "7:3065420032567707091", - "name": "setManually", - "type": 1 - }, - { - "id": "8:2967613978873295525", - "name": "notes", - "type": 9 - }, - { - "id": "9:5454965717985089938", - "name": "logEntryId", - "type": 11, - "flags": 520, - "indexId": "22:5852072074740543047", - "relationTarget": "LogEntry" - }, - { - "id": "10:4105009806564072037", - "name": "rateId", - "type": 11, - "flags": 520, - "indexId": "23:1594553054621930876", - "relationTarget": "Bolus" - }, - { - "id": "11:4818762109001810295", - "name": "mealId", - "type": 11, - "flags": 520, - "indexId": "24:4224983816051843140", - "relationTarget": "LogMeal" - }, - { - "id": "12:4765038304548427459", - "name": "deleted", - "type": 1 - }, - { - "id": "13:2530431967957143684", - "name": "mgPerDlCurrent", - "type": 6 - }, - { - "id": "14:5210229118898251877", - "name": "mgPerDlTarget", - "type": 6 - }, - { - "id": "15:657840864788362204", - "name": "mgPerDlCorrection", - "type": 6 - }, - { - "id": "16:3999403624434995450", - "name": "mmolPerLCurrent", - "type": 8 - }, - { - "id": "17:2852253735546692099", - "name": "mmolPerLTarget", - "type": 8 - }, - { - "id": "18:7503231998671134983", - "name": "mmolPerLCorrection", - "type": 8 - } - ], - "relations": [] - }, - { - "id": "15:291512798403320400", - "lastPropertyId": "7:6675647182186603076", - "name": "Accuracy", - "flags": 2, - "properties": [ - { - "id": "1:8405388350474524599", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:1919049381880760479", - "name": "value", - "type": 9 - }, - { - "id": "3:7181081526218678274", - "name": "forCarbsRatio", - "type": 1 - }, - { - "id": "4:3576006369067328383", - "name": "forPortionSize", - "type": 1 - }, - { - "id": "5:7027546512578846894", - "name": "confidenceRating", - "type": 6 - }, - { - "id": "6:6625101003527710274", - "name": "notes", - "type": 9 - }, - { - "id": "7:6675647182186603076", - "name": "deleted", - "type": 1 - } - ], - "relations": [] - }, - { - "id": "16:3989341091218179227", - "lastPropertyId": "27:3553639710779248831", - "name": "Settings", - "flags": 2, - "properties": [ - { - "id": "1:7803753645747063723", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:4703380985530623101", - "name": "dateFormat", - "type": 9 - }, - { - "id": "3:2983395924801005937", - "name": "longDateFormat", - "type": 9 - }, - { - "id": "4:2579032794029389590", - "name": "timeFormat", - "type": 9 - }, - { - "id": "5:3970690908108519507", - "name": "longTimeFormat", - "type": 9 - }, - { - "id": "6:349893175332801783", - "name": "showConfirmationDialogOnCancel", - "type": 1 - }, - { - "id": "7:4049915860178079910", - "name": "showConfirmationDialogOnDelete", - "type": 1 - }, - { - "id": "8:3088241443557186512", - "name": "showConfirmationDialogOnStopEvent", - "type": 1 - }, - { - "id": "18:1203593429961092769", - "name": "nutritionMeasurementIndex", - "type": 6 - }, - { - "id": "19:8895176254912253797", - "name": "glucoseDisplayModeIndex", - "type": 6 - }, - { - "id": "20:6560414475711071975", - "name": "glucoseMeasurementIndex", - "type": 6 - }, - { - "id": "21:7934134105044248002", - "name": "targetGlucoseMgPerDl", - "type": 6 - }, - { - "id": "22:3595473653451456068", - "name": "targetGlucoseMmolPerL", - "type": 8 - }, - { - "id": "23:3611447442844013652", - "name": "useDarkTheme", - "type": 1 - }, - { - "id": "24:3003519517071020397", - "name": "insulinIncrements", - "type": 8 - }, - { - "id": "25:402003851844402390", - "name": "nutritionIncrements", - "type": 8 - }, - { - "id": "26:3104312506075410259", - "name": "mmolPerLIncrements", - "type": 8 - }, - { - "id": "27:3553639710779248831", - "name": "amountIncrements", - "type": 8 - } - ], - "relations": [] - }, - { - "id": "17:5041265995704044399", - "lastPropertyId": "7:1333487551279074696", - "name": "GlucoseTarget", - "flags": 2, - "properties": [ - { - "id": "1:4322960567133959537", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:7533461804561299987", - "name": "deleted", - "type": 1 - }, - { - "id": "3:4949963248761074916", - "name": "fromMgPerDL", - "type": 6 - }, - { - "id": "4:8685380695305799464", - "name": "toMgPerDl", - "type": 6 - }, - { - "id": "5:2925449628924807050", - "name": "fromMmolPerL", - "type": 8 - }, - { - "id": "6:3244873743284485064", - "name": "toMmolPerL", - "type": 8 - }, - { - "id": "7:1333487551279074696", - "name": "color", - "type": 6 - } - ], - "relations": [] - }, - { - "id": "18:6497942314956341514", - "lastPropertyId": "11:8488657312300528492", - "name": "Recipe", - "flags": 2, - "properties": [ - { - "id": "1:6426741154282018946", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:1167304402395485629", - "name": "deleted", - "type": 1 - }, - { - "id": "3:1244733840071626966", - "name": "name", - "type": 9 - }, - { - "id": "9:8593446427752839266", - "name": "notes", - "type": 9 - }, - { - "id": "10:4370359747396560337", - "name": "portionId", - "type": 11, - "flags": 520, - "indexId": "29:5110151182694376118", - "relationTarget": "Meal" - }, - { - "id": "11:8488657312300528492", - "name": "servings", - "type": 8 - } - ], - "relations": [] - }, - { - "id": "19:6950311793136068892", - "lastPropertyId": "5:6495065881132428893", - "name": "Ingredient", - "flags": 2, - "properties": [ - { - "id": "1:7766569281758551418", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:3830559702655088692", - "name": "deleted", - "type": 1 - }, - { - "id": "3:602057803225843875", - "name": "amount", - "type": 8 - }, - { - "id": "4:26686399245586953", - "name": "recipeId", - "type": 11, - "flags": 520, - "indexId": "30:5492781242713788590", - "relationTarget": "Recipe" - }, - { - "id": "5:6495065881132428893", - "name": "ingredientId", - "type": 11, - "flags": 520, - "indexId": "31:3277019237664417023", - "relationTarget": "Meal" - } - ], - "relations": [] - }, - { - "id": "20:4237292160526261631", - "lastPropertyId": "5:3477783279940695158", - "name": "User", - "flags": 2, - "properties": [ - { - "id": "1:785183194548024772", - "name": "id", - "type": 6, - "flags": 1 - }, - { - "id": "2:2837394475791909830", - "name": "deleted", - "type": 1 - }, - { - "id": "3:6612000015066380372", - "name": "name", - "type": 9 - }, - { - "id": "4:861275034953202445", - "name": "email", - "type": 9 - }, - { - "id": "5:3477783279940695158", - "name": "password", - "type": 9 - } - ], - "relations": [] + "id": "6:3409466778841164684", + "name": "deleted", + "type": 1 } - ], - "lastEntityId": "20:4237292160526261631", - "lastIndexId": "31:3277019237664417023", - "lastRelationId": "0:0", - "lastSequenceId": "0:0", - "modelVersion": 5, - "modelVersionParserMinimum": 5, - "retiredEntityUids": [3095978685310268382], - "retiredIndexUids": [3670661188280692002, 7379712902406481832], - "retiredPropertyUids": [ - 3455702077061719523, 1048198814030724077, 9003780003858349085, - 5421422436108145565, 7741631874181070179, 5471636804765937328, - 6855574218883169324, 5313708456544000157, 3678829169126156351, - 1568597071506264632, 8795268969829293398, 3247926313599127440, - 8789440370359282572, 7838546213550447420, 8031421171668506924, - 1614362036318874174, 1675040259141389754, 7518219134349037920, - 2172890064639236018, 310032577683835406, 5588897884422150510, - 7638848982383620744, 3282706593658092097, 596980591281311896, - 3633551763915044903, 2215708755581938580, 241621230513128588, - 4678123663117222609, 780211923138281722, 763575433624979013, - 1225271130099322691 - ], - "retiredRelationUids": [], - "version": 1 -} + ], + "relations": [] + }, + { + "id": "3:3613736032926903785", + "lastPropertyId": "5:8140071977687660397", + "name": "BasalProfile", + "flags": 2, + "properties": [ + { + "id": "1:353771983641472117", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:3551375678911240048", + "name": "name", + "type": 9 + }, + { + "id": "3:8867907906620144161", + "name": "active", + "type": 1 + }, + { + "id": "4:6719547342639071472", + "name": "notes", + "type": 9 + }, + { + "id": "5:8140071977687660397", + "name": "deleted", + "type": 1 + } + ], + "relations": [] + }, + { + "id": "4:3417770529060202389", + "lastPropertyId": "9:7440090146687096977", + "name": "Bolus", + "flags": 2, + "properties": [ + { + "id": "1:8141647919190345775", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:5125398907947855021", + "name": "startTime", + "type": 10 + }, + { + "id": "3:4407971823097024949", + "name": "endTime", + "type": 10 + }, + { + "id": "4:2189083553538343203", + "name": "units", + "type": 8 + }, + { + "id": "5:1743412468359480761", + "name": "carbs", + "type": 8 + }, + { + "id": "6:6172996718025500229", + "name": "mgPerDl", + "type": 6 + }, + { + "id": "7:5407916209359443797", + "name": "mmolPerL", + "type": 8 + }, + { + "id": "8:7679622918986671917", + "name": "bolusProfileId", + "type": 11, + "flags": 520, + "indexId": "2:1936045997906240691", + "relationTarget": "BolusProfile" + }, + { + "id": "9:7440090146687096977", + "name": "deleted", + "type": 1 + } + ], + "relations": [] + }, + { + "id": "5:8812452529027052317", + "lastPropertyId": "5:8082994824481464395", + "name": "BolusProfile", + "flags": 2, + "properties": [ + { + "id": "1:4233863196673391978", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:1213341428301430611", + "name": "name", + "type": 9 + }, + { + "id": "3:8255411532896152868", + "name": "active", + "type": 1 + }, + { + "id": "4:3030493484602726372", + "name": "notes", + "type": 9 + }, + { + "id": "5:8082994824481464395", + "name": "deleted", + "type": 1 + } + ], + "relations": [] + }, + { + "id": "6:752131069307970560", + "lastPropertyId": "10:2505303363495348118", + "name": "LogEntry", + "flags": 2, + "properties": [ + { + "id": "1:5528657304180237933", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:2227745196606148370", + "name": "time", + "type": 10 + }, + { + "id": "3:6679353626542225935", + "name": "mgPerDl", + "type": 6 + }, + { + "id": "4:7624273251826662730", + "name": "mmolPerL", + "type": 8 + }, + { + "id": "8:6492273995038150006", + "name": "notes", + "type": 9 + }, + { + "id": "9:1692732373071965573", + "name": "deleted", + "type": 1 + }, + { + "id": "10:2505303363495348118", + "name": "glucoseTrend", + "type": 8 + } + ], + "relations": [] + }, + { + "id": "7:4303325892753185970", + "lastPropertyId": "12:3041952167628926163", + "name": "LogEvent", + "flags": 2, + "properties": [ + { + "id": "1:6648501734758557663", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:4564145770032506132", + "name": "time", + "type": 10 + }, + { + "id": "3:1956029073259700909", + "name": "endTime", + "type": 10 + }, + { + "id": "4:289190785515853098", + "name": "hasEndTime", + "type": 1 + }, + { + "id": "5:3285255817130847007", + "name": "notes", + "type": 9 + }, + { + "id": "8:2514297323717317184", + "name": "eventTypeId", + "type": 11, + "flags": 520, + "indexId": "5:1417691902662024007", + "relationTarget": "LogEventType" + }, + { + "id": "9:8477413048577624801", + "name": "deleted", + "type": 1 + }, + { + "id": "10:987218091728524211", + "name": "bolusProfileId", + "type": 11, + "flags": 520, + "indexId": "25:2500612771974500993", + "relationTarget": "BolusProfile" + }, + { + "id": "11:2013538196800336796", + "name": "basalProfileId", + "type": 11, + "flags": 520, + "indexId": "26:4562998391990896273", + "relationTarget": "BasalProfile" + }, + { + "id": "12:3041952167628926163", + "name": "reminderDuration", + "type": 6 + } + ], + "relations": [] + }, + { + "id": "8:8362795406595606110", + "lastPropertyId": "8:1869014400856897151", + "name": "LogEventType", + "flags": 2, + "properties": [ + { + "id": "1:1430413826199774000", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:2680646402943052466", + "name": "value", + "type": 9 + }, + { + "id": "3:8730441532702098240", + "name": "hasEndTime", + "type": 1 + }, + { + "id": "4:236107426012682102", + "name": "defaultReminderDuration", + "type": 6 + }, + { + "id": "5:7361377572496986196", + "name": "notes", + "type": 9 + }, + { + "id": "6:5428344494256722438", + "name": "deleted", + "type": 1 + }, + { + "id": "7:9194648252717310397", + "name": "bolusProfileId", + "type": 11, + "flags": 520, + "indexId": "27:758221514459743282", + "relationTarget": "BolusProfile" + }, + { + "id": "8:1869014400856897151", + "name": "basalProfileId", + "type": 11, + "flags": 520, + "indexId": "28:4563029809754152081", + "relationTarget": "BasalProfile" + } + ], + "relations": [] + }, + { + "id": "9:411177866700467286", + "lastPropertyId": "19:8965198821438347033", + "name": "LogMeal", + "flags": 2, + "properties": [ + { + "id": "1:962999525294133158", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:4212591835755306346", + "name": "value", + "type": 9 + }, + { + "id": "3:2349971916492396452", + "name": "carbsRatio", + "type": 8 + }, + { + "id": "4:6619360836320223700", + "name": "portionSize", + "type": 8 + }, + { + "id": "6:8074052538574863399", + "name": "bolus", + "type": 8 + }, + { + "id": "9:1920579694098037947", + "name": "notes", + "type": 9 + }, + { + "id": "10:1795064951424581062", + "name": "logEntryId", + "type": 11, + "flags": 520, + "indexId": "6:2834631406671335954", + "relationTarget": "LogEntry" + }, + { + "id": "11:1891119831250929825", + "name": "mealId", + "type": 11, + "flags": 520, + "indexId": "7:7173877404300881319", + "relationTarget": "Meal" + }, + { + "id": "12:4842743668630588125", + "name": "mealSourceId", + "type": 11, + "flags": 520, + "indexId": "8:7798251372140622457", + "relationTarget": "MealSource" + }, + { + "id": "13:2354087448211548018", + "name": "mealCategoryId", + "type": 11, + "flags": 520, + "indexId": "9:169838544472067864", + "relationTarget": "MealCategory" + }, + { + "id": "14:6539714286499574550", + "name": "mealPortionTypeId", + "type": 11, + "flags": 520, + "indexId": "10:5017472742879643357", + "relationTarget": "MealPortionType" + }, + { + "id": "15:6038336651358102122", + "name": "portionSizeAccuracyId", + "type": 11, + "flags": 520, + "indexId": "11:7222637893025102905", + "relationTarget": "Accuracy" + }, + { + "id": "16:7121997990741934484", + "name": "carbsRatioAccuracyId", + "type": 11, + "flags": 520, + "indexId": "12:35287836658362611", + "relationTarget": "Accuracy" + }, + { + "id": "17:7341439841011629937", + "name": "deleted", + "type": 1 + }, + { + "id": "18:7405129785654054238", + "name": "amount", + "type": 8 + }, + { + "id": "19:8965198821438347033", + "name": "totalCarbs", + "type": 8 + } + ], + "relations": [] + }, + { + "id": "10:382130101578692012", + "lastPropertyId": "15:8283810711091063880", + "name": "Meal", + "flags": 2, + "properties": [ + { + "id": "1:612386612600420389", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:681065067668661250", + "name": "value", + "type": 9 + }, + { + "id": "3:2286464176896471045", + "name": "carbsRatio", + "type": 8 + }, + { + "id": "4:416562598768357192", + "name": "portionSize", + "type": 8 + }, + { + "id": "5:1888298906034647156", + "name": "carbsPerPortion", + "type": 8 + }, + { + "id": "6:3569732290918220814", + "name": "delayedBolusDuration", + "type": 6 + }, + { + "id": "8:6111684052388229887", + "name": "notes", + "type": 9 + }, + { + "id": "9:5739692923906084863", + "name": "mealSourceId", + "type": 11, + "flags": 520, + "indexId": "13:5996617393160420536", + "relationTarget": "MealSource" + }, + { + "id": "10:8193290820580187413", + "name": "mealCategoryId", + "type": 11, + "flags": 520, + "indexId": "14:2128681772675444526", + "relationTarget": "MealCategory" + }, + { + "id": "11:3434302594951612479", + "name": "mealPortionTypeId", + "type": 11, + "flags": 520, + "indexId": "15:6211229960970898621", + "relationTarget": "MealPortionType" + }, + { + "id": "12:7588894964037003621", + "name": "portionSizeAccuracyId", + "type": 11, + "flags": 520, + "indexId": "16:7050212577048329568", + "relationTarget": "Accuracy" + }, + { + "id": "13:4890778480468380841", + "name": "carbsRatioAccuracyId", + "type": 11, + "flags": 520, + "indexId": "17:9108886538013386415", + "relationTarget": "Accuracy" + }, + { + "id": "14:3567196286623536415", + "name": "deleted", + "type": 1 + }, + { + "id": "15:8283810711091063880", + "name": "delayedBolusPercentage", + "type": 8 + } + ], + "relations": [] + }, + { + "id": "11:3158200688796904913", + "lastPropertyId": "4:824435977543069541", + "name": "MealCategory", + "flags": 2, + "properties": [ + { + "id": "1:3678943122076184840", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:1327341169479604917", + "name": "value", + "type": 9 + }, + { + "id": "3:3543757971350345683", + "name": "notes", + "type": 9 + }, + { + "id": "4:824435977543069541", + "name": "deleted", + "type": 1 + } + ], + "relations": [] + }, + { + "id": "12:2111511899235985637", + "lastPropertyId": "4:5680236937391945907", + "name": "MealPortionType", + "flags": 2, + "properties": [ + { + "id": "1:65428405312238271", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:5681230398840506311", + "name": "value", + "type": 9 + }, + { + "id": "3:1950852666001613408", + "name": "notes", + "type": 9 + }, + { + "id": "4:5680236937391945907", + "name": "deleted", + "type": 1 + } + ], + "relations": [] + }, + { + "id": "13:1283034494527412242", + "lastPropertyId": "8:4547899751779962180", + "name": "MealSource", + "flags": 2, + "properties": [ + { + "id": "1:7205380295259922130", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:5768595544243621991", + "name": "value", + "type": 9 + }, + { + "id": "3:458760914712162612", + "name": "notes", + "type": 9 + }, + { + "id": "4:2034134758700899120", + "name": "defaultMealCategoryId", + "type": 11, + "flags": 520, + "indexId": "18:3223820950176501928", + "relationTarget": "MealCategory" + }, + { + "id": "5:8956771998294100216", + "name": "defaultMealPortionTypeId", + "type": 11, + "flags": 520, + "indexId": "19:2932086504877178672", + "relationTarget": "MealPortionType" + }, + { + "id": "6:7521960537811004317", + "name": "defaultCarbsRatioAccuracyId", + "type": 11, + "flags": 520, + "indexId": "20:2257356658656760706", + "relationTarget": "Accuracy" + }, + { + "id": "7:5852853174931678667", + "name": "defaultPortionSizeAccuracyId", + "type": 11, + "flags": 520, + "indexId": "21:1931330716440762729", + "relationTarget": "Accuracy" + }, + { + "id": "8:4547899751779962180", + "name": "deleted", + "type": 1 + } + ], + "relations": [] + }, + { + "id": "14:8033487006694871160", + "lastPropertyId": "18:7503231998671134983", + "name": "LogBolus", + "flags": 2, + "properties": [ + { + "id": "1:8254237730262024662", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:7669701519569266656", + "name": "units", + "type": 8 + }, + { + "id": "3:1967840431906109999", + "name": "carbs", + "type": 8 + }, + { + "id": "4:5520321978435312625", + "name": "delay", + "type": 6 + }, + { + "id": "7:3065420032567707091", + "name": "setManually", + "type": 1 + }, + { + "id": "8:2967613978873295525", + "name": "notes", + "type": 9 + }, + { + "id": "9:5454965717985089938", + "name": "logEntryId", + "type": 11, + "flags": 520, + "indexId": "22:5852072074740543047", + "relationTarget": "LogEntry" + }, + { + "id": "10:4105009806564072037", + "name": "rateId", + "type": 11, + "flags": 520, + "indexId": "23:1594553054621930876", + "relationTarget": "Bolus" + }, + { + "id": "11:4818762109001810295", + "name": "mealId", + "type": 11, + "flags": 520, + "indexId": "24:4224983816051843140", + "relationTarget": "LogMeal" + }, + { + "id": "12:4765038304548427459", + "name": "deleted", + "type": 1 + }, + { + "id": "13:2530431967957143684", + "name": "mgPerDlCurrent", + "type": 6 + }, + { + "id": "14:5210229118898251877", + "name": "mgPerDlTarget", + "type": 6 + }, + { + "id": "15:657840864788362204", + "name": "mgPerDlCorrection", + "type": 6 + }, + { + "id": "16:3999403624434995450", + "name": "mmolPerLCurrent", + "type": 8 + }, + { + "id": "17:2852253735546692099", + "name": "mmolPerLTarget", + "type": 8 + }, + { + "id": "18:7503231998671134983", + "name": "mmolPerLCorrection", + "type": 8 + } + ], + "relations": [] + }, + { + "id": "15:291512798403320400", + "lastPropertyId": "7:6675647182186603076", + "name": "Accuracy", + "flags": 2, + "properties": [ + { + "id": "1:8405388350474524599", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:1919049381880760479", + "name": "value", + "type": 9 + }, + { + "id": "3:7181081526218678274", + "name": "forCarbsRatio", + "type": 1 + }, + { + "id": "4:3576006369067328383", + "name": "forPortionSize", + "type": 1 + }, + { + "id": "5:7027546512578846894", + "name": "confidenceRating", + "type": 6 + }, + { + "id": "6:6625101003527710274", + "name": "notes", + "type": 9 + }, + { + "id": "7:6675647182186603076", + "name": "deleted", + "type": 1 + } + ], + "relations": [] + }, + { + "id": "16:3989341091218179227", + "lastPropertyId": "27:3553639710779248831", + "name": "Settings", + "flags": 2, + "properties": [ + { + "id": "1:7803753645747063723", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:4703380985530623101", + "name": "dateFormat", + "type": 9 + }, + { + "id": "3:2983395924801005937", + "name": "longDateFormat", + "type": 9 + }, + { + "id": "4:2579032794029389590", + "name": "timeFormat", + "type": 9 + }, + { + "id": "5:3970690908108519507", + "name": "longTimeFormat", + "type": 9 + }, + { + "id": "6:349893175332801783", + "name": "showConfirmationDialogOnCancel", + "type": 1 + }, + { + "id": "7:4049915860178079910", + "name": "showConfirmationDialogOnDelete", + "type": 1 + }, + { + "id": "8:3088241443557186512", + "name": "showConfirmationDialogOnStopEvent", + "type": 1 + }, + { + "id": "18:1203593429961092769", + "name": "nutritionMeasurementIndex", + "type": 6 + }, + { + "id": "19:8895176254912253797", + "name": "glucoseDisplayModeIndex", + "type": 6 + }, + { + "id": "20:6560414475711071975", + "name": "glucoseMeasurementIndex", + "type": 6 + }, + { + "id": "21:7934134105044248002", + "name": "targetGlucoseMgPerDl", + "type": 6 + }, + { + "id": "22:3595473653451456068", + "name": "targetGlucoseMmolPerL", + "type": 8 + }, + { + "id": "23:3611447442844013652", + "name": "useDarkTheme", + "type": 1 + }, + { + "id": "24:3003519517071020397", + "name": "insulinIncrements", + "type": 8 + }, + { + "id": "25:402003851844402390", + "name": "nutritionIncrements", + "type": 8 + }, + { + "id": "26:3104312506075410259", + "name": "mmolPerLIncrements", + "type": 8 + }, + { + "id": "27:3553639710779248831", + "name": "amountIncrements", + "type": 8 + } + ], + "relations": [] + }, + { + "id": "17:5041265995704044399", + "lastPropertyId": "7:1333487551279074696", + "name": "GlucoseTarget", + "flags": 2, + "properties": [ + { + "id": "1:4322960567133959537", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:7533461804561299987", + "name": "deleted", + "type": 1 + }, + { + "id": "3:4949963248761074916", + "name": "fromMgPerDL", + "type": 6 + }, + { + "id": "4:8685380695305799464", + "name": "toMgPerDl", + "type": 6 + }, + { + "id": "5:2925449628924807050", + "name": "fromMmolPerL", + "type": 8 + }, + { + "id": "6:3244873743284485064", + "name": "toMmolPerL", + "type": 8 + }, + { + "id": "7:1333487551279074696", + "name": "color", + "type": 6 + } + ], + "relations": [] + }, + { + "id": "18:6497942314956341514", + "lastPropertyId": "11:8488657312300528492", + "name": "Recipe", + "flags": 2, + "properties": [ + { + "id": "1:6426741154282018946", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:1167304402395485629", + "name": "deleted", + "type": 1 + }, + { + "id": "3:1244733840071626966", + "name": "name", + "type": 9 + }, + { + "id": "9:8593446427752839266", + "name": "notes", + "type": 9 + }, + { + "id": "10:4370359747396560337", + "name": "portionId", + "type": 11, + "flags": 520, + "indexId": "29:5110151182694376118", + "relationTarget": "Meal" + }, + { + "id": "11:8488657312300528492", + "name": "servings", + "type": 8 + } + ], + "relations": [] + }, + { + "id": "19:6950311793136068892", + "lastPropertyId": "5:6495065881132428893", + "name": "Ingredient", + "flags": 2, + "properties": [ + { + "id": "1:7766569281758551418", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:3830559702655088692", + "name": "deleted", + "type": 1 + }, + { + "id": "3:602057803225843875", + "name": "amount", + "type": 8 + }, + { + "id": "4:26686399245586953", + "name": "recipeId", + "type": 11, + "flags": 520, + "indexId": "30:5492781242713788590", + "relationTarget": "Recipe" + }, + { + "id": "5:6495065881132428893", + "name": "ingredientId", + "type": 11, + "flags": 520, + "indexId": "31:3277019237664417023", + "relationTarget": "Meal" + } + ], + "relations": [] + }, + { + "id": "20:4237292160526261631", + "lastPropertyId": "5:3477783279940695158", + "name": "User", + "flags": 2, + "properties": [ + { + "id": "1:785183194548024772", + "name": "id", + "type": 6, + "flags": 1 + }, + { + "id": "2:2837394475791909830", + "name": "deleted", + "type": 1 + }, + { + "id": "3:6612000015066380372", + "name": "name", + "type": 9 + }, + { + "id": "4:861275034953202445", + "name": "email", + "type": 9 + }, + { + "id": "5:3477783279940695158", + "name": "password", + "type": 9 + } + ], + "relations": [] + } + ], + "lastEntityId": "20:4237292160526261631", + "lastIndexId": "31:3277019237664417023", + "lastRelationId": "0:0", + "lastSequenceId": "0:0", + "modelVersion": 5, + "modelVersionParserMinimum": 5, + "retiredEntityUids": [ + 3095978685310268382 + ], + "retiredIndexUids": [ + 3670661188280692002, + 7379712902406481832 + ], + "retiredPropertyUids": [ + 3455702077061719523, + 1048198814030724077, + 9003780003858349085, + 5421422436108145565, + 7741631874181070179, + 5471636804765937328, + 6855574218883169324, + 5313708456544000157, + 3678829169126156351, + 1568597071506264632, + 8795268969829293398, + 3247926313599127440, + 8789440370359282572, + 7838546213550447420, + 8031421171668506924, + 1614362036318874174, + 1675040259141389754, + 7518219134349037920, + 2172890064639236018, + 310032577683835406, + 5588897884422150510, + 7638848982383620744, + 3282706593658092097, + 596980591281311896, + 3633551763915044903, + 2215708755581938580, + 241621230513128588, + 4678123663117222609, + 780211923138281722, + 763575433624979013, + 1225271130099322691 + ], + "retiredRelationUids": [], + "version": 1 +} \ No newline at end of file diff --git a/lib/objectbox.g.dart b/lib/objectbox.g.dart index 4659370..ca3d579 100644 --- a/lib/objectbox.g.dart +++ b/lib/objectbox.g.dart @@ -1234,7 +1234,7 @@ ModelDefinition getObjectBoxModel() { final buffer = fb.BufferContext(fbData); final rootOffset = buffer.derefObject(0); - final object = LogEventType( + final object = Bolus( id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), deleted: const fb.BoolReader() .vTableGet(buffer, rootOffset, 20, false), @@ -1250,6 +1250,190 @@ ModelDefinition getObjectBoxModel() { .vTableGetNullable(buffer, rootOffset, 14), mmolPerL: const fb.Float64Reader() .vTableGetNullable(buffer, rootOffset, 16)); + object.bolusProfile.targetId = + const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0); + object.bolusProfile.attach(store); + return object; + }), + BolusProfile: EntityDefinition( + model: _entities[3], + toOneRelations: (BolusProfile object) => [], + toManyRelations: (BolusProfile object) => {}, + getId: (BolusProfile object) => object.id, + setId: (BolusProfile object, int id) { + object.id = id; + }, + objectToFB: (BolusProfile object, fb.Builder fbb) { + final nameOffset = fbb.writeString(object.name); + final notesOffset = + object.notes == null ? null : fbb.writeString(object.notes!); + fbb.startTable(6); + fbb.addInt64(0, object.id); + fbb.addOffset(1, nameOffset); + fbb.addBool(2, object.active); + fbb.addOffset(3, notesOffset); + fbb.addBool(4, object.deleted); + fbb.finish(fbb.endTable()); + return object.id; + }, + objectFromFB: (Store store, ByteData fbData) { + final buffer = fb.BufferContext(fbData); + final rootOffset = buffer.derefObject(0); + + final object = BolusProfile( + id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), + deleted: const fb.BoolReader() + .vTableGet(buffer, rootOffset, 12, false), + name: const fb.StringReader(asciiOptimization: true) + .vTableGet(buffer, rootOffset, 6, ''), + active: + const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false), + notes: const fb.StringReader(asciiOptimization: true) + .vTableGetNullable(buffer, rootOffset, 10)); + + return object; + }), + LogEntry: EntityDefinition( + model: _entities[4], + toOneRelations: (LogEntry object) => [], + toManyRelations: (LogEntry object) => {}, + getId: (LogEntry object) => object.id, + setId: (LogEntry object, int id) { + object.id = id; + }, + objectToFB: (LogEntry object, fb.Builder fbb) { + final notesOffset = + object.notes == null ? null : fbb.writeString(object.notes!); + fbb.startTable(11); + fbb.addInt64(0, object.id); + fbb.addInt64(1, object.time.millisecondsSinceEpoch); + fbb.addInt64(2, object.mgPerDl); + fbb.addFloat64(3, object.mmolPerL); + fbb.addOffset(7, notesOffset); + fbb.addBool(8, object.deleted); + fbb.addFloat64(9, object.glucoseTrend); + fbb.finish(fbb.endTable()); + return object.id; + }, + objectFromFB: (Store store, ByteData fbData) { + final buffer = fb.BufferContext(fbData); + final rootOffset = buffer.derefObject(0); + + final object = LogEntry( + id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), + deleted: const fb.BoolReader() + .vTableGet(buffer, rootOffset, 20, false), + time: DateTime.fromMillisecondsSinceEpoch( + const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)), + mgPerDl: const fb.Int64Reader() + .vTableGetNullable(buffer, rootOffset, 8), + mmolPerL: const fb.Float64Reader() + .vTableGetNullable(buffer, rootOffset, 10), + glucoseTrend: const fb.Float64Reader() + .vTableGetNullable(buffer, rootOffset, 22), + notes: const fb.StringReader(asciiOptimization: true) + .vTableGetNullable(buffer, rootOffset, 18)); + + return object; + }), + LogEvent: EntityDefinition( + model: _entities[5], + toOneRelations: (LogEvent object) => + [object.eventType, object.bolusProfile, object.basalProfile], + toManyRelations: (LogEvent object) => {}, + getId: (LogEvent object) => object.id, + setId: (LogEvent object, int id) { + object.id = id; + }, + objectToFB: (LogEvent object, fb.Builder fbb) { + final notesOffset = + object.notes == null ? null : fbb.writeString(object.notes!); + fbb.startTable(13); + fbb.addInt64(0, object.id); + fbb.addInt64(1, object.time.millisecondsSinceEpoch); + fbb.addInt64(2, object.endTime?.millisecondsSinceEpoch); + fbb.addBool(3, object.hasEndTime); + fbb.addOffset(4, notesOffset); + fbb.addInt64(7, object.eventType.targetId); + fbb.addBool(8, object.deleted); + fbb.addInt64(9, object.bolusProfile.targetId); + fbb.addInt64(10, object.basalProfile.targetId); + fbb.addInt64(11, object.reminderDuration); + fbb.finish(fbb.endTable()); + return object.id; + }, + objectFromFB: (Store store, ByteData fbData) { + final buffer = fb.BufferContext(fbData); + final rootOffset = buffer.derefObject(0); + final endTimeValue = + const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 8); + final object = LogEvent( + id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), + deleted: const fb.BoolReader() + .vTableGet(buffer, rootOffset, 20, false), + time: DateTime.fromMillisecondsSinceEpoch( + const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)), + endTime: endTimeValue == null + ? null + : DateTime.fromMillisecondsSinceEpoch(endTimeValue), + hasEndTime: const fb.BoolReader() + .vTableGet(buffer, rootOffset, 10, false), + reminderDuration: const fb.Int64Reader() + .vTableGetNullable(buffer, rootOffset, 26), + notes: const fb.StringReader(asciiOptimization: true) + .vTableGetNullable(buffer, rootOffset, 12)); + object.eventType.targetId = + const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0); + object.eventType.attach(store); + object.bolusProfile.targetId = + const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0); + object.bolusProfile.attach(store); + object.basalProfile.targetId = + const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0); + object.basalProfile.attach(store); + return object; + }), + LogEventType: EntityDefinition( + model: _entities[6], + toOneRelations: (LogEventType object) => + [object.bolusProfile, object.basalProfile], + toManyRelations: (LogEventType object) => {}, + getId: (LogEventType object) => object.id, + setId: (LogEventType object, int id) { + object.id = id; + }, + objectToFB: (LogEventType object, fb.Builder fbb) { + final valueOffset = fbb.writeString(object.value); + final notesOffset = + object.notes == null ? null : fbb.writeString(object.notes!); + fbb.startTable(9); + fbb.addInt64(0, object.id); + fbb.addOffset(1, valueOffset); + fbb.addBool(2, object.hasEndTime); + fbb.addInt64(3, object.defaultReminderDuration); + fbb.addOffset(4, notesOffset); + fbb.addBool(5, object.deleted); + fbb.addInt64(6, object.bolusProfile.targetId); + fbb.addInt64(7, object.basalProfile.targetId); + fbb.finish(fbb.endTable()); + return object.id; + }, + objectFromFB: (Store store, ByteData fbData) { + final buffer = fb.BufferContext(fbData); + final rootOffset = buffer.derefObject(0); + + final object = LogEventType( + id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), + deleted: const fb.BoolReader() + .vTableGet(buffer, rootOffset, 14, false), + value: const fb.StringReader(asciiOptimization: true) + .vTableGet(buffer, rootOffset, 6, ''), + hasEndTime: + const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false), + defaultReminderDuration: const fb.Int64Reader() + .vTableGetNullable(buffer, rootOffset, 10), + notes: const fb.StringReader(asciiOptimization: true) + .vTableGetNullable(buffer, rootOffset, 12)); object.bolusProfile.targetId = const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0); object.bolusProfile.attach(store); @@ -1303,353 +1487,6 @@ ModelDefinition getObjectBoxModel() { final rootOffset = buffer.derefObject(0); final object = LogMeal( - id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), - deleted: const fb.BoolReader() - .vTableGet(buffer, rootOffset, 36, false), - value: - const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''), - amount: - const fb.Float64Reader().vTableGet(buffer, rootOffset, 38, 0), - carbsRatio: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 8), - portionSize: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 10), - totalCarbs: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 40), - notes: const fb.StringReader() - .vTableGetNullable(buffer, rootOffset, 20)) - ..bolus = const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 14); - object.logEntry.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0); - object.logEntry.attach(store); - object.meal.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0); - object.meal.attach(store); - object.mealSource.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 26, 0); - object.mealSource.attach(store); - object.mealCategory.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 28, 0); - object.mealCategory.attach(store); - object.mealPortionType.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 30, 0); - object.mealPortionType.attach(store); - object.portionSizeAccuracy.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 32, 0); - object.portionSizeAccuracy.attach(store); - object.carbsRatioAccuracy.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 34, 0); - object.carbsRatioAccuracy.attach(store); - return object; - }), - Meal: EntityDefinition( - model: _entities[8], - toOneRelations: (Meal object) => [ - object.mealSource, - object.mealCategory, - object.mealPortionType, - object.portionSizeAccuracy, - object.carbsRatioAccuracy - ], - toManyRelations: (Meal object) => {}, - getId: (Meal object) => object.id, - setId: (Meal object, int id) { - object.id = id; - }, - objectToFB: (Meal object, fb.Builder fbb) { - final valueOffset = fbb.writeString(object.value); - final notesOffset = - object.notes == null ? null : fbb.writeString(object.notes!); - fbb.startTable(16); - fbb.addInt64(0, object.id); - fbb.addOffset(1, valueOffset); - fbb.addFloat64(2, object.carbsRatio); - fbb.addFloat64(3, object.portionSize); - fbb.addFloat64(4, object.carbsPerPortion); - fbb.addInt64(5, object.delayedBolusDuration); - fbb.addOffset(7, notesOffset); - fbb.addInt64(8, object.mealSource.targetId); - fbb.addInt64(9, object.mealCategory.targetId); - fbb.addInt64(10, object.mealPortionType.targetId); - fbb.addInt64(11, object.portionSizeAccuracy.targetId); - fbb.addInt64(12, object.carbsRatioAccuracy.targetId); - fbb.addBool(13, object.deleted); - fbb.addFloat64(14, object.delayedBolusPercentage); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - - final object = Meal( - id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), - deleted: const fb.BoolReader() - .vTableGet(buffer, rootOffset, 30, false), - value: - const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''), - carbsRatio: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 8), - portionSize: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 10), - carbsPerPortion: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 12), - delayedBolusDuration: const fb.Int64Reader() - .vTableGetNullable(buffer, rootOffset, 14), - delayedBolusPercentage: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 32), - notes: const fb.StringReader() - .vTableGetNullable(buffer, rootOffset, 18)); - object.mealSource.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 20, 0); - object.mealSource.attach(store); - object.mealCategory.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0); - object.mealCategory.attach(store); - object.mealPortionType.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0); - object.mealPortionType.attach(store); - object.portionSizeAccuracy.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 26, 0); - object.portionSizeAccuracy.attach(store); - object.carbsRatioAccuracy.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 28, 0); - object.carbsRatioAccuracy.attach(store); - return object; - }), - BolusProfile: EntityDefinition( - model: _entities[3], - toOneRelations: (BolusProfile object) => [], - toManyRelations: (BolusProfile object) => {}, - getId: (BolusProfile object) => object.id, - setId: (BolusProfile object, int id) { - object.id = id; - }, - objectToFB: (MealCategory object, fb.Builder fbb) { - final valueOffset = fbb.writeString(object.value); - final notesOffset = - object.notes == null ? null : fbb.writeString(object.notes!); - fbb.startTable(6); - fbb.addInt64(0, object.id); - fbb.addOffset(1, nameOffset); - fbb.addBool(2, object.active); - fbb.addOffset(3, notesOffset); - fbb.addBool(4, object.deleted); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - - final object = MealCategory( - id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), - deleted: const fb.BoolReader() - .vTableGet(buffer, rootOffset, 12, false), - name: const fb.StringReader(asciiOptimization: true) - .vTableGet(buffer, rootOffset, 6, ''), - active: - const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false), - notes: const fb.StringReader(asciiOptimization: true) - .vTableGetNullable(buffer, rootOffset, 10)); - - return object; - }), - LogEntry: EntityDefinition( - model: _entities[4], - toOneRelations: (LogEntry object) => [], - toManyRelations: (LogEntry object) => {}, - getId: (LogEntry object) => object.id, - setId: (LogEntry object, int id) { - object.id = id; - }, - objectToFB: (MealPortionType object, fb.Builder fbb) { - final valueOffset = fbb.writeString(object.value); - final notesOffset = - object.notes == null ? null : fbb.writeString(object.notes!); - fbb.startTable(11); - fbb.addInt64(0, object.id); - fbb.addInt64(1, object.time.millisecondsSinceEpoch); - fbb.addInt64(2, object.mgPerDl); - fbb.addFloat64(3, object.mmolPerL); - fbb.addOffset(7, notesOffset); - fbb.addBool(8, object.deleted); - fbb.addFloat64(9, object.glucoseTrend); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - - final object = MealPortionType( - id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), - deleted: const fb.BoolReader() - .vTableGet(buffer, rootOffset, 20, false), - time: DateTime.fromMillisecondsSinceEpoch( - const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)), - mgPerDl: const fb.Int64Reader() - .vTableGetNullable(buffer, rootOffset, 8), - mmolPerL: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 10), - glucoseTrend: const fb.Float64Reader() - .vTableGetNullable(buffer, rootOffset, 22), - notes: const fb.StringReader(asciiOptimization: true) - .vTableGetNullable(buffer, rootOffset, 18)); - - return object; - }), - LogEvent: EntityDefinition( - model: _entities[5], - toOneRelations: (LogEvent object) => - [object.eventType, object.bolusProfile, object.basalProfile], - toManyRelations: (LogEvent object) => {}, - getId: (LogEvent object) => object.id, - setId: (LogEvent object, int id) { - object.id = id; - }, - objectToFB: (MealSource object, fb.Builder fbb) { - final valueOffset = fbb.writeString(object.value); - final notesOffset = - object.notes == null ? null : fbb.writeString(object.notes!); - fbb.startTable(13); - fbb.addInt64(0, object.id); - fbb.addInt64(1, object.time.millisecondsSinceEpoch); - fbb.addInt64(2, object.endTime?.millisecondsSinceEpoch); - fbb.addBool(3, object.hasEndTime); - fbb.addOffset(4, notesOffset); - fbb.addInt64(7, object.eventType.targetId); - fbb.addBool(8, object.deleted); - fbb.addInt64(9, object.bolusProfile.targetId); - fbb.addInt64(10, object.basalProfile.targetId); - fbb.addInt64(11, object.reminderDuration); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - - final object = MealSource( - id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), - deleted: const fb.BoolReader() - .vTableGet(buffer, rootOffset, 20, false), - time: DateTime.fromMillisecondsSinceEpoch( - const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)), - endTime: endTimeValue == null - ? null - : DateTime.fromMillisecondsSinceEpoch(endTimeValue), - hasEndTime: const fb.BoolReader() - .vTableGet(buffer, rootOffset, 10, false), - reminderDuration: const fb.Int64Reader() - .vTableGetNullable(buffer, rootOffset, 26), - notes: const fb.StringReader(asciiOptimization: true) - .vTableGetNullable(buffer, rootOffset, 12)); - object.eventType.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0); - object.eventType.attach(store); - object.bolusProfile.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0); - object.bolusProfile.attach(store); - object.basalProfile.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0); - object.basalProfile.attach(store); - return object; - }), - LogEventType: EntityDefinition( - model: _entities[6], - toOneRelations: (LogEventType object) => - [object.bolusProfile, object.basalProfile], - toManyRelations: (LogEventType object) => {}, - getId: (LogEventType object) => object.id, - setId: (LogEventType object, int id) { - object.id = id; - }, - objectToFB: (LogBolus object, fb.Builder fbb) { - final notesOffset = - object.notes == null ? null : fbb.writeString(object.notes!); - fbb.startTable(9); - fbb.addInt64(0, object.id); - fbb.addOffset(1, valueOffset); - fbb.addBool(2, object.hasEndTime); - fbb.addInt64(3, object.defaultReminderDuration); - fbb.addOffset(4, notesOffset); - fbb.addBool(5, object.deleted); - fbb.addInt64(6, object.bolusProfile.targetId); - fbb.addInt64(7, object.basalProfile.targetId); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - - final object = LogBolus( - id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), - deleted: const fb.BoolReader() - .vTableGet(buffer, rootOffset, 14, false), - value: const fb.StringReader(asciiOptimization: true) - .vTableGet(buffer, rootOffset, 6, ''), - hasEndTime: - const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false), - defaultReminderDuration: const fb.Int64Reader() - .vTableGetNullable(buffer, rootOffset, 10), - notes: const fb.StringReader(asciiOptimization: true) - .vTableGetNullable(buffer, rootOffset, 12)); - object.bolusProfile.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0); - object.bolusProfile.attach(store); - object.basalProfile.targetId = - const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0); - object.basalProfile.attach(store); - return object; - }), - LogMeal: EntityDefinition( - model: _entities[7], - toOneRelations: (LogMeal object) => [ - object.logEntry, - object.meal, - object.mealSource, - object.mealCategory, - object.mealPortionType, - object.portionSizeAccuracy, - object.carbsRatioAccuracy - ], - toManyRelations: (LogMeal object) => {}, - getId: (LogMeal object) => object.id, - setId: (LogMeal object, int id) { - object.id = id; - }, - objectToFB: (Accuracy object, fb.Builder fbb) { - final valueOffset = fbb.writeString(object.value); - final notesOffset = - object.notes == null ? null : fbb.writeString(object.notes!); - fbb.startTable(20); - fbb.addInt64(0, object.id); - fbb.addOffset(1, valueOffset); - fbb.addFloat64(2, object.carbsRatio); - fbb.addFloat64(3, object.portionSize); - fbb.addFloat64(5, object.bolus); - fbb.addOffset(8, notesOffset); - fbb.addInt64(9, object.logEntry.targetId); - fbb.addInt64(10, object.meal.targetId); - fbb.addInt64(11, object.mealSource.targetId); - fbb.addInt64(12, object.mealCategory.targetId); - fbb.addInt64(13, object.mealPortionType.targetId); - fbb.addInt64(14, object.portionSizeAccuracy.targetId); - fbb.addInt64(15, object.carbsRatioAccuracy.targetId); - fbb.addBool(16, object.deleted); - fbb.addFloat64(17, object.amount); - fbb.addFloat64(18, object.totalCarbs); - fbb.finish(fbb.endTable()); - return object.id; - }, - objectFromFB: (Store store, ByteData fbData) { - final buffer = fb.BufferContext(fbData); - final rootOffset = buffer.derefObject(0); - - final object = Accuracy( id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0), deleted: const fb.BoolReader() .vTableGet(buffer, rootOffset, 36, false), diff --git a/pubspec.lock b/pubspec.lock index 4092a88..b861133 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -249,6 +249,11 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" frontend_server_client: dependency: transitive description: @@ -270,6 +275,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.4" http_multi_server: dependency: transitive description: