1234567891011121314151617181920212223 |
- import 'package:flutter/material.dart';
- class PersistentHeader extends SliverPersistentHeaderDelegate {
- double max;
- double min;
- Widget child;
- PersistentHeader({this.max = 50.0, this.min = 50.0, @required this.child});
- @override
- Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {
- return child;
- }
- @override
- double get maxExtent => max;
- @override
- double get minExtent => min;
- @override
- bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => true;
- }
|