space.dart 376 B

123456789101112131415161718192021
  1. import 'package:flutter/widgets.dart';
  2. class Space extends StatelessWidget {
  3. final double width;
  4. final double height;
  5. Space({this.width = 0, this.height = 0});
  6. @override
  7. Widget build(BuildContext context) {
  8. if (width > 0) {
  9. return SizedBox(
  10. width: width,
  11. );
  12. } else {
  13. return SizedBox(
  14. height: height,
  15. );
  16. }
  17. }
  18. }