Fix back button bypassing Done listener in account settings

This commit is contained in:
Ming Ming 2021-10-26 00:17:10 +08:00
parent 6052d82047
commit 1fdf438956

View file

@ -423,7 +423,9 @@ class _AccountSettingsState extends State<AccountSettingsWidget> {
} }
Widget _buildContent(BuildContext context) { Widget _buildContent(BuildContext context) {
return CustomScrollView( return WillPopScope(
onWillPop: () async => !_hasModified,
child: CustomScrollView(
slivers: [ slivers: [
SliverAppBar( SliverAppBar(
pinned: true, pinned: true,
@ -460,6 +462,7 @@ class _AccountSettingsState extends State<AccountSettingsWidget> {
), ),
), ),
], ],
),
); );
} }