hussam

feat: add REdgeInsetsDirectional

... ... @@ -79,3 +79,52 @@ class REdgeInsets extends EdgeInsets {
top: top.r,
);
}
class REdgeInsetsDirectional extends EdgeInsetsDirectional {
/// Creates insets where all the offsets are `value`.
///
/// {@tool snippet}
///
/// Adapt eight-pixel margin on all sides:
///
/// ```dart
/// const REdgeInsetsDirectional.all(8.0)
/// ```
/// {@end-tool}
REdgeInsetsDirectional.all(double value) : super.all(value.r);
/// Creates insets with only the given values non-zero.
///
/// {@tool snippet}
///
/// Adapt margin indent of 40 pixels on the leading side:
///
/// ```dart
/// const REdgeInsetsDirectional.only(start: 40.0)
/// ```
/// {@end-tool}
REdgeInsetsDirectional.only({
double bottom = 0,
double end = 0,
double start = 0,
double top = 0,
}) : super.only(
bottom: bottom.r,
start: start.r,
end: end.r,
top: top.r,
);
/// Creates adapt insets from offsets from the start, top, end, and bottom.
REdgeInsetsDirectional.fromSTEB(
double start,
double top,
double end,
double bottom,
) : super.fromSTEB(
start.r,
top.r,
end.r,
bottom.r,
);
}
... ...