基础组件库
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

37 řádky
1.0 KiB

  1. import 'package:flutter/material.dart';
  2. import 'package:loading_indicator/loading_indicator.dart';
  3. import 'package:pull_to_refresh/pull_to_refresh.dart';
  4. class RefreshHeader extends StatelessWidget {
  5. final double offsetY;
  6. final double _height = 44;
  7. const RefreshHeader({Key key, this.offsetY = 0}) : super(key: key);
  8. @override
  9. Widget build(BuildContext context) {
  10. // double top = MediaQueryData.fromWindow(window).padding.top;
  11. return CustomHeader(
  12. height: _height + offsetY,
  13. builder: (BuildContext context, RefreshStatus mode) {
  14. return Container(
  15. margin: EdgeInsets.only(top: offsetY),
  16. // color: Colors.blue,
  17. width: double.infinity,
  18. child: Center(
  19. child: Container(
  20. width: 36,
  21. height: 36,
  22. child: LoadingIndicator(
  23. indicatorType: Indicator.ballSpinFadeLoader,
  24. color: Colors.white,
  25. ),
  26. ),
  27. ),
  28. // color: Colors.blue,
  29. );
  30. },
  31. );
  32. }
  33. }