Last active
October 22, 2024 14:43
-
-
Save eernstg/495b939015270b8fa4976ae92ba872eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static extension EdgeInsetsGeometryExtensions on EdgeInsetsGeometry { | |
// Forward to EdgeInsets: | |
const factory EdgeInsetsGeometry.fromLTRB( | |
double left, | |
double top, | |
double right, | |
double bottom, | |
) = EdgeInsets.fromLTRB; | |
const factory EdgeInsetsGeometry.all(double value) = EdgeInsets.all; | |
const factory EdgeInsetsGeometry.only({ | |
double left, | |
double top, | |
double right, | |
double bottom, | |
}) = EdgeInsets.only; | |
const factory EdgeInsetsGeometry.symmetric({ | |
double vertical, | |
double horizontal, | |
}) = EdgeInsets.symmetric; | |
const static const EdgeInsets zero = EdgeInsets.only(); | |
// Forward to EdgeInsetsDirectional: | |
const factory EdgeInsetsGeometry.fromSTEB( | |
double start, | |
double top, | |
double end, | |
double bottom, | |
) = EdgeInsetsDirectional.fromSTEB; | |
const factory EdgeInsetsGeometry.onlyDirectional({ | |
double start, | |
double top, | |
double end, | |
double bottom, | |
}) = EdgeInsetsDirectional.only; | |
const factory EdgeInsetsGeometry.symmetricDirectional({ | |
double horizontal, | |
double vertical, | |
}) => EdgeInsetsDirectional.symmetric; | |
const factory EdgeInsetsGeometry.allDirectional(double value) = | |
EdgeInsetsDirectional.all; | |
static const zeroDirectional = EdgeInsetsDirectional.only(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment