Merge
This commit is contained in:
1 parent
880cdd65ff
commit
8586a23bfa
19 files changed
+179
-220
No files matched your search
@@ -1,16 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:stadtbote/content_views/utils/content_view_widget.dart';
|
||||
import 'package:stadtbote/content_views/utils/header_info.dart';
|
||||
import 'package:stadtbote/model/ranking.dart';
|
||||
import 'package:stadtbote/popups/tasks_popups/zip_popup.dart';
|
||||
import 'package:stadtbote/protocoll_messages/zip_message.dart';
|
||||
//import 'package:stadtbote/model/ranking.dart';
|
||||
import 'package:stadtbote/tools/constants.dart';
|
||||
import 'package:stadtbote/tools/message_service.dart';
|
||||
import 'package:stadtbote/tools/messages/ranking_updated.dart';
|
||||
import 'package:stadtbote/tools/mqtt_core.dart';
|
||||
|
||||
import '../main.dart';
|
||||
import '../tools/util.dart';
|
||||
|
||||
enum ModeEnum {
|
||||
@@ -44,7 +38,7 @@ class ApproachAreaPage extends ContentViewWidget {
|
||||
}
|
||||
|
||||
class _ApproachAreaPageState extends State<ApproachAreaPage> {
|
||||
late Ranking? _ranking;
|
||||
//late Ranking? _ranking;
|
||||
|
||||
late bool _initCompleted = false;
|
||||
|
||||
@@ -53,7 +47,7 @@ class _ApproachAreaPageState extends State<ApproachAreaPage> {
|
||||
super.initState();
|
||||
|
||||
Future.delayed(const Duration(seconds: 0), () async {
|
||||
_ranking = await MyApp.isarInstance.rankings.where().findFirst();
|
||||
//_ranking = await MyApp.isarInstance.rankings.where().findFirst();
|
||||
|
||||
_initCompleted = true;
|
||||
|
||||
@@ -94,7 +88,7 @@ class _ApproachAreaPageState extends State<ApproachAreaPage> {
|
||||
List<Widget> _fillColumns() {
|
||||
List<Widget> columns = [];
|
||||
|
||||
if (_ranking != null) {
|
||||
/*if (_ranking != null) {
|
||||
for (int i = 0; i < _ranking!.ranks.length; i++) {
|
||||
var rank = _ranking!.ranks[i];
|
||||
|
||||
@@ -171,12 +165,12 @@ class _ApproachAreaPageState extends State<ApproachAreaPage> {
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return columns;
|
||||
}
|
||||
|
||||
_sendZip(Rank rank, String zip, ModeEnum mode) {
|
||||
/*_sendZip(Rank rank, String zip, ModeEnum mode) {
|
||||
var zipMessage = ZipMessage();
|
||||
|
||||
if (mode == ModeEnum.set) {
|
||||
@@ -200,13 +194,13 @@ class _ApproachAreaPageState extends State<ApproachAreaPage> {
|
||||
}
|
||||
|
||||
MqttCore.instance.publishPayloadMessage("rank", zipMessage.toJson());
|
||||
}
|
||||
}*/
|
||||
|
||||
_initMessages() {
|
||||
MessageService().subscribe<RankingUpdated>(Constants.messageTopicRankingUpdated, this, (rankingUpdateMessage) async {
|
||||
/*MessageService().subscribe<RankingUpdated>(Constants.messageTopicRankingUpdated, this, (rankingUpdateMessage) async {
|
||||
_ranking = await MyApp.isarInstance.rankings.where().findFirst();
|
||||
|
||||
setState(() {});
|
||||
});
|
||||
});*/
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user