mod: 个人主页隐藏背景图

This commit is contained in:
guozhigq
2023-09-27 22:22:23 +08:00
parent 7be8ebaa7e
commit 6b3773a074

View File

@ -147,34 +147,34 @@ class _MemberPageState extends State<MemberPage>
flexibleSpace: FlexibleSpaceBar( flexibleSpace: FlexibleSpaceBar(
background: Stack( background: Stack(
children: [ children: [
if (_memberController.face != null) // if (_memberController.face != null)
Positioned.fill( // Positioned.fill(
bottom: 10, // bottom: 10,
child: Container( // child: Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
image: DecorationImage( // image: DecorationImage(
fit: BoxFit.fitWidth, // fit: BoxFit.fitWidth,
image: NetworkImage(_memberController.face!), // image: NetworkImage(_memberController.face!),
alignment: Alignment.topCenter, // alignment: Alignment.topCenter,
isAntiAlias: true, // isAntiAlias: true,
), // ),
), // ),
foregroundDecoration: BoxDecoration( // foregroundDecoration: BoxDecoration(
gradient: LinearGradient( // gradient: LinearGradient(
colors: [ // colors: [
Theme.of(context) // Theme.of(context)
.colorScheme // .colorScheme
.background // .background
.withOpacity(0.44), // .withOpacity(0.44),
Theme.of(context).colorScheme.background, // Theme.of(context).colorScheme.background,
], // ],
begin: Alignment.topCenter, // begin: Alignment.topCenter,
end: Alignment.bottomCenter, // end: Alignment.bottomCenter,
stops: const [0.0, 0.46], // stops: const [0.0, 0.46],
), // ),
), // ),
), // ),
), // ),
Positioned( Positioned(
left: 0, left: 0,
right: 0, right: 0,