Skip to content

Commit

Permalink
页面关闭时关闭数据库
Browse files Browse the repository at this point in the history
否则会有警告,
  • Loading branch information
AoEiuV020 committed Apr 20, 2024
1 parent 840a843 commit 596d9d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/view/database_operator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ class _DatabaseOperatorState extends State<DatabaseOperator> {
});
}

@override
void dispose() {
widget.database.close();
super.dispose();
}

@override
Widget build(BuildContext context) {
return Column(
Expand Down

0 comments on commit 596d9d6

Please sign in to comment.