You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flutter_custom_calendar/lib/week_view.dart

32 lines
829 B

import 'package:flutter/material.dart';
import 'package:flutter_custom_calendar/utils/date_util.dart';
/**
* 周视图,只显示本周的日子
*/
class WeekView extends StatefulWidget {
@override
_WeekViewState createState() => _WeekViewState();
}
class _WeekViewState extends State<WeekView> {
@override
Widget build(BuildContext context) {
// DateTime dateTime = DateTime.now();
//
// print(dateTime);
//
// print(dateTime.subtract(Duration(days: 1)));
//
// var berlinWallFell = new DateTime(1989, DateTime.november, 9);
// var dDay = new DateTime(1944, DateTime.june, 6);
// Duration difference = berlinWallFell.difference(dDay);
// print(difference.inDays);
print(DateUtil.initCalendarForMonthView(
2019, 12, DateTime.now(), DateTime.sunday));
return Container();
}
}