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 11# Changelog
22
3+ ## Unreleased
4+
5+ ### Fixes
6+
7+ - Respect ancestor text direction in ` SentryScreenshotWidget ` ([ #3046 ] ( https://github.com/getsentry/sentry-dart/pull/3046 ) )
8+
39## 9.4.0-beta.1
410
511### Fixes
Original file line number Diff line number Diff line change @@ -122,17 +122,25 @@ class _SentryScreenshotWidgetState extends State<SentryScreenshotWidget> {
122122 unregisterCallbacks.forEach (SentryScreenshotWidget ._onBuild.remove);
123123 }
124124
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+
125133 return RepaintBoundary (
126134 child: Directionality (
127- textDirection: TextDirection .ltr ,
135+ textDirection: textDirection ,
128136 child: Stack (
129137 children: [
130138 Container (
131139 child: widget.child,
132140 ),
133141 if (_isScreenshotButtonVisible)
134- Positioned (
135- right : 32 ,
142+ PositionedDirectional (
143+ end : 32 ,
136144 bottom: 32 ,
137145 child: ElevatedButton .icon (
138146 key: const ValueKey (
You can’t perform that action at this time.
0 commit comments