728x90
반응형
안드로이드 기기에서는 문제가 없었는데, iOS기기에서 Text 필드 더블클릭시 오류가 발생했습니다.
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building _CupertinoTextSelectionControlsToolbar(dirty, dependencies: [_LocalizationsScope-[GlobalKey#36cb4], MediaQuery], state: _CupertinoTextSelectionControlsToolbarState#d89a6):
No CupertinoLocalizations found.
_CupertinoTextSelectionControlsToolbar widgets require CupertinoLocalizations to be provided by a Localizations widget ancestor.
The cupertino library uses Localizations to generate messages, labels, and abbreviations.
To introduce a CupertinoLocalizations, either use a CupertinoApp at the root of your application to include them automatically, or add a Localization widget with a CupertinoLocalizations delegate.
The specific widget that could not find a CupertinoLocalizations ancestor was: _CupertinoTextSelectionControlsToolbar
dirty
dependencies: [_LocalizationsScope-[GlobalKey#36cb4], MediaQuery]
state: _CupertinoTextSelectionControlsToolbarState#d89a6
The ancestors of this widget were:
: MaterialApp
state: _MaterialAppState#942d4
...
Meterial App의 localizationDelegates에서 GlobalCupertinoLocalizations.delegate를 추가하여 해결하였습니다.
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate, // 추가
GlobalWidgetsLocalizations.delegate,
]
[Reference]
728x90
반응형
'mobile > flutter' 카테고리의 다른 글
[Flutter] AppLifeCycle event (onResume 등) (0) | 2022.01.20 |
---|---|
[Flutter | AOS] 위변조 탐지 - 서명값 비교 (0) | 2021.10.01 |
[flutter] SocketException: Failed host lookup: 'www.xyz.com' (OS Error: No address associated with hostname, errno = 7) (0) | 2021.08.25 |
[flutter] Copy to clipboard on tap. Use ScaffoldMessenger.showSnackBar. (0) | 2021.08.17 |
[Dart] Null safety (0) | 2021.07.14 |
댓글