loris/lib/pages/notifications/notifications.dart

25 lines
694 B
Dart
Raw Normal View History

2022-07-02 22:03:10 +00:00
import 'package:flutter/material.dart';
2022-08-15 18:31:44 +00:00
import '../../business_logic/websocket.dart' as websocket;
2022-07-02 22:03:10 +00:00
2022-08-15 18:31:44 +00:00
class Notifications extends StatefulWidget {
const Notifications({Key? key}) : super(key: key);
@override
State<Notifications> createState() => _NotificationsState();
}
class _NotificationsState extends State<Notifications> {
List<Widget> notifs = [];
List subscriptions = [];
@override
Widget build(BuildContext context) {
for (int i = 0; i < websocket.map.length; i++) {
final keyI = websocket.map.keys.toList()[i];
subscriptions.add(websocket.map[keyI]!["home"]!.stream.listen((event) {
print(event);
}));
}
return Text("Notifs");
}
2022-07-02 22:03:10 +00:00
}