Initialized empty screens

This commit is contained in:
Jakob Meier 2023-03-17 21:08:29 +01:00
parent 4c06208e82
commit f2d77e066d
No known key found for this signature in database
GPG key ID: 66BDC7E6A01A6152
2 changed files with 72 additions and 0 deletions

32
lib/screens/home.dart Normal file
View file

@ -0,0 +1,32 @@
import 'package:flutter/material.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Outbag"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[],
),
),
floatingActionButton: FloatingActionButton.extended(
label: const Text('New'),
icon: const Icon(Icons.add),
onPressed: ()=>{
// TODO: create new room
},
tooltip: 'Create Room',
),
);
}
}

40
lib/screens/room.dart Normal file
View file

@ -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<StatefulWidget> 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)),
);
}
}