made snackbars centered for better appearance

This commit is contained in:
2026-01-01 12:59:31 -06:00
parent 331d926c2b
commit 4af40a66f5
2 changed files with 12 additions and 3 deletions

View File

@@ -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,
) )
); );

View File

@@ -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,
) )
); );