본문 바로가기

분류 전체보기980

flutter 플러터: 처리되지 않은 예외: 바인딩이 초기화되기 전에 ServicesBinding.defaultBinaryMessenger에 액세스했습니다., Flutter: Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was.. 질문 이 문제를 해결하는 해결책이 있나요? 스택 트레이스: [VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized. If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInit.. 2023. 5. 9.
flutter 플러터에서 상태를 가지는 위젯에 데이터 전달하기, Passing Data to a Stateful Widget in Flutter 질문 저는 상태가 있는 위젯을 생성하면서 데이터를 전달하는 권장 방법이 궁금합니다. 제가 본 두 가지 방법은 다음과 같습니다: class ServerInfo extends StatefulWidget { Server _server; ServerInfo(Server server) { this._server = server; } @override State createState() => new _ServerInfoState(_server); } class _ServerInfoState extends State { Server _server; _ServerInfoState(Server server) { this._server = server; } } 이 방법은 ServerInfo와 _ServerInfoState.. 2023. 5. 9.
flutter 키보드가 나타나면, 플러터 위젯이 크기를 조정합니다. 이를 방지하는 방법은 무엇인가요?, When the keyboard appears, the Flutter widgets resize. How to prevent this? 질문 나는 이와 같은 확장 위젯 열을 가지고 있습니다: return new Container( child: new Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ new Expanded( flex: 1, child: convertFrom, ), new Expanded( flex: 1, child: convertTo, ), new Expanded( flex: 1, child: description, ), ], ), ); 이렇게 보입니다: convertFrom은 TextField를 포함합니다. 이 텍스트 필드를 탭하면 Android 키보드가 화면에 나타납니다. 이것은 화면 크기를 변경하므로 위젯이 이와 같이 크기를 조정합니다: 내 Co.. 2023. 5. 9.
flutter 플러터에서 wrap_content와 match_parent의 상응하는 것은 무엇인가요?, The equivalent of wrap_content and match_parent in flutter? 질문 안드로이드에서는 match_parent와 wrap_content를 사용하여 위젯을 부모에 상대적으로 자동으로 크기 조정합니다. Flutter에서는 기본적으로 모든 위젯이 wrap_content로 설정되는 것 같습니다. 부모의 너비와 높이를 채울 수 있도록 어떻게 변경할 수 있을까요? 답변 작은 트릭으로 할 수 있습니다: 다음과 같은 요구 사항이 있는 경우 : ( 너비,높이 ) Wrap_content ,Wrap_content : //이것을 자식으로 사용하세요 Wrap( children: [*your_child*]) Match_parent,Match_parent: //이것을 자식으로 사용하세요 Container( height: double.infinity, width: double.infinity,ch.. 2023. 5. 9.