mirror of
https://gitlab.com/openlp/openlp-mobile-remote.git
synced 2024-12-22 20:02:53 +00:00
63 lines
1.6 KiB
Dart
63 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'app_theme.dart';
|
|
|
|
import 'widgets/bottom_navigation_bar.dart';
|
|
import 'widgets/search_floating_button.dart';
|
|
|
|
class OpenLPRemoteApp extends StatefulWidget {
|
|
@override
|
|
_OpenLPRemoteAppState createState() => _OpenLPRemoteAppState();
|
|
}
|
|
|
|
class _OpenLPRemoteAppState extends State<OpenLPRemoteApp>
|
|
with SingleTickerProviderStateMixin {
|
|
TabController tabController;
|
|
SearchFloatingButton searchActionButton;
|
|
int tabBarIndex;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
tabBarIndex = 0;
|
|
tabController =
|
|
TabController(length: 2, vsync: this, initialIndex: tabBarIndex);
|
|
searchActionButton = SearchFloatingButton();
|
|
}
|
|
|
|
@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,
|
|
onTap: (index) {
|
|
setState(() {
|
|
tabBarIndex = index;
|
|
});
|
|
},
|
|
),
|
|
),
|
|
floatingActionButton: searchActionButton,
|
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
|
bottomNavigationBar: AppBottomNavigationBar(),
|
|
),
|
|
);
|
|
}
|
|
}
|