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 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'src/openlp_remote_app.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 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'app_theme.dart';
|
|
||||||
|
|
||||||
import 'widgets/bottom_navigation_bar.dart';
|
import 'widgets/bottom_navigation_bar.dart';
|
||||||
import 'widgets/search_floating_button.dart';
|
import 'widgets/search_floating_button.dart';
|
||||||
import 'widgets/service_listview.dart';
|
import 'widgets/service_listview.dart';
|
||||||
@ -24,38 +22,36 @@ class _OpenLPRemoteAppState extends State<OpenLPRemoteApp>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return Scaffold(
|
||||||
debugShowCheckedModeBanner: false,
|
appBar: AppBar(
|
||||||
theme: appTheme,
|
title: Text('OpenLP Remote'),
|
||||||
home: Scaffold(
|
actions: <Widget>[
|
||||||
appBar: AppBar(
|
IconButton(
|
||||||
title: Text('OpenLP Remote'),
|
icon: Icon(Icons.settings),
|
||||||
actions: <Widget>[
|
onPressed: () {
|
||||||
IconButton(
|
Navigator.of(context).pushNamed('/settings');
|
||||||
icon: Icon(Icons.settings),
|
},
|
||||||
onPressed: () {},
|
tooltip: 'Settings',
|
||||||
tooltip: 'Settings',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
bottom: TabBar(
|
|
||||||
tabs: <Widget>[
|
|
||||||
Tab(text: 'SERVICE'),
|
|
||||||
Tab(text: 'SLIDES'),
|
|
||||||
],
|
|
||||||
controller: tabController,
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
body: TabBarView(
|
bottom: TabBar(
|
||||||
controller: tabController,
|
tabs: <Widget>[
|
||||||
children: <Widget>[
|
Tab(text: 'SERVICE'),
|
||||||
ServiceListView(),
|
Tab(text: 'SLIDES'),
|
||||||
SlideListView(),
|
|
||||||
],
|
],
|
||||||
|
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