made snackbars centered for better appearance
This commit is contained in:
@@ -295,7 +295,10 @@ class _DayTimePickerState extends State<DayTimePicker> {
|
|||||||
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(
|
const SnackBar(
|
||||||
content: Text('A schedule already exists at this time for this blind'),
|
content: Text(
|
||||||
|
'A schedule already exists at this time for this blind',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
backgroundColor: Colors.orange,
|
backgroundColor: Colors.orange,
|
||||||
duration: Duration(seconds: 4),
|
duration: Duration(seconds: 4),
|
||||||
)
|
)
|
||||||
@@ -312,7 +315,10 @@ class _DayTimePickerState extends State<DayTimePicker> {
|
|||||||
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(widget.isEditing ? 'Schedule updated successfully' : 'Schedule added successfully'),
|
content: Text(
|
||||||
|
widget.isEditing ? 'Schedule updated successfully' : 'Schedule added successfully',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -132,7 +132,10 @@ class _SchedulesScreenState extends State<SchedulesScreen> {
|
|||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(
|
const SnackBar(
|
||||||
content: Text('Schedule deleted successfully'),
|
content: Text(
|
||||||
|
'Schedule deleted successfully',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user