Initialized empty screens
This commit is contained in:
parent
4c06208e82
commit
f2d77e066d
2 changed files with 72 additions and 0 deletions
32
lib/screens/home.dart
Normal file
32
lib/screens/home.dart
Normal 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
40
lib/screens/room.dart
Normal 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)),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue