add
This commit is contained in:
@@ -22,7 +22,22 @@ class ExchangePage extends StatelessWidget {
|
||||
elevation: 4,
|
||||
shadowColor: Colors.black12,
|
||||
backgroundColor: theme.colorScheme.surfaceContainerHighest,
|
||||
automaticallyImplyLeading: false,
|
||||
// 1. 左上角返回按钮及功能实现
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(); // 返回上一页
|
||||
},
|
||||
),
|
||||
// 2. 右上角添加按钮(展示功能)
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.add),
|
||||
onPressed: () {
|
||||
// 暂为展示功能,可后续添加具体逻辑
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
// 使用SafeArea确保内容在安全区域内
|
||||
body: SafeArea(
|
||||
@@ -81,8 +96,10 @@ class ExchangePage extends StatelessWidget {
|
||||
// 点击事件可以在这里添加
|
||||
},
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
splashColor: theme.colorScheme.primary.withValues(alpha: 0.1),
|
||||
highlightColor: theme.colorScheme.primary.withValues(alpha: 0.05),
|
||||
splashColor: theme.colorScheme.primary.withAlpha(26), // 0.1透明度的alpha值
|
||||
highlightColor: theme.colorScheme.primary.withAlpha(
|
||||
13,
|
||||
), // 0.05透明度的alpha值
|
||||
child: Container(
|
||||
height: 64,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
|
||||
Reference in New Issue
Block a user