Skip to content

Commit

Permalink
fix stop session dialog wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
waozixyz committed Nov 24, 2023
1 parent 75be5cb commit 9de705b
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions lib/widgets/stop_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,41 +56,42 @@ class _StopSessionButtonState extends State<StopSessionButton> {
}

void _showExitConfirmationDialog(BuildContext context) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Stop Session'),
content: Text('Are you sure you want to end the session?'),
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
OutlinedButton(
onPressed: () {
_navigateToResults();
},
style: OutlinedButton.styleFrom(
side: BorderSide(color: Colors.red),
),
child: Text(
'Stop Session',
style: TextStyle(color: Colors.red),
),
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Stop Session'),
content: Text('Are you sure you want to end the session?'),
actions: <Widget>[
Wrap(
alignment: WrapAlignment.center,
spacing: 8.0,
children: [
OutlinedButton(
onPressed: () {
_navigateToResults();
},
style: OutlinedButton.styleFrom(
side: BorderSide(color: Colors.red),
),
OutlinedButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text('Continue Session'),
child: Text(
'Stop Session',
style: TextStyle(color: Colors.red),
),
],
),
],
);
},
);
}
),
OutlinedButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text('Continue Session'),
),
],
),
],
);
},
);
}

@override
Widget build(BuildContext context) {
Expand Down

0 comments on commit 9de705b

Please sign in to comment.