Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_screenutil
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
hussam
2022-03-04 15:48:01 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3d35ef23b8ea9020897dfcf3b4868301a8179e38
3d35ef23
1 parent
ffc43f30
feat: add REdgeInsetsDirectional
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
lib/src/r_padding.dart
lib/src/r_padding.dart
View file @
3d35ef2
...
...
@@ -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
,
);
}
...
...
Please
register
or
login
to post a comment