Skip to content
Snippets Groups Projects
Commit d679e89e authored by Maximilian Betz's avatar Maximilian Betz
Browse files

added data model for event events and eventtypes

parent b588e227
No related branches found
No related tags found
No related merge requests found
class Event{
final int id;
final String urn;
final String label;
final String type;
final String description;
final String status;
Event({
required this.id,
required this.urn,
required this.label,
required this.type,
required this.description,
required this.status
});
}
class EventType{
final String name;
final int id;
EventType({
required this.name,
required this.id
});
}
\ No newline at end of file
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'data_model.dart';
void main() {
runApp(MaterialApp(
......@@ -81,85 +82,88 @@ class AddEvent extends StatelessWidget {
}
class ViewEvents extends StatelessWidget {
List<Event> events = []
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
..add(Event(id: 8311, urn: 'station:neumayer_iii:awi_snow_sampler_1', label: 'SML_KO21_SC01', type: 'Deployment', description: 'Remi tool Tag1 1 Traverse', status: 'PENDING'))
;
String testString ='blabalala';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("View Added Events"),
),
body: InteractiveViewer(
minScale: 0.1,
child: DataTable(
columns: const <DataColumn>[
DataColumn(
label: Text(
'URN',
style: TextStyle(fontStyle: FontStyle.italic),
body: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: DataTable(
columns: const <DataColumn>[
DataColumn(
label: Text(
'Id',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Text(
'Label',
style: TextStyle(fontStyle: FontStyle.italic),
DataColumn(
label: Text(
'URN',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Text(
'Type',
style: TextStyle(fontStyle: FontStyle.italic),
DataColumn(
label: Text(
'Label',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Text(
'Description',
style: TextStyle(fontStyle: FontStyle.italic),
DataColumn(
label: Text(
'Type',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Text(
'Status',
style: TextStyle(fontStyle: FontStyle.italic),
DataColumn(
label: Text(
'Description',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
],
rows: const <DataRow>[
DataRow(
cells: <DataCell>[
DataCell(Text('station:neumayer_iii:awi_snow_sampler_1')),
DataCell(Text('SML_KO21_SC01')),
DataCell(Text('Deployment')),
DataCell(Text('Remi tool Tag1 1 Traverse')),
DataCell(Text('PENDING')),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('radar_system:awi_pres_1')),
DataCell(Text('MP_A_01+100m')),
DataCell(Text('Information')),
DataCell(Text('100 m NNW of MP_A_01 3 metal bars 2 m wide 20 cm apart 30 cm deep')),
DataCell(Text('EXPORTED')),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('radar_system:awi_pres_1')),
DataCell(Text('MP_A_01')),
DataCell(Text('Deployment')),
DataCell(Text('position 2,35 m south of point midway TX RX')),
DataCell(Text('EXPORTED')),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('station:neumayer_iii:level_measure_1')),
DataCell(Text('1')),
DataCell(Text('Information')),
DataCell(Text('Test measurements of snow deposition in cm follow')),
DataCell(Text('PENDING')),
],
),
],
DataColumn(
label: Text(
'Status',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
],
rows: <DataRow>[
for (var event in events) DataRow(
cells: <DataCell>[
DataCell(Text(event.id.toString())),
DataCell(Text(event.urn)),
DataCell(Text(event.label)),
DataCell(Text(event.type)),
DataCell(Text(event.description)),
DataCell(Text(event.status)),
],
),
],
),
),
),
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment