Skip to content

Commit

Permalink
fix: fix BuildContext issues (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse authored Sep 29, 2024
1 parent 55d8740 commit 8a55c09
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ class _AliceCallsListPageState extends State<AliceCallsListPage>
/// Called when save to file has been pressed. It saves data to file.
void _saveToFile() async {
final result = await aliceCore.saveCallsToFile(context);

if (!mounted) return;

if (result.success) {
AliceGeneralDialog.show(
context: context,
Expand Down Expand Up @@ -309,7 +312,7 @@ class _AliceCallsListPageState extends State<AliceCallsListPage>
Future<void> _onSortPressed() async {
AliceSortDialogResult? result = await showDialog<AliceSortDialogResult>(
context: context,
builder: (BuildContext buildContext) => AliceSortDialog(
builder: (_) => AliceSortDialog(
sortOption: _sortOption,
sortAscending: _sortAscending,
),
Expand Down
2 changes: 1 addition & 1 deletion packages/alice/lib/ui/common/alice_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AliceGeneralDialog {
}) =>
showDialog<void>(
context: context,
builder: (BuildContext buildContext) {
builder: (BuildContext context) {
return Theme(
data: AliceTheme.getTheme(),
child: AlertDialog(
Expand Down
2 changes: 1 addition & 1 deletion packages/alice/lib/ui/common/alice_navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AliceNavigation {
return Navigator.push<void>(
context,
MaterialPageRoute(
builder: (context) => child,
builder: (_) => child,
),
);
}
Expand Down

0 comments on commit 8a55c09

Please sign in to comment.