diff options
| author | xengineering <me@xengineering.eu> | 2026-01-03 11:13:05 +0100 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2026-01-03 11:13:05 +0100 |
| commit | a17bb2c1785cd70028c62dcfd21db6b4fcfd06a8 (patch) | |
| tree | d91e6db525be6dad1808722e3df8d00bf02863f5 /lib | |
| parent | b0c43b17d621a5f1fdd69b9fd0e9df6afa3e879f (diff) | |
| download | sia-app-a17bb2c1785cd70028c62dcfd21db6b4fcfd06a8.tar sia-app-a17bb2c1785cd70028c62dcfd21db6b4fcfd06a8.tar.zst sia-app-a17bb2c1785cd70028c62dcfd21db6b4fcfd06a8.zip | |
Make ContactList a StatefulWidget
This is required to change the contact states during runtime.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/main.dart | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/main.dart b/lib/main.dart index 34eab88..db8fcd2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,9 +22,15 @@ class Contact { const Contact({required this.address, required this.isOpen}); } -class ContactList extends StatelessWidget { +class ContactList extends StatefulWidget { const ContactList({super.key}); + @override + State<ContactList> createState() => _ContactListState(); +} + +class _ContactListState extends State<ContactList> { + final List<Contact> contacts = const <Contact>[ Contact(address: "Living Room Window", isOpen: false), Contact(address: "Front Door", isOpen: true), |
