summaryrefslogtreecommitdiff
path: root/lib/data.dart
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2026-01-11 19:56:21 +0100
committerxengineering <me@xengineering.eu>2026-01-11 19:56:21 +0100
commit0692db03e155054c8732da49eefba44d9c7ea549 (patch)
tree7a5fcf5cce91abfeaddee36b3460995d7229283f /lib/data.dart
parentf8cf9dc0a8b7e67e4c0f7e2d40b0b4ab26a5ed0a (diff)
downloadsia-app-0692db03e155054c8732da49eefba44d9c7ea549.tar
sia-app-0692db03e155054c8732da49eefba44d9c7ea549.tar.zst
sia-app-0692db03e155054c8732da49eefba44d9c7ea549.zip
Fix indentation
Diffstat (limited to 'lib/data.dart')
-rw-r--r--lib/data.dart48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/data.dart b/lib/data.dart
index 4091bb3..93c523d 100644
--- a/lib/data.dart
+++ b/lib/data.dart
@@ -3,35 +3,35 @@ import 'dart:async';
import 'package:flutter/foundation.dart';
class AppState with ChangeNotifier {
- List<Contact> contacts = <Contact>[
- Contact(address: "Living Room Window", isOpen: false),
- Contact(address: "Front Door", isOpen: true),
- Contact(address: "Back Door", isOpen: false),
- Contact(address: "Garage Window", isOpen: true),
- ];
+ List<Contact> contacts = <Contact>[
+ Contact(address: "Living Room Window", isOpen: false),
+ Contact(address: "Front Door", isOpen: true),
+ Contact(address: "Back Door", isOpen: false),
+ Contact(address: "Garage Window", isOpen: true),
+ ];
- Timer? _timer;
+ Timer? _timer;
- AppState() {
- _timer = Timer.periodic(const Duration(seconds: 1), (_) {
- toggleFirstContact();
- });
- }
-
- void toggleFirstContact() {
- if (contacts.isEmpty) {
- return;
- }
+ AppState() {
+ _timer = Timer.periodic(const Duration(seconds: 1), (_) {
+ toggleFirstContact();
+ });
+ }
- contacts[0].isOpen = !contacts[0].isOpen;
- notifyListeners();
+ void toggleFirstContact() {
+ if (contacts.isEmpty) {
+ return;
}
- @override
- void dispose() {
- _timer?.cancel();
- super.dispose();
- }
+ contacts[0].isOpen = !contacts[0].isOpen;
+ notifyListeners();
+ }
+
+ @override
+ void dispose() {
+ _timer?.cancel();
+ super.dispose();
+ }
}
class Contact {