fbmobile/lib/ui/shared/ui_helpers.dart
2021-02-02 15:33:23 +01:00

52 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
class UIHelper {
static const double _VerticalSpaceSmall = 10.0;
static const double _VerticalSpaceMedium = 20.0;
static const double _VerticalSpaceLarge = 60.0;
static const double _HorizontalSpaceSmall = 10.0;
static const double _HorizontalSpaceMedium = 20.0;
static const double HorizontalSpaceLarge = 60.0;
/// Returns a vertical space with height set to [_VerticalSpaceSmall]
static Widget verticalSpaceSmall() {
return verticalSpace(_VerticalSpaceSmall);
}
/// Returns a vertical space with height set to [_VerticalSpaceMedium]
static Widget verticalSpaceMedium() {
return verticalSpace(_VerticalSpaceMedium);
}
/// Returns a vertical space with height set to [_VerticalSpaceLarge]
static Widget verticalSpaceLarge() {
return verticalSpace(_VerticalSpaceLarge);
}
/// Returns a vertical space equal to the [height] supplied
static Widget verticalSpace(double height) {
return Container(height: height);
}
/// Returns a vertical space with height set to [_HorizontalSpaceSmall]
static Widget horizontalSpaceSmall() {
return horizontalSpace(_HorizontalSpaceSmall);
}
/// Returns a vertical space with height set to [_HorizontalSpaceMedium]
static Widget horizontalSpaceMedium() {
return horizontalSpace(_HorizontalSpaceMedium);
}
/// Returns a vertical space with height set to [HorizontalSpaceLarge]
static Widget horizontalSpaceLarge() {
return horizontalSpace(HorizontalSpaceLarge);
}
/// Returns a vertical space equal to the [width] supplied
static Widget horizontalSpace(double width) {
return Container(width: width);
}
}