showBottomSheet method
Implementation
void showBottomSheet(BuildContext context, bool isUnread, dynamic message) {
showModalBottomSheet(
context: context,
builder: (BuildContext context) {
return SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 10.0),
child: Column(
children: [
Center(
child: Container(
margin: EdgeInsets.only(bottom: 14),
width: 50,
height: 4.0,
decoration: BoxDecoration(
color: Theme.of(context).brightness == Brightness.dark
? widget.themeConfig?.darkText ?? Colors.white
: widget.themeConfig?.lightText ?? Colors.black,
borderRadius: BorderRadius.circular(2.0),
),
),
),
if (isUnread)
ListTile(
title: Container(
child: Row(
children: [
Icon(Icons.done_all),
SizedBox(width: 12),
Text('Mark as Read')
],
)),
onTap: () {
handlePopupSelection('markAsRead', message);
Navigator.pop(context);
},
),
ListTile(
title: Container(
child: Row(
children: [
Icon(Icons.delete),
SizedBox(width: 12),
Text('Delete'),
],
)),
onTap: () {
handlePopupSelection('delete', message);
Navigator.pop(context);
},
),
SizedBox(height: 16),
],
),
),
);
},
);
}