From f2d77e066d81d633bb54b8fa097b553e3691a827 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 17 Mar 2023 21:08:29 +0100 Subject: [PATCH] Initialized empty screens --- lib/screens/home.dart | 32 ++++++++++++++++++++++++++++++++ lib/screens/room.dart | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 lib/screens/home.dart create mode 100644 lib/screens/room.dart diff --git a/lib/screens/home.dart b/lib/screens/home.dart new file mode 100644 index 0000000..d8985de --- /dev/null +++ b/lib/screens/home.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +class HomePage extends StatefulWidget { + const HomePage({super.key}); + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("Outbag"), + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [], + ), + ), + floatingActionButton: FloatingActionButton.extended( + label: const Text('New'), + icon: const Icon(Icons.add), + onPressed: ()=>{ + // TODO: create new room + }, + tooltip: 'Create Room', + ), + ); + } +} diff --git a/lib/screens/room.dart b/lib/screens/room.dart new file mode 100644 index 0000000..dd6d7ea --- /dev/null +++ b/lib/screens/room.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; +import 'package:routemaster/routemaster.dart'; + +class RoomPage extends StatefulWidget { + final String server; + final String tag; + final String page; + + const RoomPage(this.server, this.tag, {super.key, this.page="list"}); + + @override + State createState() => _RoomPageState(); +} + +class _RoomPageState extends State { + @override + void initState() { + super.initState(); + // TODO: fetch room data + // from somewhere + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Room name'), + leading: IconButton( + onPressed: () { + Routemaster.of(context).history.back(); + }, + icon: const Icon(Icons.arrow_back), + tooltip: "Go back", + ), + ), + floatingActionButton: FloatingActionButton.extended( + onPressed: () => {}, label: Text('Add'), icon: const Icon(Icons.add)), + ); + } +}