From 0692db03e155054c8732da49eefba44d9c7ea549 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 11 Jan 2026 19:56:21 +0100 Subject: Fix indentation --- lib/data.dart | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'lib') 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 contacts = [ - 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; - - AppState() { - _timer = Timer.periodic(const Duration(seconds: 1), (_) { - toggleFirstContact(); - }); + List contacts = [ + 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; + + AppState() { + _timer = Timer.periodic(const Duration(seconds: 1), (_) { + toggleFirstContact(); + }); + } + + void toggleFirstContact() { + if (contacts.isEmpty) { + return; } - void toggleFirstContact() { - if (contacts.isEmpty) { - return; - } + contacts[0].isOpen = !contacts[0].isOpen; + notifyListeners(); + } - contacts[0].isOpen = !contacts[0].isOpen; - notifyListeners(); - } - - @override - void dispose() { - _timer?.cancel(); - super.dispose(); - } + @override + void dispose() { + _timer?.cancel(); + super.dispose(); + } } class Contact { -- cgit v1.2.3-70-g09d2