36 lines
780 B
Dart
36 lines
780 B
Dart
|
|
import 'package:flutter/material.dart';
|
|
|
|
class DashedLine extends StatelessWidget {
|
|
final Axis axis;
|
|
final double dashedWidth;
|
|
final double dashedHeight;
|
|
final int count;
|
|
final Color color;
|
|
|
|
const DashedLine({
|
|
required this.axis,
|
|
required this.dashedWidth,
|
|
required this.dashedHeight,
|
|
this.color = Colors.red,
|
|
this.count = 10
|
|
}) ;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Flex(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
direction: axis,
|
|
children: List.generate(count, ( _) {
|
|
return SizedBox(
|
|
width: dashedWidth,
|
|
height: dashedHeight,
|
|
child: DecoratedBox(
|
|
decoration: BoxDecoration(color: color,)
|
|
),
|
|
);
|
|
}),
|
|
);
|
|
}
|
|
}
|