parent
f2425b83b0
commit
99283787b2
@ -0,0 +1,10 @@
|
||||
.DS_Store
|
||||
.dart_tool/
|
||||
|
||||
.packages
|
||||
.pub/
|
||||
|
||||
build/
|
||||
ios/.generated/
|
||||
ios/Flutter/Generated.xcconfig
|
||||
ios/Runner/GeneratedPluginRegistrant.*
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
@ -0,0 +1,172 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart Packages" type="DartPackagesLibraryType">
|
||||
<properties>
|
||||
<option name="packageNameToDirsMap">
|
||||
<entry key="async">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/async-2.1.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="boolean_selector">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="charcode">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="collection">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="flutter">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/../../../FlutterSDK/flutter/packages/flutter/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="flutter_test">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/../../../FlutterSDK/flutter/packages/flutter_test/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="matcher">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.5/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="meta">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="path">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="pedantic">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.5.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="quiver">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="sky_engine">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/../../../FlutterSDK/flutter/bin/cache/pkg/sky_engine/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_span">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stack_trace">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stream_channel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="string_scanner">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="term_glyph">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test_api">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="typed_data">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="vector_math">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</option>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/async-2.1.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.5/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.5.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib" />
|
||||
<root url="file://$PROJECT_DIR$/../../../FlutterSDK/flutter/bin/cache/pkg/sky_engine/lib" />
|
||||
<root url="file://$PROJECT_DIR$/../../../FlutterSDK/flutter/packages/flutter/lib" />
|
||||
<root url="file://$PROJECT_DIR$/../../../FlutterSDK/flutter/packages/flutter_test/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,19 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart SDK">
|
||||
<CLASSES>
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/async" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/core" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/html" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/io" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/math" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||
<root url="file:///Users/linxiaodong/Flutter/FlutterSDK/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,7 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
|
||||
<CLASSES />
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="io.flutter" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/flutter_custom_calendar.iml" filepath="$PROJECT_DIR$/flutter_custom_calendar.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,295 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="067adf6d-3e64-4468-95c5-20dd90a656ce" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/lib/base_day_view.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/base_week_bar.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/calendar_view.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/constants/constants.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/controller.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/default_combine_day_view.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/default_custom_day_view.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/default_week_bar.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/demo_page/custom_style_page.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/demo_page/default_style_page.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/demo_page/main.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/demo_page/multi_select_style_page.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/demo_page/progress_style_page.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/flutter_calendar.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/model/date_model.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/month_view.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/month_view_pager.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/style/style.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/utils/date_util.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/utils/lunar_util.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/utils/math_util.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/utils/solar_term_util.dart" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/lib/week_view.dart" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/.dart_tool/" />
|
||||
<ignored path="$PROJECT_DIR$/.idea/" />
|
||||
<ignored path="$PROJECT_DIR$/.pub/" />
|
||||
<ignored path="$PROJECT_DIR$/build/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/flutter_custom_calendar.dart">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/base_day_view.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="39" selection-start-line="2" selection-start-column="39" selection-end-line="2" selection-end-column="39" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/constants/constants.dart">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/demo_page/custom_style_page.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="102">
|
||||
<caret line="6" selection-start-line="6" selection-end-line="6" />
|
||||
<folding>
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/base_week_bar.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="17">
|
||||
<caret line="1" selection-start-line="1" selection-end-line="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/default_week_bar.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="51">
|
||||
<caret line="3" selection-start-line="3" selection-end-line="3" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="170">
|
||||
<caret line="10" column="42" selection-start-line="10" selection-start-column="42" selection-end-line="10" selection-end-column="42" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="4" column="41" selection-start-line="4" selection-start-column="41" selection-end-line="4" selection-end-column="41" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>flutter_calendar</find>
|
||||
</findStrings>
|
||||
<replaceStrings>
|
||||
<replace>flutter_custom_calendar</replace>
|
||||
</replaceStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/lib/base_day_view.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/demo_page/custom_style_page.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/base_week_bar.dart" />
|
||||
<option value="$PROJECT_DIR$/lib/default_week_bar.dart" />
|
||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||
<option value="$PROJECT_DIR$/pubspec.yaml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="720" />
|
||||
<option name="y" value="23" />
|
||||
<option name="width" value="720" />
|
||||
<option name="height" value="806" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="flutter_custom_calendar" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_custom_calendar" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="flutter_custom_calendar" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_custom_calendar" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="flutter_custom_calendar" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_custom_calendar" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="constants" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="flutter_custom_calendar" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="flutter_custom_calendar" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="demo_page" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
<pane id="PackagesPane" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="dart.analysis.tool.window.force.activate" value="false" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="show.migrate.to.gradle.popup" value="false" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/lib/demo_page" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$/lib" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="067adf6d-3e64-4468-95c5-20dd90a656ce" name="Default Changelist" comment="" />
|
||||
<created>1558196651106</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1558196651106</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="720" y="23" width="720" height="806" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Structure" side_tool="true" />
|
||||
<window_info id="Image Layers" />
|
||||
<window_info id="Designer" />
|
||||
<window_info id="Resources Explorer" />
|
||||
<window_info id="Capture Tool" />
|
||||
<window_info id="Favorites" side_tool="true" />
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25516224" />
|
||||
<window_info anchor="bottom" id="Dart Analysis" visible="true" weight="0.32913166" />
|
||||
<window_info anchor="bottom" id="Version Control" />
|
||||
<window_info anchor="bottom" id="TODO" />
|
||||
<window_info anchor="bottom" id="Run" />
|
||||
<window_info anchor="bottom" id="Debug" />
|
||||
<window_info anchor="bottom" id="Terminal" />
|
||||
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Flutter Performance" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Find" />
|
||||
<window_info anchor="right" id="Capture Analysis" />
|
||||
<window_info anchor="right" id="Theme Preview" />
|
||||
<window_info anchor="right" id="Flutter Inspector" />
|
||||
<window_info anchor="right" id="Flutter Outline" />
|
||||
<window_info anchor="right" id="Palette	" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/lib/flutter_custom_calendar.dart">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/base_day_view.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="39" selection-start-line="2" selection-start-column="39" selection-end-line="2" selection-end-column="39" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/constants/constants.dart">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/demo_page/custom_style_page.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="102">
|
||||
<caret line="6" selection-start-line="6" selection-end-line="6" />
|
||||
<folding>
|
||||
<element signature="e#0#39#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/base_week_bar.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="17">
|
||||
<caret line="1" selection-start-line="1" selection-end-line="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/default_week_bar.dart">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="51">
|
||||
<caret line="3" selection-start-line="3" selection-end-line="3" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="170">
|
||||
<caret line="10" column="42" selection-start-line="10" selection-start-column="42" selection-end-line="10" selection-end-column="42" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="4" column="41" selection-start-line="4" selection-start-column="41" selection-end-line="4" selection-end-column="41" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: d42db56b52657d7557664393ac1fe9a734a6b6e7
|
||||
channel: master
|
||||
|
||||
project_type: package
|
@ -0,0 +1,25 @@
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2019, LXD312569496
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Dart Packages" level="project" />
|
||||
<orderEntry type="library" name="Dart SDK" level="project" />
|
||||
<orderEntry type="library" name="Flutter Plugins" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/**
|
||||
* 顶部的固定的周显示
|
||||
*/
|
||||
abstract class BaseWeekBar extends StatelessWidget {
|
||||
const BaseWeekBar({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: new Row(
|
||||
children: getWeekDayWidget(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getWeekBarItem(int index);
|
||||
|
||||
List<Widget> getWeekDayWidget() {
|
||||
return List.generate(7, (index) {
|
||||
return getChild(index);
|
||||
});
|
||||
}
|
||||
|
||||
Widget getChild(int index) {
|
||||
return new Expanded(
|
||||
child: getWeekBarItem(index),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
class Constants {
|
||||
|
||||
//单选或者多选模式
|
||||
static const int MODE_SINGLE_SELECT = 1;
|
||||
static const int MODE_MULTI_SELECT = 2;
|
||||
|
||||
/**
|
||||
* 一周七天
|
||||
*/
|
||||
static const List<String> WEEK_LIST = [
|
||||
"周一",
|
||||
"周二",
|
||||
"周三",
|
||||
"周四",
|
||||
"周五",
|
||||
"周六",
|
||||
"周日"
|
||||
];
|
||||
|
||||
/**
|
||||
* 农历的月份
|
||||
*/
|
||||
static const List<String> LUNAR_MONTH_TEXT = [
|
||||
"春节",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"冬月",
|
||||
"腊月",
|
||||
];
|
||||
|
||||
/**
|
||||
* 农历的日期
|
||||
*/
|
||||
static const List<String> LUNAR_DAY_TEXT = [
|
||||
"初一",
|
||||
"初二",
|
||||
"初三",
|
||||
"初四",
|
||||
"初五",
|
||||
"初六",
|
||||
"初七",
|
||||
"初八",
|
||||
"初九",
|
||||
"初十",
|
||||
"十一",
|
||||
"十二",
|
||||
"十三",
|
||||
"十四",
|
||||
"十五",
|
||||
"十六",
|
||||
"十七",
|
||||
"十八",
|
||||
"十九",
|
||||
"二十",
|
||||
"廿一",
|
||||
"廿二",
|
||||
"廿三",
|
||||
"廿四",
|
||||
"廿五",
|
||||
"廿六",
|
||||
"廿七",
|
||||
"廿八",
|
||||
"廿九",
|
||||
"三十"
|
||||
];
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/base_day_view.dart';
|
||||
import 'package:flutter_custom_calendar/model/date_model.dart';
|
||||
import 'package:flutter_custom_calendar/style/style.dart';
|
||||
|
||||
/**
|
||||
* 默认的利用组合widget的方式构造item
|
||||
*/
|
||||
//class DefaultCombineDayWidget extends StatelessWidget {
|
||||
// DateModel dateModel;
|
||||
//
|
||||
// DefaultCombineDayWidget(this.dateModel);
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Container(
|
||||
// margin: EdgeInsets.only(top: 5, bottom: 5),
|
||||
// decoration: dateModel.isSelected
|
||||
// ? new BoxDecoration(color: Colors.red, shape: BoxShape.circle)
|
||||
// : null,
|
||||
// child: new Stack(
|
||||
// alignment: Alignment.center,
|
||||
// children: <Widget>[
|
||||
// new Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: <Widget>[
|
||||
// //公历
|
||||
// new Expanded(
|
||||
// child: Center(
|
||||
// child: new Text(
|
||||
// dateModel.day.toString(),
|
||||
// style: currentMonthTextStyle,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
//
|
||||
// //农历
|
||||
// new Expanded(
|
||||
// child: Center(
|
||||
// child: new Text(
|
||||
// "${dateModel.lunarString}",
|
||||
// style: lunarTextStyle,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//}
|
||||
|
||||
class DefaultCombineDayWidget extends BaseCombineDayWidget {
|
||||
DefaultCombineDayWidget(DateModel dateModel) : super(dateModel);
|
||||
|
||||
@override
|
||||
Widget getNormalWidget(DateModel dateModel) {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(8),
|
||||
child: new Stack(
|
||||
alignment: Alignment.center,
|
||||
children: <Widget>[
|
||||
new Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
//公历
|
||||
new Expanded(
|
||||
child: Center(
|
||||
child: new Text(
|
||||
dateModel.day.toString(),
|
||||
style: currentMonthTextStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
//农历
|
||||
new Expanded(
|
||||
child: Center(
|
||||
child: new Text(
|
||||
"${dateModel.lunarString}",
|
||||
style: lunarTextStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget getSelectedWidget(DateModel dateModel) {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(8),
|
||||
foregroundDecoration:
|
||||
new BoxDecoration(border: Border.all(width: 2, color: Colors.blue)),
|
||||
child: new Stack(
|
||||
alignment: Alignment.center,
|
||||
children: <Widget>[
|
||||
new Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
//公历
|
||||
new Expanded(
|
||||
child: Center(
|
||||
child: new Text(
|
||||
dateModel.day.toString(),
|
||||
style: currentMonthTextStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
//农历
|
||||
new Expanded(
|
||||
child: Center(
|
||||
child: new Text(
|
||||
"${dateModel.lunarString}",
|
||||
style: lunarTextStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/base_week_bar.dart';
|
||||
import 'package:flutter_custom_calendar/style/style.dart';
|
||||
import 'constants/constants.dart';
|
||||
|
||||
///**
|
||||
// * 顶部的固定的周显示
|
||||
// */
|
||||
//class DefaultWeekBar extends StatelessWidget {
|
||||
// const DefaultWeekBar({Key key}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Container(
|
||||
// child: new Row(
|
||||
// children: getWeekDayWidget(),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//List<Widget> getWeekDayWidget() {
|
||||
// return List.generate(7, (index) {
|
||||
// return getChild(Constants.WEEK_LIST[index]);
|
||||
// });
|
||||
//}
|
||||
//
|
||||
//Widget getChild(String title) {
|
||||
// return new Expanded(
|
||||
// child: new Container(
|
||||
// color: RandomColor.next(),
|
||||
// height: 40,
|
||||
// alignment: Alignment.center,
|
||||
// child: new Text(
|
||||
// title,
|
||||
// style: topWeekTextStyle,
|
||||
// ),
|
||||
// ));
|
||||
//}
|
||||
|
||||
class DefaultWeekBar extends BaseWeekBar {
|
||||
const DefaultWeekBar({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget getWeekBarItem(int index) {
|
||||
return new Container(
|
||||
height: 40,
|
||||
alignment: Alignment.center,
|
||||
child: new Text(
|
||||
Constants.WEEK_LIST[index],
|
||||
style: topWeekTextStyle,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/base_day_view.dart';
|
||||
import 'package:flutter_custom_calendar/base_week_bar.dart';
|
||||
import 'package:flutter_custom_calendar/calendar_view.dart';
|
||||
import 'package:flutter_custom_calendar/controller.dart';
|
||||
import 'package:flutter_custom_calendar/model/date_model.dart';
|
||||
|
||||
class CustomStylePage extends StatefulWidget {
|
||||
CustomStylePage({Key key, this.title}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
_CustomStylePageState createState() => _CustomStylePageState();
|
||||
}
|
||||
|
||||
class _CustomStylePageState extends State<CustomStylePage> {
|
||||
String text;
|
||||
|
||||
CalendarController controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
text = "${DateTime.now().year}年${DateTime.now().month}月";
|
||||
|
||||
controller = new CalendarController(weekBarItemWidgetBuilder: () {
|
||||
return CustomStyleWeekBarItem();
|
||||
}, dayWidgetBuilder: (dateModel) {
|
||||
return CustomStyleDayWidget(dateModel);
|
||||
});
|
||||
|
||||
controller.addMonthChangeListener(
|
||||
(year, month) {
|
||||
setState(() {
|
||||
text = "$year年$month月";
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
controller.addOnCalendarSelectListener((dateModel) {
|
||||
//刷新选择的时间
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: new Container(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_before),
|
||||
onPressed: () {
|
||||
controller.moveToPreviousMonth();
|
||||
}),
|
||||
new Text(text),
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_next),
|
||||
onPressed: () {
|
||||
controller.moveToNextMonth();
|
||||
}),
|
||||
],
|
||||
),
|
||||
CalendarViewWidget(
|
||||
calendarController: controller,
|
||||
),
|
||||
new Text(
|
||||
"自定义创建Item\n选中的时间:\n${controller.getSingleSelectCalendar().toString()}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {},
|
||||
tooltip: 'Increment',
|
||||
child: Icon(Icons.add),
|
||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomStyleWeekBarItem extends BaseWeekBar {
|
||||
List<String> weekList = ["一", "二", "三", "四", "五", "六", "日"];
|
||||
|
||||
@override
|
||||
Widget getWeekBarItem(int index) {
|
||||
return new Container(
|
||||
child: new Center(
|
||||
child: new Text(weekList[index]),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomStyleDayWidget extends BaseCustomDayWidget {
|
||||
CustomStyleDayWidget(DateModel dateModel) : super(dateModel);
|
||||
|
||||
@override
|
||||
void drawNormal(DateModel dateModel, Canvas canvas, Size size) {
|
||||
bool isWeekend = dateModel.isWeekend;
|
||||
bool isInRange = dateModel.isInRange;
|
||||
|
||||
//顶部的文字
|
||||
TextPainter dayTextPainter = new TextPainter()
|
||||
..text = TextSpan(
|
||||
text: dateModel.day.toString(),
|
||||
style: new TextStyle(
|
||||
color: !isInRange
|
||||
? Colors.grey
|
||||
: isWeekend ? Colors.blue : Colors.black,
|
||||
fontSize: 16))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
dayTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
dayTextPainter.paint(canvas, Offset(0, 10));
|
||||
|
||||
//下面的文字
|
||||
TextPainter lunarTextPainter = new TextPainter()
|
||||
..text = new TextSpan(
|
||||
text: dateModel.lunarString,
|
||||
style: new TextStyle(
|
||||
color: !isInRange
|
||||
? Colors.grey
|
||||
: isWeekend ? Colors.blue : Colors.grey,
|
||||
fontSize: 12))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
lunarTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
lunarTextPainter.paint(canvas, Offset(0, size.height / 2));
|
||||
}
|
||||
|
||||
@override
|
||||
void drawSelected(DateModel dateModel, Canvas canvas, Size size) {
|
||||
//绘制背景
|
||||
Paint backGroundPaint = new Paint()
|
||||
..color = Colors.blue
|
||||
..strokeWidth = 2;
|
||||
double padding = 8;
|
||||
canvas.drawCircle(Offset(size.width / 2, size.height / 2),
|
||||
(size.width - padding) / 2, backGroundPaint);
|
||||
|
||||
//顶部的文字
|
||||
TextPainter dayTextPainter = new TextPainter()
|
||||
..text = TextSpan(
|
||||
text: dateModel.day.toString(),
|
||||
style: new TextStyle(color: Colors.white, fontSize: 16))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
dayTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
dayTextPainter.paint(canvas, Offset(0, 10));
|
||||
|
||||
//下面的文字
|
||||
TextPainter lunarTextPainter = new TextPainter()
|
||||
..text = new TextSpan(
|
||||
text: dateModel.lunarString,
|
||||
style: new TextStyle(color: Colors.white, fontSize: 12))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
lunarTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
lunarTextPainter.paint(canvas, Offset(0, size.height / 2));
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/calendar_view.dart';
|
||||
import 'package:flutter_custom_calendar/controller.dart';
|
||||
|
||||
class DefaultStylePage extends StatefulWidget {
|
||||
DefaultStylePage({Key key, this.title}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
_DefaultStylePageState createState() => _DefaultStylePageState();
|
||||
}
|
||||
|
||||
class _DefaultStylePageState extends State<DefaultStylePage> {
|
||||
String text;
|
||||
|
||||
CalendarController controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
text = "${DateTime.now().year}年${DateTime.now().month}月";
|
||||
|
||||
controller = new CalendarController();
|
||||
|
||||
controller.addMonthChangeListener(
|
||||
(year, month) {
|
||||
setState(() {
|
||||
text = "$year年$month月";
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
controller.addOnCalendarSelectListener((dateModel) {
|
||||
//刷新选择的时间
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: new Container(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_before),
|
||||
onPressed: () {
|
||||
controller.moveToPreviousMonth();
|
||||
}),
|
||||
new Text(text),
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_next),
|
||||
onPressed: () {
|
||||
controller.moveToNextMonth();
|
||||
}),
|
||||
],
|
||||
),
|
||||
CalendarViewWidget(
|
||||
calendarController: controller,
|
||||
),
|
||||
new Text(
|
||||
"单选模式\n选中的时间:\n${controller.getSingleSelectCalendar().toString()}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {},
|
||||
tooltip: 'Increment',
|
||||
child: Icon(Icons.add),
|
||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/demo_page/custom_style_page.dart';
|
||||
import 'package:flutter_custom_calendar/demo_page/default_style_page.dart';
|
||||
import 'package:flutter_custom_calendar/demo_page/multi_select_style_page.dart';
|
||||
import 'package:flutter_custom_calendar/demo_page/progress_style_page.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
routes: <String, WidgetBuilder>{
|
||||
"/default": (context) => DefaultStylePage(
|
||||
title: "默认风格+单选",
|
||||
),
|
||||
"/custom": (context) => CustomStylePage(
|
||||
title: "自定义风格+单选",
|
||||
),
|
||||
"/multi_select": (context) => MultiSelectStylePage(
|
||||
title: "自定义风格+多选",
|
||||
),
|
||||
"/progress": (context) => ProgressStylePage(
|
||||
title: "进度条风格+单选",
|
||||
),
|
||||
},
|
||||
title: 'Flutter Demo',
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.blue,
|
||||
),
|
||||
home: HomePage());
|
||||
}
|
||||
}
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
body: SafeArea(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
new RaisedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, "/default");
|
||||
},
|
||||
child: new Text("默认风格+单选"),
|
||||
),
|
||||
new RaisedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, "/custom");
|
||||
},
|
||||
child: new Text("自定义风格+单选"),
|
||||
),
|
||||
new RaisedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, "/multi_select");
|
||||
},
|
||||
child: new Text("自定义风格+多选"),
|
||||
),
|
||||
new RaisedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, "/progress");
|
||||
},
|
||||
child: new Text("进度条风格+单选"),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,181 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/base_day_view.dart';
|
||||
import 'package:flutter_custom_calendar/base_week_bar.dart';
|
||||
import 'package:flutter_custom_calendar/calendar_view.dart';
|
||||
import 'package:flutter_custom_calendar/constants/constants.dart';
|
||||
import 'package:flutter_custom_calendar/controller.dart';
|
||||
import 'package:flutter_custom_calendar/model/date_model.dart';
|
||||
|
||||
class MultiSelectStylePage extends StatefulWidget {
|
||||
MultiSelectStylePage({Key key, this.title}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
_MultiSelectStylePageState createState() => _MultiSelectStylePageState();
|
||||
}
|
||||
|
||||
class _MultiSelectStylePageState extends State<MultiSelectStylePage> {
|
||||
String text;
|
||||
|
||||
CalendarController controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
text = "${DateTime.now().year}年${DateTime.now().month}月";
|
||||
|
||||
controller = new CalendarController(
|
||||
selectMode: Constants.MODE_MULTI_SELECT,
|
||||
maxMultiSelectCount: 5,
|
||||
minSelectYear: 2019,
|
||||
minSelectMonth: 5,
|
||||
minSelectDay: 20,
|
||||
weekBarItemWidgetBuilder: () {
|
||||
return CustomStyleWeekBarItem();
|
||||
},
|
||||
dayWidgetBuilder: (dateModel) {
|
||||
return CustomStyleDayWidget(dateModel);
|
||||
});
|
||||
|
||||
controller.addMonthChangeListener(
|
||||
(year, month) {
|
||||
setState(() {
|
||||
text = "$year年$month月";
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
controller.addOnCalendarSelectListener((dateModel) {
|
||||
//刷新选择的时间
|
||||
setState(() {});
|
||||
});
|
||||
|
||||
controller.addOnMultiSelectOutOfSizeListener((){
|
||||
print("超出限制个数");
|
||||
});
|
||||
controller.addOnMultiSelectOutOfRangeListener((){
|
||||
print("超出范围限制");
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: new Container(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_before),
|
||||
onPressed: () {
|
||||
controller.moveToPreviousMonth();
|
||||
}),
|
||||
new Text(text),
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_next),
|
||||
onPressed: () {
|
||||
controller.moveToNextMonth();
|
||||
}),
|
||||
],
|
||||
),
|
||||
CalendarViewWidget(
|
||||
calendarController: controller,
|
||||
),
|
||||
new Text(
|
||||
"多选模式\n选中的时间:\n${controller.getMultiSelectCalendar().toString()}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {},
|
||||
tooltip: 'Increment',
|
||||
child: Icon(Icons.add),
|
||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomStyleWeekBarItem extends BaseWeekBar {
|
||||
List<String> weekList = ["一", "二", "三", "四", "五", "六", "日"];
|
||||
|
||||
@override
|
||||
Widget getWeekBarItem(int index) {
|
||||
return new Container(
|
||||
child: new Center(
|
||||
child: new Text(weekList[index]),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomStyleDayWidget extends BaseCustomDayWidget {
|
||||
CustomStyleDayWidget(DateModel dateModel) : super(dateModel);
|
||||
|
||||
@override
|
||||
void drawNormal(DateModel dateModel, Canvas canvas, Size size) {
|
||||
bool isWeekend = dateModel.isWeekend;
|
||||
bool isInRange = dateModel.isInRange;
|
||||
|
||||
//顶部的文字
|
||||
TextPainter dayTextPainter = new TextPainter()
|
||||
..text = TextSpan(
|
||||
text: dateModel.day.toString(),
|
||||
style: new TextStyle(
|
||||
color: !isInRange ? Colors.grey : Colors.black, fontSize: 16))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
dayTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
dayTextPainter.paint(canvas, Offset(0, 10));
|
||||
|
||||
//下面的文字
|
||||
TextPainter lunarTextPainter = new TextPainter()
|
||||
..text = new TextSpan(
|
||||
text: dateModel.lunarString,
|
||||
style: new TextStyle(
|
||||
color: !isInRange ? Colors.grey : Colors.grey, fontSize: 12))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
lunarTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
lunarTextPainter.paint(canvas, Offset(0, size.height / 2));
|
||||
}
|
||||
|
||||
@override
|
||||
void drawSelected(DateModel dateModel, Canvas canvas, Size size) {
|
||||
//绘制背景
|
||||
Paint backGroundPaint = new Paint()
|
||||
..color = Colors.blue
|
||||
..strokeWidth = 2;
|
||||
double padding = 8;
|
||||
canvas.drawCircle(Offset(size.width / 2, size.height / 2),
|
||||
(size.width - padding) / 2, backGroundPaint);
|
||||
|
||||
//顶部的文字
|
||||
TextPainter dayTextPainter = new TextPainter()
|
||||
..text = TextSpan(
|
||||
text: dateModel.day.toString(),
|
||||
style: new TextStyle(color: Colors.white, fontSize: 16))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
dayTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
dayTextPainter.paint(canvas, Offset(0, 10));
|
||||
|
||||
//下面的文字
|
||||
TextPainter lunarTextPainter = new TextPainter()
|
||||
..text = new TextSpan(
|
||||
text: dateModel.lunarString,
|
||||
style: new TextStyle(color: Colors.white, fontSize: 12))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
lunarTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
lunarTextPainter.paint(canvas, Offset(0, size.height / 2));
|
||||
}
|
||||
}
|
@ -0,0 +1,215 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/base_day_view.dart';
|
||||
import 'package:flutter_custom_calendar/base_week_bar.dart';
|
||||
import 'package:flutter_custom_calendar/calendar_view.dart';
|
||||
import 'package:flutter_custom_calendar/controller.dart';
|
||||
import 'package:flutter_custom_calendar/model/date_model.dart';
|
||||
import 'dart:math';
|
||||
|
||||
class ProgressStylePage extends StatefulWidget {
|
||||
ProgressStylePage({Key key, this.title}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
_ProgressStylePageState createState() => _ProgressStylePageState();
|
||||
}
|
||||
|
||||
class _ProgressStylePageState extends State<ProgressStylePage> {
|
||||
String text;
|
||||
|
||||
CalendarController controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
text = "${DateTime.now().year}年${DateTime.now().month}月";
|
||||
|
||||
DateTime now = DateTime.now();
|
||||
DateTime temp = DateTime(now.year, now.month, now.day);
|
||||
|
||||
Map<DateTime, int> progressMap = {
|
||||
temp.add(Duration(days: 1)): 0,
|
||||
temp.add(Duration(days: 2)): 20,
|
||||
temp.add(Duration(days: 3)): 40,
|
||||
temp.add(Duration(days: 4)): 60,
|
||||
temp.add(Duration(days: 5)): 80,
|
||||
temp.add(Duration(days: 6)): 100,
|
||||
};
|
||||
|
||||
controller = new CalendarController(
|
||||
extraDataMap: progressMap,
|
||||
weekBarItemWidgetBuilder: () {
|
||||
return CustomStyleWeekBarItem();
|
||||
},
|
||||
dayWidgetBuilder: (dateModel) {
|
||||
return ProgressStyleDayWidget(dateModel);
|
||||
});
|
||||
|
||||
controller.addMonthChangeListener(
|
||||
(year, month) {
|
||||
setState(() {
|
||||
text = "$year年$month月";
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
controller.addOnCalendarSelectListener((dateModel) {
|
||||
//刷新选择的时间
|
||||
setState(() {});
|
||||
});
|
||||
|
||||
controller.addOnMultiSelectOutOfSizeListener(() {
|
||||
print("超出限制个数");
|
||||
});
|
||||
controller.addOnMultiSelectOutOfRangeListener(() {
|
||||
print("超出范围限制");
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(widget.title),
|
||||
),
|
||||
body: new Container(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_before),
|
||||
onPressed: () {
|
||||
controller.moveToPreviousMonth();
|
||||
}),
|
||||
new Text(text),
|
||||
new IconButton(
|
||||
icon: Icon(Icons.navigate_next),
|
||||
onPressed: () {
|
||||
controller.moveToNextMonth();
|
||||
}),
|
||||
],
|
||||
),
|
||||
CalendarViewWidget(
|
||||
calendarController: controller,
|
||||
),
|
||||
new Text(
|
||||
"单选模式\n选中的时间:\n${controller.getSingleSelectCalendar().toString()}"),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {},
|
||||
tooltip: 'Increment',
|
||||
child: Icon(Icons.add),
|
||||
), // This trailing comma makes auto-formatting nicer for build methods.
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomStyleWeekBarItem extends BaseWeekBar {
|
||||
List<String> weekList = ["一", "二", "三", "四", "五", "六", "日"];
|
||||
|
||||
@override
|
||||
Widget getWeekBarItem(int index) {
|
||||
return new Container(
|
||||
child: new Center(
|
||||
child: new Text(weekList[index]),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ProgressStyleDayWidget extends BaseCustomDayWidget {
|
||||
ProgressStyleDayWidget(DateModel dateModel) : super(dateModel);
|
||||
|
||||
@override
|
||||
void drawNormal(DateModel dateModel, Canvas canvas, Size size) {
|
||||
bool isInRange = dateModel.isInRange;
|
||||
|
||||
//进度条
|
||||
int progress = dateModel.extraData;
|
||||
if (progress != null && progress != 0) {
|
||||
double padding = 8;
|
||||
Paint paint = Paint()
|
||||
..color = Colors.grey
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 2;
|
||||
|
||||
canvas.drawCircle(Offset(size.width / 2, size.height / 2),
|
||||
(size.width - padding) / 2, paint);
|
||||
|
||||
paint.color = Colors.blue;
|
||||
|
||||
double startAngle = -90 * pi / 180;
|
||||
double sweepAngle = pi / 180 * (360 * progress / 100);
|
||||
|
||||
canvas.drawArc(
|
||||
Rect.fromCircle(
|
||||
center: Offset(size.width / 2, size.height / 2),
|
||||
radius: (size.width - padding) / 2),
|
||||
startAngle,
|
||||
sweepAngle,
|
||||
false,
|
||||
paint);
|
||||
}
|
||||
|
||||
//顶部的文字
|
||||
TextPainter dayTextPainter = new TextPainter()
|
||||
..text = TextSpan(
|
||||
text: dateModel.day.toString(),
|
||||
style: new TextStyle(
|
||||
color: !isInRange ? Colors.grey : Colors.black, fontSize: 16))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
dayTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
dayTextPainter.paint(canvas, Offset(0, 10));
|
||||
|
||||
//下面的文字
|
||||
TextPainter lunarTextPainter = new TextPainter()
|
||||
..text = new TextSpan(
|
||||
text: dateModel.lunarString,
|
||||
style: new TextStyle(
|
||||
color: !isInRange ? Colors.grey : Colors.grey, fontSize: 12))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
lunarTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
lunarTextPainter.paint(canvas, Offset(0, size.height / 2));
|
||||
}
|
||||
|
||||
@override
|
||||
void drawSelected(DateModel dateModel, Canvas canvas, Size size) {
|
||||
//绘制背景
|
||||
Paint backGroundPaint = new Paint()
|
||||
..color = Colors.blue
|
||||
..strokeWidth = 2;
|
||||
double padding = 8;
|
||||
canvas.drawCircle(Offset(size.width / 2, size.height / 2),
|
||||
(size.width - padding) / 2, backGroundPaint);
|
||||
|
||||
//顶部的文字
|
||||
TextPainter dayTextPainter = new TextPainter()
|
||||
..text = TextSpan(
|
||||
text: dateModel.day.toString(),
|
||||
style: new TextStyle(color: Colors.white, fontSize: 16))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
dayTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
dayTextPainter.paint(canvas, Offset(0, 10));
|
||||
|
||||
//下面的文字
|
||||
TextPainter lunarTextPainter = new TextPainter()
|
||||
..text = new TextSpan(
|
||||
text: dateModel.lunarString,
|
||||
style: new TextStyle(color: Colors.white, fontSize: 12))
|
||||
..textDirection = TextDirection.ltr
|
||||
..textAlign = TextAlign.center;
|
||||
|
||||
lunarTextPainter.layout(minWidth: size.width, maxWidth: size.width);
|
||||
lunarTextPainter.paint(canvas, Offset(0, size.height / 2));
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
export 'package:flutter_custom_calendar/controller.dart';
|
||||
export 'package:flutter_custom_calendar/calendar_view.dart';
|
||||
export 'package:flutter_custom_calendar/base_day_view.dart';
|
||||
export 'package:flutter_custom_calendar/base_week_bar.dart';
|
||||
export 'package:flutter_custom_calendar/constants/constants.dart';
|
||||
export 'package:flutter_custom_calendar/model/date_model.dart';
|
||||
export 'package:flutter_custom_calendar/default_combine_day_view.dart';
|
||||
export 'package:flutter_custom_calendar/default_custom_day_view.dart';
|
||||
export 'package:flutter_custom_calendar/default_week_bar.dart';
|
@ -0,0 +1,7 @@
|
||||
library flutter_custom_calendar;
|
||||
|
||||
/// A Calculator.
|
||||
class Calculator {
|
||||
/// Returns [value] plus 1.
|
||||
int addOne(int value) => value + 1;
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_custom_calendar/controller.dart';
|
||||
import 'package:flutter_custom_calendar/default_custom_day_view.dart';
|
||||
import 'package:flutter_custom_calendar/default_combine_day_view.dart';
|
||||
import 'package:flutter_custom_calendar/model/date_model.dart';
|
||||
import 'package:flutter_custom_calendar/month_view.dart';
|
||||
|
||||
class MonthViewPager extends StatefulWidget {
|
||||
final OnMonthChange monthChange;
|
||||
final OnCalendarSelect calendarSelect;
|
||||
final DayWidgetBuilder dayWidgetBuilder;
|
||||
OnMultiSelectOutOfRange multiSelectOutOfRange; //多选超出指定范围
|
||||
OnMultiSelectOutOfSize multiSelectOutOfSize; //多选超出限制个数
|
||||
|
||||
Set<DateModel> selectedDateList; //被选中的日期,用于多选
|
||||
DateModel selectDateModel; //当前选择项,用于单选
|
||||
|
||||
final List<DateModel> monthList;
|
||||
PageController pageController;
|
||||
|
||||
DateModel minSelectDate;
|
||||
DateModel maxSelectDate;
|
||||
|
||||
int selectMode;
|
||||
int maxMultiSelectCount;
|
||||
|
||||
Map<DateTime, Object> extraDataMap ; //自定义额外的数据
|
||||
|
||||
MonthViewPager(
|
||||
{this.monthChange,
|
||||
this.calendarSelect,
|
||||
this.monthList,
|
||||
this.pageController,
|
||||
this.selectedDateList,
|
||||
this.selectDateModel,
|
||||
this.dayWidgetBuilder,
|
||||
this.minSelectDate,
|
||||
this.maxSelectDate,
|
||||
this.selectMode,
|
||||
this.maxMultiSelectCount,
|
||||
this.multiSelectOutOfRange,
|
||||
this.multiSelectOutOfSize,
|
||||
this.extraDataMap});
|
||||
|
||||
@override
|
||||
_MonthViewPagerState createState() => _MonthViewPagerState();
|
||||
}
|
||||
|
||||
class _MonthViewPagerState extends State<MonthViewPager> {
|
||||
@override
|
||||
void initState() {}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: PageView.builder(
|
||||
onPageChanged: (position) {
|
||||
//月份的变化
|
||||
DateModel dateModel = widget.monthList[position];
|
||||
widget.monthChange(dateModel.year, dateModel.month);
|
||||
},
|
||||
controller: widget.pageController,
|
||||
itemBuilder: (context, index) {
|
||||
DateModel dateModel = widget.monthList[index];
|
||||
return new MonthView(
|
||||
selectMode: widget.selectMode,
|
||||
year: dateModel.year,
|
||||
month: dateModel.month,
|
||||
selectDateModel: widget.selectDateModel,
|
||||
selectedDateList: widget.selectedDateList,
|
||||
onCalendarSelectListener: widget.calendarSelect,
|
||||
dayWidgetBuilder: widget.dayWidgetBuilder,
|
||||
minSelectDate: widget.minSelectDate,
|
||||
maxSelectDate: widget.maxSelectDate,
|
||||
maxMultiSelectCount: widget.maxMultiSelectCount,
|
||||
multiSelectOutOfRange: widget.multiSelectOutOfRange,
|
||||
multiSelectOutOfSize: widget.multiSelectOutOfSize,
|
||||
extraDataMap: widget.extraDataMap,
|
||||
);
|
||||
},
|
||||
itemCount: widget.monthList.length,
|
||||
),
|
||||
);
|
||||
|
||||
// return SliverFillViewport(
|
||||
// delegate: SliverChildBuilderDelegate((context, index) {
|
||||
// DateModel dateModel = widget.monthList[index];
|
||||
// return new MonthView(
|
||||
// year: dateModel.year,
|
||||
// month: dateModel.month,
|
||||
// selectDateModel: widget.selectDateModel,
|
||||
// selectedDateList: widget.selectedDateList,
|
||||
// onCalendarSelectListener: widget.calendarSelect,
|
||||
// );
|
||||
// }, childCount: widget.monthList.length),
|
||||
// );
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
//顶部7天的文案
|
||||
TextStyle topWeekTextStyle=new TextStyle(fontSize: 12);
|
||||
|
||||
//当前月份的日期的文字
|
||||
TextStyle currentMonthTextStyle =
|
||||
new TextStyle(color: Colors.black, fontSize: 16);
|
||||
|
||||
//下一个月或者上一个月的日期的文字
|
||||
TextStyle preOrNextMonthTextStyle =
|
||||
new TextStyle(color: Colors.grey, fontSize: 18);
|
||||
|
||||
//农历的字体
|
||||
TextStyle lunarTextStyle = new TextStyle(color: Colors.grey, fontSize: 12);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,139 @@
|
||||
# Generated by pub
|
||||
# See https://www.dartlang.org/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.14.11"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.12.5"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.6.2"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pedantic
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: quiver
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.5.5"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.9.3"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.2.4"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.8"
|
||||
sdks:
|
||||
dart: ">=2.2.0 <3.0.0"
|
@ -0,0 +1,53 @@
|
||||
name: flutter_custom_calendar
|
||||
description: A new Flutter Calendar package.
|
||||
version: 0.0.1
|
||||
author: xiaodong<450468291@qq.com>
|
||||
homepage: https://github.com/LXD312569496/flutter_custom_calendar
|
||||
|
||||
environment:
|
||||
sdk: ">=2.1.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://www.dartlang.org/tools/pub/pubspec
|
||||
|
||||
# The following section is specific to Flutter.
|
||||
flutter:
|
||||
|
||||
# To add assets to your package, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
#
|
||||
# For details regarding assets in packages, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
#
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
||||
# To add custom fonts to your package, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
# list giving the asset and other descriptors for the font. For
|
||||
# example:
|
||||
# fonts:
|
||||
# - family: Schyler
|
||||
# fonts:
|
||||
# - asset: fonts/Schyler-Regular.ttf
|
||||
# - asset: fonts/Schyler-Italic.ttf
|
||||
# style: italic
|
||||
# - family: Trajan Pro
|
||||
# fonts:
|
||||
# - asset: fonts/TrajanPro.ttf
|
||||
# - asset: fonts/TrajanPro_Bold.ttf
|
||||
# weight: 700
|
||||
#
|
||||
# For details regarding fonts in packages, see
|
||||
# https://flutter.dev/custom-fonts/#from-packages
|
@ -0,0 +1,13 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:flutter_custom_calendar/flutter_custom_calendar.dart';
|
||||
|
||||
void main() {
|
||||
test('adds one to input values', () {
|
||||
final calculator = Calculator();
|
||||
expect(calculator.addOne(2), 3);
|
||||
expect(calculator.addOne(-7), -6);
|
||||
expect(calculator.addOne(0), 1);
|
||||
expect(() => calculator.addOne(null), throwsNoSuchMethodError);
|
||||
});
|
||||
}
|
Loading…
Reference in new issue