YSDottedLine.dart 830 B

1234567891011121314151617181920212223242526272829303132
  1. import 'package:flutter/material.dart';
  2. import 'YSTools.dart';
  3. class YSDottedLine extends StatelessWidget {
  4. final double width;
  5. const YSDottedLine({Key? key, required this.width}) : super(key: key);
  6. @override
  7. Widget build(BuildContext context) {
  8. return SizedBox(
  9. width: width,
  10. height: hsp(1),
  11. child: ListView.separated(
  12. itemBuilder: (context,index){
  13. return Container(
  14. height: hsp(1),
  15. width: hsp(5),
  16. color: Colors.grey.withOpacity(0.2),
  17. );
  18. },
  19. separatorBuilder: (context,index){
  20. return Container(width: hsp(3),);
  21. },
  22. itemCount: 100,
  23. padding: const EdgeInsets.all(0),
  24. physics: const NeverScrollableScrollPhysics(),
  25. scrollDirection: Axis.horizontal,
  26. ),
  27. );
  28. }
  29. }