fix(mining-app): 修复 ProfilePage._buildUserHeader 缺少 ref 参数导致编译失败
_buildNotificationIcon 需要 WidgetRef ref 来 watch 未读通知数, 但 _buildUserHeader 方法签名未声明该参数,导致编译错误: "The getter 'ref' isn't defined for the type 'ProfilePage'" 修复:将 ref 从 build() 透传给 _buildUserHeader() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2706eef54f
commit
dc27fe9e44
|
|
@ -77,7 +77,7 @@ class ProfilePage extends ConsumerWidget {
|
|||
child: Column(
|
||||
children: [
|
||||
// 用户头部信息
|
||||
_buildUserHeader(context, user),
|
||||
_buildUserHeader(context, user, ref),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ class ProfilePage extends ConsumerWidget {
|
|||
);
|
||||
}
|
||||
|
||||
Widget _buildUserHeader(BuildContext context, UserState user) {
|
||||
Widget _buildUserHeader(BuildContext context, UserState user, WidgetRef ref) {
|
||||
final avatarColor = _avatarColors[user.avatarIndex % _avatarColors.length];
|
||||
|
||||
return Container(
|
||||
|
|
|
|||
Loading…
Reference in New Issue