반응형
색상변경
-
[flutter] 플러터 cursorColor 속성 없어짐 / textfield 커서 색상 변경 방법 / 커서 색상 일괄 적용 / cursorColor property in TextSelectionTheme앱 개발/플러터(Flutter) 2022. 8. 2. 14:45
아래 그림과 같이 커서 색상을 기본 색상에서 원하는 색깔로 바꿔보자 ! textfield의 커서 색상을 일괄 변경하기 위해서 themeData를 사용한다. v1.26.0-18.0.pre. 이전 버전에서는 위와 같이 ThemeData 내에 cursorColor을 설정해주면 됐었지만, 이후 버전부터는 삭제되었다. 대체로, 아래와 같이 작성하면 똑같이 적용된다. textSelectionTheme을 이용한다. 그 안에 cursorColor라는 속성이 있으므로 그것으로 설정을 하면 된다. 참고 : https://api.flutter.dev/flutter/material/ThemeData/cursorColor.html cursorColor property - ThemeData class - material libr..