dart30 Flutter 텍스트 필드의 밑줄 색상을 변경하는 방법은 무엇인가요?, How to change textField underline color? 질문 I'm new to both flutter & dart. Currently, using this in one of my personal projects. In all of my form, the underline of textField is showing in blue color. I want to change that to some other color. The piece of code which I'm using is like... new TextField( controller: this._emailController, decoration: new InputDecoration( hintText: "Enter your email", labelText: "Email", labelStyle: new .. 2023. 5. 31. Flutter 플러터 앱에 날짜 선택기를 추가하는 올바른 방법은 무엇인가요?, What is the correct way to add date picker in flutter app? 질문 내 앱에서는 회원 가입 페이지를 만들고 있습니다. 그곳에는 생년월일을 추가해야 합니다. 그러나 이를 위한 올바른 방법을 찾지 못하고 있습니다. 답변 사용 방법을 보여주는 간단한 앱: import 'dart:async'; import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return const MaterialApp( title: 'Flutter Demo', home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } class My.. 2023. 5. 30. Flutter 현재 날짜를 어떻게 가져올 수 있나요? (시간과 분 없이), How can I get the current date (w/o hour and minutes)? 질문 문서에서 볼 수 있는 것은 DateTime.now()뿐이지만, 이는 Timespan도 반환하므로 날짜만 필요합니다. 답변 now를 사용하여 필요한 부분만 가져와 새로운 날짜를 만듭니다: DateTime now = new DateTime.now(); DateTime date = new DateTime(now.year, now.month, now.day); 힌트: Dart에서는 "new"가 상당한 시간 동안 선택 사항입니다. 2023. 5. 29. Flutter 플러터에서 json으로부터 객체 목록을 역직렬화하는 방법, How to Deserialize a list of objects from json in flutter 질문 저는 json serialization을 위해 dart 패키지 json_serializable을 사용하고 있습니다. 플러터 문서를 살펴보면 다음과 같이 단일 객체를 역직렬화하는 방법이 나와 있습니다: Future fetchPost() async { final response = await http.get('https://jsonplaceholder.typicode.com/posts/1'); if (response.statusCode == 200) { // 서버 호출이 성공하면 JSON을 파싱합니다 return Post.fromJson(json.decode(response.body)); } else { // 호출이 실패하면 오류를 throw합니다. throw Exception('Failed to lo.. 2023. 5. 29. 이전 1 2 3 4 5 6 7 8 다음