FLUTTER203 Flutter 플러터에서 stateful 위젯과 stateless 위젯의 관계는 무엇인가요?, What is the relation between stateful and stateless widgets in Flutter? 질문 상태가 있는 위젯은 수명 내에서 상태를 변경하는 모든 위젯으로 정의됩니다. 하지만 StatelessWidget은 자식 중 하나로 StatefulWidget을 가지는 것이 매우 일반적인 관행입니다. 만약 StatelessWidget이 자식 중 하나로 StatefulWidget을 가지면 StatelessWidget은 상태가 있는 위젯이 되지 않을까요? StatelessWidget의 코드 일부로서 문서를 살펴보았지만, StatelessWidget이 Statefulwidget을 자식으로 가질 수 있으면서도 여전히 StatelessWidget으로 유지하는 방법을 알 수 없었습니다. Flutter에서 상태가 있는 위젯과 상태가 없는 위젯 간의 관계와 차이점은 무엇인가요? 답변 A StatelessWidget .. 2023. 5. 26. Flutter 널 안전성 이후에는 'Function' 인수 유형이 'void Function()?' 매개 변수 유형에 할당될 수 없습니다., The argument type 'Function' can't be assigned to the parameter type 'void Function()?' after null safety 질문 저는 서랍에 다른 항목들을 만들고 싶어서, DrawerItems를 위한 별도의 파일을 만들고 생성자를 통해 데이터를 메인 파일로 전달하려고 합니다. 그러나 onPressed 함수에서 다음과 같은 오류가 발생합니다: "The argument type 'Function' can't be assigned to the parameter type 'void Function()'" class DrawerItem extends StatelessWidget { final String text; final Function onPressed; const DrawerItem({Key key, this.text, this.onPressed}) : super(key: key); @override Widget build(B.. 2023. 5. 26. Flutter에서 모든 상수를 유지하는 가장 좋은 방법은 무엇인가요? [닫힘], What's the best practice to keep all the constants in Flutter? [closed] 질문 Flutter에서 애플리케이션 상수를 쉽게 참조하기 위해 모든 상수를 보유하는 상수 클래스를 만드는 최상의 프로그래밍 방법은 무엇인가요? Dart에는 상수 필드를 만드는 const 키워드가 있지만, static을 const와 함께 사용해도 런타임 중에 메모리 문제가 발생할까요? class Constants { static const String SUCCESS_MESSAGE = "You will be contacted by us very soon."; } 이 질문은 적절한 구조를 얻는 것뿐만 아니라 상수를 만들 때 리소스와 메모리 누출 방지를 어떻게 할지도 알아야 합니다. 답변 내가 선호하는 해결책은 내가 직접 Dart 라이브러리를 만드는 것입니다. constants.dart라는 새로운 dart 파일.. 2023. 5. 26. Flutter 코코아팟은 "Firebase/CoreOnly" 팟의 호환 가능한 버전을 찾을 수 없습니다., CocoaPods could not find compatible versions for pod "Firebase/CoreOnly" 질문 I've update my flutter package to the last versions and now IOS doesn't work anymore. When I try to update the pods it shows this error: [!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly": In Podfile: cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on Firebase/Firestore (~> 6.0) was resolved to 6.0.0, which depends .. 2023. 5. 26. 이전 1 ··· 30 31 32 33 34 35 36 ··· 51 다음