File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
flutter/lib/src/screenshot Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## Unreleased
4
+
5
+ ### Fixes
6
+
7
+ - Respect ancestor text direction in ` SentryScreenshotWidget ` ([ #3046 ] ( https://github.com/getsentry/sentry-dart/pull/3046 ) )
8
+
3
9
## 9.4.0-beta.1
4
10
5
11
### Fixes
Original file line number Diff line number Diff line change @@ -122,17 +122,25 @@ class _SentryScreenshotWidgetState extends State<SentryScreenshotWidget> {
122
122
unregisterCallbacks.forEach (SentryScreenshotWidget ._onBuild.remove);
123
123
}
124
124
125
+ // Detect the current text direction or fall back to LTR
126
+ TextDirection textDirection;
127
+ try {
128
+ textDirection = Directionality .of (context);
129
+ } catch (_) {
130
+ textDirection = TextDirection .ltr;
131
+ }
132
+
125
133
return RepaintBoundary (
126
134
child: Directionality (
127
- textDirection: TextDirection .ltr ,
135
+ textDirection: textDirection ,
128
136
child: Stack (
129
137
children: [
130
138
Container (
131
139
child: widget.child,
132
140
),
133
141
if (_isScreenshotButtonVisible)
134
- Positioned (
135
- right : 32 ,
142
+ PositionedDirectional (
143
+ end : 32 ,
136
144
bottom: 32 ,
137
145
child: ElevatedButton .icon (
138
146
key: const ValueKey (
You can’t perform that action at this time.
0 commit comments