From e73a6756b42d7bb55fcbfd1de91ad937cf3f4ecc Mon Sep 17 00:00:00 2001 From: ZacharyWin <2816813070@qq.com> Date: Sun, 15 May 2022 10:16:50 +0800 Subject: [PATCH] feat(pages/SettingPage): improve experience --- lib/pages/profile/pages/setting_page.dart | 43 ++++++++++++----------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/lib/pages/profile/pages/setting_page.dart b/lib/pages/profile/pages/setting_page.dart index 1d78ab1..d579dec 100644 --- a/lib/pages/profile/pages/setting_page.dart +++ b/lib/pages/profile/pages/setting_page.dart @@ -32,28 +32,29 @@ class SettingPage extends StatelessWidget { Widget _buildSingleOption( {required String title, GestureTapCallback? onTap, Widget? right}) { - return Padding( + return InkWell( + child: Padding( padding: EdgeInsets.symmetric(horizontal: 14, vertical: 8), - child: GestureDetector( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row(children: [ - Align( - alignment: Alignment.topLeft, - child: Text(title, style: TextStyle(fontSize: 16))) - ]), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row(children: [ Align( - alignment: Alignment.centerRight, - child: Row( - children: [ - right ?? Empty(), - Icon(Icons.keyboard_arrow_right) - ], - )) - ], - ), - onTap: onTap, - )); + alignment: Alignment.topLeft, + child: Text(title, style: TextStyle(fontSize: 16))) + ]), + Align( + alignment: Alignment.centerRight, + child: Row( + children: [ + right ?? Empty(), + Icon(Icons.keyboard_arrow_right) + ], + )) + ], + ), + ), + onTap: onTap, + ); } }