dreampad/lib/app/shared/constants/gaps.dart

48 lines
2.4 KiB
Dart
Raw Permalink Normal View History

2023-11-28 10:44:58 +08:00
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'dimens.dart';
/// 间隔
/// 官方做法https://github.com/flutter/flutter/pull/54394
class Gaps {
/// 水平间隔
static const Widget hGap4 = RSizedBox(width: Dimens.gap_dp4);
static const Widget hGap5 = RSizedBox(width: Dimens.gap_dp5);
static const Widget hGap6 = RSizedBox(width: Dimens.gap_dp5);
static const Widget hGap8 = RSizedBox(width: Dimens.gap_dp8);
static const Widget hGap9 = RSizedBox(width: Dimens.gap_dp9);
static const Widget hGap10 = RSizedBox(width: Dimens.gap_dp10);
static const Widget hGap11 = RSizedBox(width: Dimens.gap_dp11);
static const Widget hGap12 = RSizedBox(width: Dimens.gap_dp12);
static const Widget hGap15 = RSizedBox(width: Dimens.gap_dp15);
static const Widget hGap16 = RSizedBox(width: Dimens.gap_dp16);
static const Widget hGap21 = RSizedBox(width: Dimens.gap_dp21);
static const Widget hGap24 = RSizedBox(width: Dimens.gap_dp24);
static const Widget hGap27 = RSizedBox(width: Dimens.gap_dp27);
static const Widget hGap32 = RSizedBox(width: Dimens.gap_dp32);
/// 垂直间隔
static const Widget vGap3 = RSizedBox(height: Dimens.gap_dp3);
static const Widget vGap4 = RSizedBox(height: Dimens.gap_dp4);
static const Widget vGap5 = RSizedBox(height: Dimens.gap_dp5);
static const Widget vGap8 = RSizedBox(height: Dimens.gap_dp8);
static const Widget vGap9 = RSizedBox(height: Dimens.gap_dp9);
static const Widget vGap10 = RSizedBox(height: Dimens.gap_dp10);
static const Widget vGap12 = RSizedBox(height: Dimens.gap_dp12);
static const Widget vGap15 = RSizedBox(height: Dimens.gap_dp15);
static const Widget vGap16 = RSizedBox(height: Dimens.gap_dp16);
static const Widget vGap21 = RSizedBox(height: Dimens.gap_dp21);
static const Widget vGap20 = RSizedBox(height: Dimens.gap_dp20);
static const Widget vGap24 = RSizedBox(height: Dimens.gap_dp24);
static const Widget vGap27 = RSizedBox(height: Dimens.gap_dp27);
static const Widget vGap30 = RSizedBox(height: Dimens.gap_dp30);
static const Widget vGap32 = RSizedBox(height: Dimens.gap_dp32);
static const Widget vGap36 = RSizedBox(height: Dimens.gap_dp36);
static const Widget vGap43 = RSizedBox(height: Dimens.gap_dp43);
static const Widget empty = SizedBox.shrink();
/// 补充一种空Widget实现 https://github.com/letsar/nil
/// https://github.com/flutter/flutter/issues/78159
}