mirror of
https://gitlab.com/openlp/openlp-mobile-remote.git
synced 2024-12-22 20:02:53 +00:00
routes + some structure improvements
This commit is contained in:
parent
8eeb37c28c
commit
e48f4b5686
@ -1,5 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'src/openlp_remote_app.dart';
|
||||
import 'src/app_theme.dart';
|
||||
import 'src/widgets/settings.dart';
|
||||
|
||||
void main() => runApp(OpenLPRemoteApp());
|
||||
void main() => runApp(
|
||||
MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: appTheme,
|
||||
routes: <String, WidgetBuilder>{
|
||||
'/': (context) => OpenLPRemoteApp(),
|
||||
'/settings': (context) => Settings(),
|
||||
},
|
||||
),
|
||||
);
|
||||
|
@ -1,7 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'app_theme.dart';
|
||||
|
||||
import 'widgets/bottom_navigation_bar.dart';
|
||||
import 'widgets/search_floating_button.dart';
|
||||
import 'widgets/service_listview.dart';
|
||||
@ -24,38 +22,36 @@ class _OpenLPRemoteAppState extends State<OpenLPRemoteApp>
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: appTheme,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('OpenLP Remote'),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.settings),
|
||||
onPressed: () {},
|
||||
tooltip: 'Settings',
|
||||
),
|
||||
],
|
||||
bottom: TabBar(
|
||||
tabs: <Widget>[
|
||||
Tab(text: 'SERVICE'),
|
||||
Tab(text: 'SLIDES'),
|
||||
],
|
||||
controller: tabController,
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('OpenLP Remote'),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.settings),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushNamed('/settings');
|
||||
},
|
||||
tooltip: 'Settings',
|
||||
),
|
||||
),
|
||||
body: TabBarView(
|
||||
controller: tabController,
|
||||
children: <Widget>[
|
||||
ServiceListView(),
|
||||
SlideListView(),
|
||||
],
|
||||
bottom: TabBar(
|
||||
tabs: <Widget>[
|
||||
Tab(text: 'SERVICE'),
|
||||
Tab(text: 'SLIDES'),
|
||||
],
|
||||
controller: tabController,
|
||||
),
|
||||
floatingActionButton: SearchFloatingButton(),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
bottomNavigationBar: AppBottomNavigationBar(),
|
||||
),
|
||||
body: TabBarView(
|
||||
controller: tabController,
|
||||
children: <Widget>[
|
||||
ServiceListView(),
|
||||
SlideListView(),
|
||||
],
|
||||
),
|
||||
floatingActionButton: SearchFloatingButton(),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
bottomNavigationBar: AppBottomNavigationBar(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
20
lib/src/widgets/settings.dart
Normal file
20
lib/src/widgets/settings.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Settings extends StatefulWidget {
|
||||
@override
|
||||
State<StatefulWidget> createState() => _SettingState();
|
||||
|
||||
}
|
||||
|
||||
class _SettingState extends State<Settings> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Settings'),
|
||||
),
|
||||
body: Container(),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user