基础库
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
554 B

  1. import 'package:flutter/material.dart';
  2. class SliverTabBarDelegate extends SliverPersistentHeaderDelegate {
  3. final TabBar widget;
  4. const SliverTabBarDelegate(this.widget) : assert(widget != null);
  5. @override
  6. Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {
  7. return this.widget;
  8. }
  9. @override
  10. bool shouldRebuild(SliverTabBarDelegate oldDelegate) {
  11. return false;
  12. }
  13. @override
  14. double get maxExtent => widget.preferredSize.height;
  15. @override
  16. double get minExtent => widget.preferredSize.height;
  17. }