You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal to add EdgeInsetsDirectional.copyWith #137475
While trying to make my app RTL-aware, I noticed that it is not possible to simply swap out EdgeInsets with EdgeInsetsDirectional as it lacks the copyWith method, which is necessary for immutable data structures like this one.
Proposal
In flutter/packages/flutter/lib/src/painting/edge_insets.dart
/* ... */classEdgeInsetsDirectionalextendsEdgeInsetsGeometry {
/* ... *//// Creates a copy of this EdgeInsetsDirectional but with the given /// fields replaced with the new values.EdgeInsetsDirectionalcopyWith({
double? start,
double? top,
double? end,
double? bottom,
}) {
returnEdgeInsetsDirectional.only(
start: start ??this.start,
top: top ??this.top,
end: end ??this.end,
bottom: bottom ??this.bottom,
);
}
/* ... */
}
/* ... */
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[-]EdgeInsetsDirectional.copyWith[/-][+]Proposal to add `EdgeInsetsDirectional.copyWith`[/+]Added EdgeInsetsDirectional.copyWith (#137559)
github-actions commentedon Nov 15, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.