vertical_dots.dart 921 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. class VerticalDots extends StatelessWidget {
  4. final double dotSize;
  5. final double height;
  6. final Color? color;
  7. final double horizontalPadding;
  8. const VerticalDots({
  9. super.key,
  10. required this.dotSize,
  11. required this.height,
  12. this.color = Colors.white,
  13. this.horizontalPadding = 0,
  14. });
  15. @override
  16. Widget build(BuildContext context) {
  17. return Container(
  18. margin: EdgeInsets.symmetric(horizontal: horizontalPadding),
  19. width: 2.w,
  20. height: 8.h,
  21. child: Column(
  22. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  23. children: List.generate(2, (index) {
  24. return Container(
  25. width: dotSize,
  26. height: dotSize,
  27. decoration: BoxDecoration(color: color, shape: BoxShape.circle),
  28. );
  29. }),
  30. ),
  31. );
  32. }
  33. }