본문 바로가기

MobileDevelopment19

Flutter 텍스트 필드 테두리 색상을 변경할 수 없습니다., Not able to change TextField Border Color 질문 저는 TextField의 테두리 색상을 BorderSide를 사용하여 변경하려고 시도했지만 작동하지 않습니다. 아래는 제 코드입니다. new TextField( decoration: new InputDecoration( border: new OutlineInputBorder( borderSide: new BorderSide(color: Colors.teal) ), hintText: 'Tell us about yourself', helperText: 'Keep it short, this is just a demo.', labelText: 'Life story', prefixIcon: const Icon(Icons.person, color: Colors.green,), prefixText: ' ', s.. 2023. 5. 28.
Flutter: 정적 대상이 누락된 경우 처리되지 않음, Flutter: Unimplemented handling of missing static target 질문 나는 내 첫 번째 Flutter 프로젝트를 실행 중이다. 샘플 프로젝트를 만들었고 시뮬레이터에서 앱을 실행할 수 있었다. 나는 main.dart 파일을 편집했다. main.dart import 'package:flutter/material.dart'; void main() => runApp(MaterialApp(home: Text('Hello World'))); 이제 다음 오류가 발생한다 : pubspec.yaml name: flutter_app description: A new Flutter application. # The following defines the version and build number for your application. # A version number is three .. 2023. 5. 26.
Flutter 플러터에서 "뒤로" 버튼을 무시하는 방법은 무엇인가요? [중복], How To Override the “Back” button in Flutter? [duplicate] 질문 On my Home widget, when user taps system back button, I want to show a confirmation dialog asking "Do you want to exit the App?" I don't understand how I should override or handle the system back button. 답변 WillPopScope을(를) 사용하여 이를 달성할 수 있습니다. 예시: import 'dart:async'; import 'package:flutter/material.dart'; class HomePage extends StatefulWidget { HomePage({Key key, this.title}) :super(key: ke.. 2023. 5. 17.
Flutter에서 메인 화면의 배경색을 어떻게 설정하나요?, How do I set the background color of my main screen in Flutter? 질문 저는 Flutter를 배우고 있습니다. 매우 기초부터 시작하고 있습니다. MaterialApp을 사용하지 않고 전체 화면의 배경색을 설정하는 좋은 방법이 무엇인가요? 지금까지 작성한 코드는 다음과 같습니다: import 'package:flutter/material.dart'; void main() { runApp(new MyApp()); } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return new Center(child: new Text("Hello, World!")); } } 제가 가진 몇 가지 질.. 2023. 5. 17.