|
123456789101112131415161718192021222324252627282930313233 |
- import 'package:flutter/material.dart';
- import 'package:loading_indicator/loading_indicator.dart';
- import 'package:pull_to_refresh/pull_to_refresh.dart';
-
- class RefreshHeader extends StatelessWidget {
- final double offsetY;
- final double _height = 44;
-
- const RefreshHeader({Key key, this.offsetY = 0}) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- // double top = MediaQueryData.fromWindow(window).padding.top;
- return CustomHeader(
- height: _height,
- builder: (BuildContext context, RefreshStatus mode) {
- return Transform.translate(
- offset: Offset(0, offsetY),
- child: Center(
- child: Container(
- width: 36,
- height: 36,
- child: LoadingIndicator(
- indicatorType: Indicator.ballSpinFadeLoader,
- color: Colors.white,
- ),
- ),
- ),
- );
- },
- );
- }
- }
|