master
章文轩 3 years ago
parent 4f50105cac
commit e3b1e9aa76

@ -10,31 +10,11 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="18463f0e-cf10-4ee2-975b-376476396e12" name="Default Changelist" comment="Default Changelist"> <list default="true" id="18463f0e-cf10-4ee2-975b-376476396e12" name="Default Changelist" comment="Default Changelist">
<change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/cache_data.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/cache_data.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/calendar_provider.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/calendar_provider.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/configuration.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/configuration.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/controller.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/controller.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/model/date_model.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/model/date_model.dart" afterDir="false" /> <change beforePath="$PROJECT_DIR$/lib/model/date_model.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/model/date_model.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/utils/LogUtil.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/utils/LogUtil.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/utils/date_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/utils/date_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/utils/lunar_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/utils/lunar_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/utils/math_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/utils/math_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/utils/solar_term_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/utils/solar_term_util.dart" afterDir="false" /> <change beforePath="$PROJECT_DIR$/lib/utils/solar_term_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/utils/solar_term_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/base_day_view.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/base_day_view.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/base_week_bar.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/base_week_bar.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/calendar_view.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/calendar_view.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/default_week_bar.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/default_week_bar.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/month_view.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/month_view.dart" afterDir="false" /> <change beforePath="$PROJECT_DIR$/lib/widget/month_view.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/month_view.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/month_view_pager.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/month_view_pager.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/only_one_pointer_widget.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/only_one_pointer_widget.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/week_view.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/week_view.dart" afterDir="false" /> <change beforePath="$PROJECT_DIR$/lib/widget/week_view.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/week_view.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/widget/week_view_pager.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/widget/week_view_pager.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.yaml" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

@ -37,7 +37,7 @@ class DateModel {
// //
String get gregorianFestival { String get gregorianFestival {
String result = LunarUtil.gregorianFestival(month!, day); String result = LunarUtil.gregorianFestival(month!, day);
if (result?.isNotEmpty == true) { if (result.isNotEmpty == true) {
return result; return result;
} }
return LunarUtil.getSpecialFestival(year, month!, day); return LunarUtil.getSpecialFestival(year, month!, day);

@ -247,8 +247,8 @@ class SolarTermUtil {
* @return , UTC=1UTC * @return , UTC=1UTC
*/ */
static double toJulian(Time time, bool UTC) { static double toJulian(Time time, bool UTC) {
double y = time.year!; // double y = time.year; //
double m = time.month!; double m = time.month;
double n = 0; double n = 0;
if (m <= 2) { if (m <= 2) {
@ -256,7 +256,7 @@ class SolarTermUtil {
y--; y--;
} }
if (time.year! * 372 + time.month! * 31 + time.day >= 588829) { if (time.year * 372 + time.month * 31 + time.day >= 588829) {
// 1582*372+10*31+15 // 1582*372+10*31+15
n = doubleFloor(y / 100); n = doubleFloor(y / 100);
n = 2 - n + doubleFloor(n / 4); // n = 2 - n + doubleFloor(n / 4); //
@ -293,13 +293,13 @@ class SolarTermUtil {
} }
A += 1524; // 42 A += 1524; // 42
time.year = doubleFloor((A - 122.1) / 365.25); // time.year = doubleFloor((A - 122.1) / 365.25); //
D = A - doubleFloor(365.25 * time.year!); // D = A - doubleFloor(365.25 * time.year); //
time.month = doubleFloor(D / 30.6001); // time.month = doubleFloor(D / 30.6001); //
time.day = D - doubleFloor(time.month! * 30.6001); // time.day = D - doubleFloor(time.month * 30.6001); //
time.year -= 4716; time.year -= 4716;
time.month--; time.month--;
if (time.month! > 12) time.month -= 12; if (time.month > 12) time.month -= 12;
if (time.month! <= 2) time.year++; if (time.month <= 2) time.year++;
// //
F *= 24; F *= 24;
time.hour = doubleFloor(F); time.hour = doubleFloor(F);

@ -137,6 +137,11 @@ class _MonthViewState extends State<MonthView>
dateModel.isSelected = false; dateModel.isSelected = false;
} }
break; break;
///
case null:
break;
} }
return ItemContainer( return ItemContainer(
@ -195,7 +200,7 @@ class ItemContainerState extends State<ItemContainer> {
The following assertion was thrown while handling a gesture: The following assertion was thrown while handling a gesture:
setState() called after dispose() setState() called after dispose()
*/ */
v ??= false; // v ??= false;
if (mounted) { if (mounted) {
setState(() { setState(() {
dateModel!.isSelected = v; dateModel!.isSelected = v;
@ -331,6 +336,10 @@ class ItemContainerState extends State<ItemContainer> {
setState(() {}); setState(() {});
} }
break;
case null:
break; break;
} }

@ -98,6 +98,10 @@ class _WeekViewState extends State<WeekView> {
dateModel.isSelected = false; dateModel.isSelected = false;
} }
break; break;
case null:
break;
} }
return ItemContainer( return ItemContainer(

Loading…
Cancel
Save