import 'package:flutter/material.dart'; import 'package:openlp_remote/widgets/show_alert_dialog.dart'; import 'display_options_bottom_sheet.dart'; class _Action { IconData icon; String title; VoidCallback callback; _Action(this.icon, this.title, this.callback); } class AppBottomNavigationBar extends StatelessWidget { @override Widget build(BuildContext context) { final List<_Action> _actions = [ _Action(Icons.add_alert, 'Alert', () { showDialog( context: context, builder: (context) => ShowAlertDialog(), ); }), _Action(Icons.personal_video, 'Display', () { showDialog( context: context, builder: (context) => DisplayOptionsDialog(), ); }), ]; return BottomAppBar( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: _actions .map((action) => IconButton( icon: Icon(action.icon), onPressed: action.callback, tooltip: action.title, color: Theme.of(context).accentColor, )) .toList(), ), ); } }