Erweiterungen
This commit is contained in:
1 parent
fcda77177a
commit
00d320ec8f
4 files changed
+93
-29
No files matched your search
@@ -22,13 +22,13 @@ import '../tools/util.dart';
|
||||
|
||||
class MainPage extends ContentViewWidget {
|
||||
final ValueNotifier<String> _zipValueNotifier = ValueNotifier("----");
|
||||
final ValueNotifier<String> _sidValueNotifier = ValueNotifier("----");
|
||||
final ValueNotifier<String> sidValueNotifier = ValueNotifier("----");
|
||||
|
||||
MainPage({super.key}) {
|
||||
Status? status = MyApp.isarInstance.status.where().findFirstSync();
|
||||
if (status != null) {
|
||||
_zipValueNotifier.value = status.locZip;
|
||||
_sidValueNotifier.value = status.sid;
|
||||
sidValueNotifier.value = status.sid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class MainPage extends ContentViewWidget {
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
ValueListenableBuilder<String>(
|
||||
valueListenable: _sidValueNotifier,
|
||||
valueListenable: sidValueNotifier,
|
||||
builder: (context, value, child) {
|
||||
return Text(
|
||||
value,
|
||||
@@ -244,7 +244,7 @@ class _MainPageState extends State<MainPage> {
|
||||
|
||||
_initMessages() {
|
||||
BroadcastReceiver().subscribe<StatusInfoUpdate>(Constants.messageTopicStatusInfoUpdate, (statusInfoUpdateMessage) {
|
||||
widget._sidValueNotifier.value = statusInfoUpdateMessage.status.sid;
|
||||
widget.sidValueNotifier.value = statusInfoUpdateMessage.status.sid;
|
||||
});
|
||||
|
||||
BroadcastReceiver().subscribe<JobReceivedMessage>(Constants.messageTopicJobReceived, (JobReceivedMessage jobReceivedMessage) {
|
||||
|
||||
Reference in new issue
Block a user