initial
This commit is contained in:
31
lib/pages/setting_page.dart
Normal file
31
lib/pages/setting_page.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SettingPage extends StatelessWidget {
|
||||
const SettingPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// 注意:这里不需要 bottomNavigationBar 了,因为外层已经有了
|
||||
backgroundColor: Colors.transparent, // 关键:背景透明,透出玻璃效果
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar.large(
|
||||
title: const Text('首页'),
|
||||
floating: true,
|
||||
backgroundColor: Colors.blueAccent.withOpacity(0.8),
|
||||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) => ListTile(
|
||||
title: Text('列表项 $index'),
|
||||
leading: const Icon(Icons.article),
|
||||
),
|
||||
childCount: 20,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user