본문 바로가기

FLUTTER203

Flutter에서 Row()의 배경색을 설정하는 방법은 무엇인가요?, How to set the background color of a Row() in Flutter? 질문 I'm trying to set up a background color for a Row() widget, but Row itself has no background color or color attribute. I've been able to set the background color of a container to grey, right before the purple-backgrounded text, but the text itself does not fill the background completely and the following spacer does not take any color at all. So how can I have the Row background set to the ".. 2023. 9. 21.
Flutter 확장 위젯은 Flex 위젯 내부에 배치되어야 합니다., Expanded widgets must be placed inside Flex widgets 질문 플러터를 처음 사용해봐서 아래 코드에 무슨 문제가 있는지 알려주실 수 있는 분이 계신가요 class GamePage extends StatelessWidget { int _row; int _column; GamePage(this._row,this._column); @override Widget build(BuildContext context) { return new Material( color: Colors.deepPurpleAccent, child:new Expanded( child:new GridView.count(crossAxisCount: _column,children: new List.generate(_row*_column, (index) { return new Center( child: .. 2023. 9. 7.
Flutter 프로젝트 이름 변경, Changing the project name 질문 플러터 프로젝트의 프로젝트 이름을 변경할 수 있을까요? 프로젝트 이름이란 플러터 프로젝트를 생성할 때 제공하는 이름을 의미합니다. flutter create name입니다. 답변 그것은 당신이 어떤 결과를 얻고자 하는지에 따라 다릅니다. 모바일 폰 메뉴에 표시되는 앱 이름과 함께 앱 아이콘을 변경하려면 android/app/src/main/AndroidManifest.xml에서 android:label (코드 샘플 1)과 ios/Runner/Info.plist에서 CFBundleName (코드 샘플 2)을 변경해야 합니다. 마지막으로 이 작업을 할 때 앱 이름이 Android에서 현재 실행 중인 앱 목록에서 변경되지 않는 이유를 찾는 데 시간이 오래 걸렸습니다. 이를 위해서는 MaterialApp의.. 2023. 9. 7.
Flutter 플러터에서 API 키를 저장하는 올바른 방법과 최선의 관행을 따르는 방법, Correct way of storing API Keys in flutter following best practises 질문 플러터에서 비밀 API 키를 추가하는 올바른 방법(최선의 방법)은 무엇인가요? 만약 코드를 깃허브에 푸시하려면 어떻게 해야 할까요? 나는 앱이 작동하는지 테스트하기 위해 간단한 앱을 만들었지만, API 키를 일종의 임시 방법으로 사용했습니다. 일반적으로 백엔드에서 애플리케이션을 개발하는 경험에서 키는 어딘가에 저장되며 다른 파일에 저장한 다음 필요한 파일에 해당 파일을 가져와서 API_KEY을 사용합니다. 그리고 해당 파일은 .gitignore 파일에서 제외합니다. 지금까지 다음과 같은 접근 방식을 구현했습니다: 폴더 트리 -lib -auth -keys.dart -secrets.json secrets.json 여기에 KEY를 추가하고 이 파일을 .gitignore에 지정하여 코드를 푸시할 때 깃허브.. 2023. 9. 6.