aboutsummaryrefslogtreecommitdiff
path: root/lib/main.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/main.dart')
-rw-r--r--lib/main.dart16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/main.dart b/lib/main.dart
index 9397dc9..64db33a 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,3 +1,4 @@
+import 'dart:async';
import 'package:flutter/material.dart';
import 'pages/Home.dart';
@@ -8,17 +9,24 @@ void main() {
}
class MyApp extends StatelessWidget {
+ final Stream<DateTime> time$ = Stream.periodic(Duration(seconds: 1), (_x) => DateTime.now()).asBroadcastStream();
+
+ @override
+ void dispose() {
+ time$.drain();
+ }
+
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
- title: 'Flutter Demo',
+ title: 'owyn launcher',
home: Scaffold(
body: PageView(
- controller: PageViewController(),
+ controller: PageController(),
children: [
- HomeView(),
- AppView(),
+ HomeView(time$: time$),
+ AppsView(),
],
),
),