refactor: perf improvements

This commit is contained in:
cogwheel0
2025-09-23 11:00:25 +05:30
parent 41216ea432
commit 8da8a78001
7 changed files with 205 additions and 93 deletions

View File

@@ -106,8 +106,16 @@ class _ErrorBoundaryState extends ConsumerState<ErrorBoundary> {
}
// Default error UI
// Respect ambient text direction when available; fall back to LTR.
TextDirection direction;
try {
direction = Directionality.of(context);
} catch (_) {
direction = TextDirection.ltr;
}
return Directionality(
textDirection: TextDirection.ltr,
textDirection: direction,
child: Scaffold(
backgroundColor: context.conduitTheme.surfaceBackground,
body: SafeArea(