aboutsummaryrefslogtreecommitdiff
path: root/lib/main.dart
blob: 64db33ac0484ddc41febbe828ecbd974f5da32be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import 'dart:async';
import 'package:flutter/material.dart';

import 'pages/Home.dart';
import 'pages/Apps.dart';

void main() {
  runApp(MyApp());
}

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: 'owyn launcher',
      home: Scaffold(
          body: PageView(
              controller: PageController(),
              children: [
                HomeView(time$: time$),
                AppsView(),
              ],
          ),
      ),
    );
  }
}