Add view to show measured point in a list
This commit is contained in:
@@ -29,6 +29,7 @@ import 'package:terepi_seged/models/point_to_measure.dart';
|
||||
import 'package:terepi_seged/models/point_with_description_model.dart';
|
||||
import 'package:proj4dart/proj4dart.dart' as proj4;
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:terepi_seged/pages/map_survey/presentations/views/measured_points_table_dialog.dart';
|
||||
|
||||
class MapSurveyController extends GetxController {
|
||||
// String gpsAddress = "E8:31:CD:14:8B:B2";
|
||||
@@ -59,6 +60,8 @@ class MapSurveyController extends GetxController {
|
||||
DateTime.now().add(const Duration(seconds: -30));
|
||||
|
||||
NumberFormat formatEov = NumberFormat("##0,000.0", "hu-HU");
|
||||
NumberFormat formatEovZ = NumberFormat("###0.0", "hu-HU");
|
||||
NumberFormat formatAltitudeError = NumberFormat("####0.000", "hu-HU");
|
||||
NumberFormat formatEovForFile = NumberFormat("#####0.0", "hu-HU");
|
||||
NumberFormat formatWgs84Sec = NumberFormat('00.000', 'hu-HU');
|
||||
|
||||
@@ -111,6 +114,8 @@ class MapSurveyController extends GetxController {
|
||||
Rx<bool> isShowPassword = false.obs;
|
||||
final passwordFieldFocusNode = FocusNode();
|
||||
|
||||
List? measuredPoints;
|
||||
|
||||
List<PointWithDescription> pointWithDescriptionList = [];
|
||||
late Directory? directory;
|
||||
late File dataFile;
|
||||
@@ -786,7 +791,9 @@ class MapSurveyController extends GetxController {
|
||||
'horizontalError':
|
||||
max(gpsLatitudeError.value, gpsLongitudeError.value),
|
||||
'verticalError': gpsAltitudeError.value,
|
||||
'description': pointDescriptionController.text
|
||||
'description': pointDescriptionController.text,
|
||||
'isDeleted': false,
|
||||
'projectId': 2
|
||||
});
|
||||
|
||||
await Supabase.instance.client
|
||||
@@ -850,4 +857,20 @@ class MapSurveyController extends GetxController {
|
||||
if (passwordFieldFocusNode.hasPrimaryFocus) return;
|
||||
passwordFieldFocusNode.canRequestFocus = false;
|
||||
}
|
||||
|
||||
void showMeasuredPointsTableDialog() {
|
||||
Get.to(() => MeasuredPointsTableDialog(), transition: Transition.fadeIn);
|
||||
}
|
||||
|
||||
Future<List> readMeasuredPoints() async {
|
||||
var response = await Supabase.instance.client
|
||||
.from('TerepiSeged_MeasuredPoints')
|
||||
.select()
|
||||
.eq('projectId', 2)
|
||||
.order('created_at');
|
||||
|
||||
print(response);
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user