diff --git a/lib/src/models/service_item.dart b/lib/src/models/service_item.dart index a22dd09..e00ed78 100644 --- a/lib/src/models/service_item.dart +++ b/lib/src/models/service_item.dart @@ -27,8 +27,9 @@ class ServiceItem { final Plugin plugin; bool selected; final String title; + String notes; - ServiceItem({this.id, String plugin, this.selected, this.title}) + ServiceItem({this.id, String plugin, this.selected, this.title, this.notes}) : plugin = Plugin(plugin); ServiceItem.fromJson(Map json) diff --git a/lib/src/screens/service_list_view.dart b/lib/src/screens/service_list_view.dart index dfd6f81..fcd0226 100644 --- a/lib/src/screens/service_list_view.dart +++ b/lib/src/screens/service_list_view.dart @@ -36,20 +36,44 @@ class _ServiceListViewState extends State { @override void initState() { serviceItems = [ - ServiceItem(id: '1', plugin: 'songs', selected: true, title: 'Oceans'), ServiceItem( - id: '2', plugin: 'bibles', selected: false, title: 'John 3:16'), + id: '1', + plugin: 'songs', + selected: true, + title: 'Oceans', + notes: 'First music before the presentation.', + ), ServiceItem( - id: '3', - plugin: 'presentations', - selected: false, - title: 'Sunday service.pdf'), + id: '2', + plugin: 'bibles', + selected: false, + title: 'John 3:16', + notes: 'This is the item notes.', + ), ServiceItem( - id: '4', plugin: 'images', selected: false, title: 'Slogan.jpg'), + id: '3', + plugin: 'presentations', + selected: false, + title: 'Sunday service.pdf', + ), ServiceItem( - id: '5', plugin: 'media', selected: false, title: 'Video.mp4'), + id: '4', + plugin: 'images', + selected: false, + title: 'Slogan.jpg', + ), ServiceItem( - id: '6', plugin: 'custom', selected: false, title: 'Custom alert'), + id: '5', + plugin: 'media', + selected: false, + title: 'Video.mp4', + ), + ServiceItem( + id: '6', + plugin: 'custom', + selected: false, + title: 'Custom alert', + ), ]; // serviceItems = []; super.initState(); @@ -89,8 +113,8 @@ class _ServiceListViewState extends State { ), ), title: Text(item.title), - subtitle: Text(AppLocalizations.of(context) - .translate('plugin_${item.plugin.id}_singular')), + subtitle: + item.notes != null && item.notes != "" ? Text(item.notes) : null, trailing: IconButton( icon: Icon(Icons.delete), onPressed: () {},