基础组件库
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

34 rindas
984 B

  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. final Color color;
  8. const RefreshHeader({Key key, this.offsetY = 0,this.color=Colors.white}) : super(key: key);
  9. @override
  10. Widget build(BuildContext context) {
  11. // double top = MediaQueryData.fromWindow(window).padding.top;
  12. return CustomHeader(
  13. height: _height,
  14. builder: (BuildContext context, RefreshStatus mode) {
  15. return Transform.translate(
  16. offset: Offset(0, offsetY),
  17. child: Center(
  18. child: Container(
  19. width: 36,
  20. height: 36,
  21. child: LoadingIndicator(
  22. indicatorType: Indicator.ballSpinFadeLoader,
  23. color: color,
  24. ),
  25. ),
  26. ),
  27. );
  28. },
  29. );
  30. }
  31. }