/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2023-06-07 14:52:12
 * @LastEditTime : 2023-06-07 14:52:34
 * @Description  : Do not edit
 */
import 'package:flutter/material.dart';

/// 滑动吸顶的tabbar
class WisStickyTabBarDelegate extends SliverPersistentHeaderDelegate {
  final child;

  WisStickyTabBarDelegate({required this.child});

  @override
  Widget build(
      BuildContext context, double shrinkOffset, bool overlapsContent) {
    return this.child;
  }

  @override
  double get maxExtent => this.child.child.preferredSize.height;

  @override
  double get minExtent => this.child.child.preferredSize.height;

  @override
  bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
    return true;
  }
}
