divider_with_padding.dart 524 B

123456789101112131415161718192021222324
  1. import 'package:flutter/material.dart';
  2. class DividerWithPadding extends StatelessWidget {
  3. final double left, top, right, bottom, thickness;
  4. const DividerWithPadding({
  5. Key? key,
  6. this.left = 0,
  7. this.top = 0,
  8. this.right = 0,
  9. this.bottom = 0,
  10. this.thickness = 0.5,
  11. }) : super(key: key);
  12. @override
  13. Widget build(BuildContext context) {
  14. return Padding(
  15. padding: EdgeInsets.fromLTRB(left, top, right, bottom),
  16. child: Divider(
  17. thickness: thickness,
  18. ),
  19. );
  20. }
  21. }