Skip to content

Commit e70ba9f

Browse files
Kevin WebbKevin Webb
authored andcommitted
fix turf mod bug and migrate sync to service
1 parent 61952a0 commit e70ba9f

File tree

13 files changed

+355
-266
lines changed

13 files changed

+355
-266
lines changed

ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ PODS:
3131
- MTBBarcodeScanner
3232
- shared_preferences (0.0.1):
3333
- Flutter
34-
- sqflite (0.0.1):
34+
- sqflite (0.0.2):
3535
- Flutter
36-
- FMDB (~> 2.7.2)
36+
- FMDB (>= 2.7.5)
3737

3838
DEPENDENCIES:
3939
- camera (from `.symlinks/plugins/camera/ios`)
@@ -90,7 +90,7 @@ SPEC CHECKSUMS:
9090
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
9191
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
9292
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
93-
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
93+
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
9494

9595
PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa
9696

lib/database/database.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ class FeatureTypes extends Table {
8888
TextColumn get projectId => text()();
8989
TextColumn get geometryType => text()(); // 'point' or 'line'
9090
TextColumn get color => text()(); // string of color hex code
91-
TextColumn get name => text()(); // label to be displayed in app
9291
TextColumn get label => text()(); // label to be displayed in app
92+
TextColumn get value => text()(); // value to use in export feed
9393

9494
@override
9595
Set<Column> get primaryKey => {id};
@@ -199,7 +199,7 @@ class CurbWheelDatabase extends _$CurbWheelDatabase {
199199
geometryType: surveyItem.feature.geometryType,
200200
featureId: surveyItem.feature.id,
201201
color: surveyItem.feature.color,
202-
name: surveyItem.feature.name,
202+
name: surveyItem.feature.label,
203203
span: span[0],
204204
points: points);
205205
return listItem;
@@ -210,7 +210,7 @@ class CurbWheelDatabase extends _$CurbWheelDatabase {
210210
geometryType: surveyItem.feature.geometryType,
211211
featureId: surveyItem.feature.id,
212212
color: surveyItem.feature.color,
213-
name: surveyItem.feature.name,
213+
name: surveyItem.feature.label,
214214
points: points);
215215
return listItem;
216216
}

lib/database/database.g.dart

Lines changed: 52 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/database/survey_span_dao.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class SurveySpanDao extends DatabaseAccessor<CurbWheelDatabase>
1616
(select(surveySpans)..where((s) => s.id.equals(id))).getSingle();
1717

1818
Future<List<SurveySpan>> getSpansBySurveyItemId(String surveyItemId) =>
19-
select(surveySpans).get();
19+
(select(surveySpans)..where((s) => s.surveyItemId.equals(surveyItemId)))
20+
.get();
2021

2122
Future insertSpan(SurveySpansCompanion surveySpan) =>
2223
into(surveySpans).insert(surveySpan);

lib/main.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:curbwheel/service/sync.dart';
12
import 'package:curbwheel/ui/camera/camera_screen.dart';
23
import 'package:curbwheel/ui/camera/gallery_screen.dart';
34
import 'package:curbwheel/ui/camera/image_view_screen.dart';
@@ -18,6 +19,8 @@ import 'database/database.dart';
1819
void main() => runApp(MultiProvider(providers: [
1920
Provider<CurbWheelDatabase>(create: (_) => CurbWheelDatabase()),
2021
Provider<ProjectMapDatastores>(create: (_) => ProjectMapDatastores()),
22+
ChangeNotifierProvider(
23+
create: (BuildContext context) => ProjectSyncService(context)),
2124
ChangeNotifierProvider(create: (BuildContext context) => BleConnection()),
2225
ChangeNotifierProxyProvider<BleConnection, WheelCounter>(
2326
create: (BuildContext context) => WheelCounter(),

0 commit comments

Comments
 (0)