import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/home/home_auth/home_auth.dart';

class HomeAuthDelegate extends SliverPersistentHeaderDelegate {
  final Map<String, dynamic> data;

  HomeAuthDelegate(this.data);

  @override
  Widget build(
      BuildContext context, double shrinkOffset, bool overlapsContent) {
    print('${shrinkOffset.toString()}  ${overlapsContent.toString()}');
    return HomeAuth(data);
  }

  @override
  double get maxExtent => 40;

  @override
  double get minExtent => 40;

  @override
  bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) =>
      false; // 如果内容需要更新，设置为true
}
