Intl을 사용하여 한국어로 변경을 하였는데.. 숫자만 나와야하는데 1일,2일 이런식으로 나옵니다..
467
작성한 질문수 2


답변 2
1
안녕하세요!
이상하네 플러그인 버전이 동일한지 확인 해주세요.
관계없이 아래 코드로 (calendarBuilder 파라미터) 자유롭게 커스터마이징 가능합니다.
class Calendar extends StatelessWidget {
final DateTime focusedDay;
final OnDaySelected onDaySelected;
final bool Function(DateTime day) selectedDayPredicate;
const Calendar({
required this.focusedDay,
required this.onDaySelected,
required this.selectedDayPredicate,
super.key,
});
@override
Widget build(BuildContext context) {
final defaultBoxDecoration = BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
border: Border.all(
color: Colors.grey[200]!,
width: 1.0,
),
);
final defaultTextStyle = TextStyle(
color: Colors.grey[600],
fontWeight: FontWeight.w700,
);
return TableCalendar(
locale: 'ko_KR',
focusedDay: focusedDay,
firstDay: DateTime(1800),
lastDay: DateTime(3000),
headerStyle: HeaderStyle(
formatButtonVisible: false,
titleCentered: true,
titleTextStyle: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w700,
),
),
calendarBuilders: CalendarBuilders(
defaultBuilder: (context, day, focusedDay) {
return Container(
margin: EdgeInsets.all(4.0),
alignment: Alignment.center,
decoration: defaultBoxDecoration,
child: Text(
day.day.toString(),
style: defaultTextStyle,
),
);
},
),
calendarStyle: CalendarStyle(
isTodayHighlighted: true,
defaultDecoration: defaultBoxDecoration,
weekendDecoration: defaultBoxDecoration,
selectedDecoration: defaultBoxDecoration.copyWith(
border: Border.all(
color: primaryColor,
width: 1.0,
),
),
todayDecoration: defaultBoxDecoration.copyWith(
color: primaryColor,
),
outsideDecoration: defaultBoxDecoration.copyWith(
border: Border.all(
color: Colors.transparent,
),
),
defaultTextStyle: defaultTextStyle,
weekendTextStyle: defaultTextStyle,
selectedTextStyle: defaultTextStyle.copyWith(
color: primaryColor,
),
),
onDaySelected: onDaySelected,
selectedDayPredicate: selectedDayPredicate,
);
}
}
198강 (){onTap(e);}의 이해 돕기
0
25
1
video_call 플러그인 설치후 에러 발생
0
45
1
SDK 안드로이드 설치 질문!
0
59
1
코드팩토리 디스코드 링크 다시 부탁드려요~
0
92
1
Webview를 이용해서 URL 상의 페이지 출력 불가
0
69
1
홈스크린 함수를 함축해서 main.dart에 옮기는 문제
0
55
1
플레이스토어
0
59
1
아고라 엔진 init 함수의 반환타입이 Future<void> 이것의 의미는 무엇인가요?
0
55
1
가이드라인 질문
0
57
0
emulator 에러 환경설정 뭐가 문제 일까요??
0
76
1
emulator 실행 오류
0
93
3
Column을 가로방향 최대 사이즈를 차지하도록 하는 방법에 관련
0
71
1
pubspec.yaml에서 font를 추가하면서 weight 값을 지정하는 것이 의미가 있는 것인지 문의
0
43
1
setState()를 호출하지 않으면 build가 실행 안되는 건가요?
0
53
1
video_call 플러그인 설치시 에러문제
0
64
1
children 안의 if 문에서 { } 못쓰는 이유?
0
48
1
이렇게 오류가 떠요
0
63
1
AppBar 사용했는데
0
61
2
[문제해결] '오늘도 출첵!' 의 171번 강의에서 중요한 문제를 발견했습니다
0
56
1
StatefulWidget 실습 에러가 발생합니다.[해결완료]
0
63
1
Video Player 프로젝트에 대한 추가 질문
0
53
0
Row위젯이나 column위젯의 위치는 누가 정하나요??
0
42
1
geolocator 오류때문에 개발진행이 불가능입니다
0
63
1
API 관련 이슈
0
86
2





