본문 바로가기
반응형

Development Solutions/Flutter & Dart63

[Flutter] Make the height of the widget variably change depending on the length of the text input string. (Text 입력 문자열 길이에 따라 위젯의 높이가 가변적으로 변하도록 만들기) [Flutter] Make the height of the widget variably change depending on the length of the text input string. (Text 입력 문자열 길이에 따라 위젯의 높이가 가변적으로 변하도록 만들기) 문제 상황 (Problem) Text에 입력으로 들어오는 문자열 길이에 따라서 위젯의 높이가 가변적으로 변하면 좋겠는 상황이다. 코드를 어떻게 수정해야할까? [Eng] (This is a situation where it would be nice to have the height of the widget change variably depending on the length of the string that is input to the te.. 2023. 9. 18.
[Solved][Flutter] Error: The getter 'docs' isn't defined for the type 'Object' [Solved][Flutter] Error: The getter 'docs' isn't defined for the type 'Object' 문제 상황 (Problem) StreamBuilder( stream: FirebaseFirestore.instance . . . ) 위 코드에서 에러가 발생한다. Error: The getter 'docs' isn't defined for the type 'Object' 해결 방법 (Solution) StreamBuilder를 StreamBuilder 로 변경하면 된다. StreamBuilder ( stream: FirebaseFirestore.instance . . . ) 2023. 7. 30.
[Solved][Flutter] static variable must initialized in dart [Flutter] static variable must initialized in dart 문제 상황 (Problem) static BannerAd _banner; 위와 같이 변수를 선언하면 최신 버전 dart에서 초기화를 하지 않아 에러가 발생한다. 일반 변수라면 late키워드를 붙여서 해결할 수 있지만, static 변수는 late를 붙일 수 없다. 그렇다면 어떻게 해결해야 할까? [English](If you declare a variable like this An error occurs because it is not initialized in the latest version of dart. If it is a general variable, it can be solved by attaching.. 2023. 7. 30.
[Flutter][Solved] The argument type 'Widget' can't be assigned to the parameter type 'PreferredSizeWidget?' [Flutter][Solved] The argument type 'Widget' can't be assigned to the parameter type 'PreferredSizeWidget?' 문제 상황 (Problem) Scaffold의 appBar에 Widget을 대입하면, 아래와 같은 빌드 에러가 발생한다. [English](If Widget is assigned to Scaffold's appBar, the following build error occurs.) The argument type 'Widget' can't be assigned to the parameter type 'PreferredSizeWidget?' 해결 방법 (Solution) Widget을 반환하는 대신에 Preferred.. 2023. 7. 28.
반응형