├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutter_calendar │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── calendar.gif ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── main.m ├── lib ├── calendar_list.dart ├── calendar_notification.dart ├── day_number.dart ├── fullscreen_demo.dart ├── main.dart ├── month_title.dart ├── month_view.dart ├── utils │ ├── dates.dart │ └── screen_sizes.dart └── weekday_row.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/ServiceDefinitions.json 65 | **/ios/Runner/GeneratedPluginRegistrant.* 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 20e59316b8b8474554b38493b8ca888794b0234a 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter实现一个酷炫带动画的列表型多选日历组件 2 | 3 | 由于项目需要,用Flutter重构了之前用Android做过的日历组件,整体效果感觉不错,流畅度甚至超过原来的,这里需要提一下官网的做法,如下: 4 | 5 | ``` 6 | var date = DateTime.now(); 7 | return showDatePicker( 8 | context: context, 9 | initialDate: date, 10 | firstDate: date, 11 | lastDate: date.add( 12 | Duration(days: 30), 13 | ), 14 | ); 15 | ``` 16 | 17 | 官方的做法就是showDatePicker实现的,支持MD和IOS的风格,但据我了解,只支持单选,不支持开始和结束日期的区间选择,体验也与我需要的效果不一致,所以经过考虑之后,还是决定自己写一个。 18 | 19 | ## 先上效果图 20 | ![](https://raw.githubusercontent.com/heruijun/flutter_calendar_list/master/calendar.gif) 21 | 22 | ## 实现的功能和需求 23 | 1. 绘制“日”,“月”,“年”组件,年嵌套多个月,月嵌套多个周,然后再是天 24 | 2. 绘制日历头部与底部确认选择按钮 25 | 3. 支持某一天单选,开始日期和结束日期多选,反向选择(先选结束日期再选开始日期),跨月选择,取消选择等事件 26 | 4. 对外暴露CalendarList组件,这个组件是List类型,也就是说它是多个月的集合 27 | 28 | 下面分段对部分代码进行描述。 29 | 30 | ## 先从调用入口进行分析 31 | 下面就是一个日历选择组件的调用方式: 32 | 33 | ``` 34 | return CalendarList( 35 | firstDate: DateTime(2019, 8), 36 | lastDate: DateTime(2020, 8), 37 | selectedStartDate: DateTime(2019, 8, 28), 38 | selectedEndDate: DateTime(2019, 9, 2), 39 | onSelectFinish: (selectStartTime, selectEndTime) { 40 | List result = []; 41 | result.add(selectStartTime); 42 | if (selectEndTime != null) { 43 | result.add(selectEndTime); 44 | } 45 | Navigator.pop(context, result); 46 | }, 47 | ); 48 | ``` 49 | 50 | 其中firstDate和lastDate是选择的月份列表,本例中,从2019年8月开始算起,结束时间是2020年8月,然后又有2个参数selectedStartDate和selectedEndDate,这2个参数是给定的默认选中区间,本例中默认选中了2019/8/28和2019/9/2之间的所有日期,默认选中一般是记录用户上次选中的结果。onSelectFinish就是选完之后的回调,以上这些参数是根据实际业务可以灵活设置的。 51 | 52 | ## 底部弹出方式的日期方式 53 | 这块其实很简单,CalendarList本身就支持从底部滑出,调用的方法是showModalBottomSheet,代码如下: 54 | 55 | ``` 56 | showModalBottomSheet( 57 | context: context, 58 | builder: (BuildContext context) { 59 | return Container( 60 | height: 600.0, 61 | child: FullScreenDemo(), 62 | ); 63 | }, 64 | ).then((result) { 65 | setState(() { 66 | selectResult2 = result; 67 | }); 68 | }); 69 | ``` 70 | 71 | 其中日历放在了FullScreenDemo里,通过Container包一层设置一个高度,然后就可以通过showModalBottomSheet方法从底部滑出。 72 | 73 | ## CalendarList滚动列表绘制 74 | 通过上面的讲述,我们了解了如何使用CalendarList组件,那么我们看看源码里面具体做了哪些。笔者在实现该功能时把MonthView作为SliverList的一个build item。放置到CustomScrollView的Sliver里面,这里复习一下,Sliver的作用其实就是“粘合剂”的作用,把多个组件粘合起来形成一个滚动区域,布局如下: 75 | 76 | ``` 77 | CustomScrollView( 78 | slivers: [ 79 | SliverList( 80 | delegate: SliverChildBuilderDelegate( 81 | (BuildContext context, int index) { 82 | int month = index + monthStart; 83 | DateTime calendarDateTime = DateTime(yearStart, month); 84 | return _getMonthView(calendarDateTime); 85 | }, 86 | childCount: count, 87 | ), 88 | ), 89 | ], 90 | ), 91 | ``` 92 | 93 | 在BuildContext中,通过index与monthStart想加,计算出日历,即8,9,10,11...这些月份,需要注意的是DateTime里面传入的month参数如果超过了12,则前面的年会自动“进位”(Flutter设置的太贴心了),好了,在_getMonthView里面,我们看看return了一个什么样的Widget,代码如下: 94 | 95 | ``` 96 | Widget _getMonthView(DateTime dateTime) { 97 | int year = dateTime.year; 98 | int month = dateTime.month; 99 | return MonthView( 100 | context: context, 101 | year: year, 102 | month: month, 103 | padding: HORIZONTAL_PADDING, 104 | dateTimeStart: selectStartTime, 105 | dateTimeEnd: selectEndTime, 106 | todayColor: Colors.deepOrange, 107 | onSelectDayRang: (dateTime) => onSelectDayChanged(dateTime), 108 | ); 109 | } 110 | ``` 111 | 112 | 好,这里就是传入了MonthView,设置了年、月,dateTimeStart,dateTimeEnd,today高亮颜色这些参数。下面,我们看看MonthView里面又做了啥 113 | 114 | ## MonthView绘制 115 | MonthView其实就是真正绘制每个月有多少个星期,然后每个星期的7天展示,通过每行(Row)放置7个DayNumber组件,根据每周循环出整个月的数据,代码片段如下: 116 | 117 | ``` 118 | dayRowChildren.add( 119 | DayNumber( 120 | size: widget.itemWidth, 121 | day: day, 122 | isToday: isToday, 123 | isDefaultSelected: isDefaultSelected, 124 | todayColor: widget.todayColor, 125 | onDayTap: (day) { 126 | selectedDate = DateTime(widget.year, widget.month, day); 127 | widget.onSelectDayRang(selectedDate); 128 | }, 129 | ), 130 | ); 131 | 132 | if ((day - 1 + firstWeekdayOfMonth) % DateTime.daysPerWeek == 0 || 133 | day == daysInMonth) { 134 | dayRows.add( 135 | Row( 136 | children: List.from(dayRowChildren), 137 | ), 138 | ); 139 | dayRowChildren.clear(); 140 | } 141 | ``` 142 | 143 | 这样,一个日历就出来了,不过光有这些是不行的,因为还没开始做选择器,即(单选,多选,反选,取消这些),需要高亮出来,高亮的逻辑大致如下: 144 | 145 | ``` 146 | DateTime moment = DateTime(widget.year, widget.month, day); 147 | final bool isToday = dateIsToday(moment); 148 | 149 | bool isDefaultSelected = false; 150 | if (widget.dateTimeStart == null && 151 | widget.dateTimeEnd == null && 152 | selectedDate == null) { 153 | isDefaultSelected = false; 154 | } 155 | if (widget.dateTimeStart == selectedDate && 156 | widget.dateTimeEnd == null && 157 | selectedDate?.day == day && 158 | day > 0) { 159 | isDefaultSelected = true; 160 | } 161 | if (widget.dateTimeStart != null && widget.dateTimeEnd != null) { 162 | isDefaultSelected = (moment.isAtSameMomentAs(widget.dateTimeStart) || 163 | moment.isAtSameMomentAs(widget.dateTimeEnd)) || 164 | moment.isAfter(widget.dateTimeStart) && 165 | moment.isBefore(widget.dateTimeEnd) && 166 | day > 0 167 | ? true 168 | : false; 169 | } 170 | ``` 171 | 172 | 上述代码可以说是一部分核心逻辑,会根据CalendarList传入的选择区间通过DateTime moment进行筛选,如果是在区间范围内,则选中该区间,猜猜怎么让DayNumber高亮起来? 173 | OK,其实知道了高亮区间之后,在DayNumber里就可以传入默认选中isDefaultSelected,下面,我们看看DayNumber又做了啥 174 | 175 | ## DayNumber绘制 176 | 和CalendarList,MonthView比起来,DayNumber就是小弟了,具体的绘制代码如下: 177 | 178 | ``` 179 | Widget _dayItem() { 180 | return Container( 181 | width: widget.size - itemMargin * 2, 182 | height: widget.size - itemMargin * 2, 183 | margin: EdgeInsets.all(itemMargin), 184 | alignment: Alignment.center, 185 | decoration: (isSelected && widget.day > 0) 186 | ? BoxDecoration(color: Colors.blue) 187 | : widget.isToday ? BoxDecoration(color: widget.todayColor) : null, 188 | child: Text( 189 | widget.day < 1 ? '' : widget.day.toString(), 190 | textAlign: TextAlign.center, 191 | style: TextStyle( 192 | color: (widget.isToday || isSelected) ? Colors.white : Colors.black87, 193 | fontSize: 15.0, 194 | fontWeight: FontWeight.normal, 195 | ), 196 | ), 197 | ); 198 | } 199 | ``` 200 | 201 | 其中Container里面声明了decoration,通过BoxDecoration设置了背景色,代码中把选中的效果优先于today高亮色,这样就可以覆盖当天的颜色,具体的Day则是Text绘制的。 202 | 203 | 通过上面的描述,我们了解了Calendar,MonthView,DayNumber三者的关系,核心代码差不多就这些吧。 204 | 205 | 下面,我们再看看单选,多选,反选,取消这些逻辑是怎么实现的 206 | 207 | ## 单选,多选,反选,取消逻辑实现 208 | 代码有点长,先贴出来,然后我们分析一下: 209 | 210 | ``` 211 | // 选项处理回调 212 | void onSelectDayChanged(dateTime) { 213 | if (selectStartTime == null && selectEndTime == null) { 214 | selectStartTime = dateTime; 215 | } else if (selectStartTime != null && selectEndTime == null) { 216 | selectEndTime = dateTime; 217 | // 如果选择的开始日期和结束日期相等,则清除选项 218 | if (selectStartTime == selectEndTime) { 219 | setState(() { 220 | selectStartTime = null; 221 | selectEndTime = null; 222 | }); 223 | return; 224 | } 225 | // 如果用户反选,则交换开始和结束日期 226 | if (selectStartTime?.isAfter(selectEndTime)) { 227 | DateTime temp = selectStartTime; 228 | selectStartTime = selectEndTime; 229 | selectEndTime = temp; 230 | } 231 | } else if (selectStartTime != null && selectEndTime != null) { 232 | selectStartTime = null; 233 | selectEndTime = null; 234 | selectStartTime = dateTime; 235 | } 236 | setState(() { 237 | selectStartTime; 238 | selectEndTime; 239 | }); 240 | } 241 | ``` 242 | 243 | onSelectDayChanged其实就是对用户点击DayNumber行为的事件回调,这是一个典型的子组件调用父组件改变其状态的代码段,通过selectStartTime和selectEndTime是否为null判断用户的点击行为落在哪个if else里面,通过setState重新设置开始和结束日期,这样就可以“刷新”MonthView里面的DayNumber选择范围,好了,大致的核心源码就分析到这里。 244 | 245 | ## 总结一下,通过本例可以学习到以下知识点 246 | 1. 路由参数传递和参数回传 247 | 2. 父子组件正向与逆向通信 248 | 3. 日期函数DateTime的运用 249 | 4. Sliver在CustomScrollView中的运用 250 | 5. 日历绘制方式 251 | 6. 底部弹出组件使用方式 252 | 7. 其他各种布局技巧及细节 253 | 254 | ## 可以改善的地方 255 | 1. 国际化支持 256 | 2. 自定义颜色传入 257 | 3. 后续发布到Flutter Pub 258 | 259 | ## 代码地址 260 | 本例中相关的代码放在 261 | 262 | github地址:[https://github.com/heruijun/flutter_calendar_list](https://github.com/heruijun/flutter_calendar_list) 263 | 264 | 此例已经作为补充内容添加至我的《Flutter从0到1构建大前端应用》一书的源码中,是一个知识点比较多的综合案例,再版时会根据读者意见考虑加入到书中讲解。 265 | 266 | ## 新书推荐 267 | 大家好,下面插播一条广告,我是《Flutter从0到1构建大前端应用》的作者,感谢已经购买的读者,此书属于入门上手的书籍,以简单明了的代码实例说明问题,也便于读者查阅相关内容。 268 | 269 | ![](https://img14.360buyimg.com/n1/jfs/t1/55763/28/4089/173115/5d1d7041E7d6bc656/d681b55e89bac6f6.jpg) 270 | 271 | 从Flutter基础开始讲解,结合实际案例,让读者逐步掌握Flutter的核心内容,实战项目篇又通过2个实战项目让读者除了掌握Flutter相关知识之外,对node、mongo,vue做了一些介绍,可以让更多的读者拥抱目前最火的大前端技术。 272 | 273 | 京东购买链接:[https://item.jd.com/12546599.html](https://item.jd.com/12546599.html) -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.flutter_calendar" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/flutter_calendar/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutter_calendar; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/calendar.gif -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXCopyFilesBuildPhase section */ 25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 26 | isa = PBXCopyFilesBuildPhase; 27 | buildActionMask = 2147483647; 28 | dstPath = ""; 29 | dstSubfolderSpec = 10; 30 | files = ( 31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 33 | ); 34 | name = "Embed Frameworks"; 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 46 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 47 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 48 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 49 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 50 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 9740EEB11CF90186004384FC /* Flutter */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 3B80C3931E831B6300D905FE /* App.framework */, 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 77 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 78 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 79 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 80 | ); 81 | name = Flutter; 82 | sourceTree = ""; 83 | }; 84 | 97C146E51CF9000F007C117D = { 85 | isa = PBXGroup; 86 | children = ( 87 | 9740EEB11CF90186004384FC /* Flutter */, 88 | 97C146F01CF9000F007C117D /* Runner */, 89 | 97C146EF1CF9000F007C117D /* Products */, 90 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 106 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 107 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 108 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 109 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 110 | 97C147021CF9000F007C117D /* Info.plist */, 111 | 97C146F11CF9000F007C117D /* Supporting Files */, 112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 97C146F21CF9000F007C117D /* main.m */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | 97C146ED1CF9000F007C117D /* Runner */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 132 | buildPhases = ( 133 | 9740EEB61CF901F6004384FC /* Run Script */, 134 | 97C146EA1CF9000F007C117D /* Sources */, 135 | 97C146EB1CF9000F007C117D /* Frameworks */, 136 | 97C146EC1CF9000F007C117D /* Resources */, 137 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 138 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = Runner; 145 | productName = Runner; 146 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | /* End PBXNativeTarget section */ 150 | 151 | /* Begin PBXProject section */ 152 | 97C146E61CF9000F007C117D /* Project object */ = { 153 | isa = PBXProject; 154 | attributes = { 155 | LastUpgradeCheck = 1020; 156 | ORGANIZATIONNAME = "The Chromium Authors"; 157 | TargetAttributes = { 158 | 97C146ED1CF9000F007C117D = { 159 | CreatedOnToolsVersion = 7.3.1; 160 | }; 161 | }; 162 | }; 163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 164 | compatibilityVersion = "Xcode 3.2"; 165 | developmentRegion = en; 166 | hasScannedForEncodings = 0; 167 | knownRegions = ( 168 | en, 169 | Base, 170 | ); 171 | mainGroup = 97C146E51CF9000F007C117D; 172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 173 | projectDirPath = ""; 174 | projectRoot = ""; 175 | targets = ( 176 | 97C146ED1CF9000F007C117D /* Runner */, 177 | ); 178 | }; 179 | /* End PBXProject section */ 180 | 181 | /* Begin PBXResourcesBuildPhase section */ 182 | 97C146EC1CF9000F007C117D /* Resources */ = { 183 | isa = PBXResourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 190 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXResourcesBuildPhase section */ 195 | 196 | /* Begin PBXShellScriptBuildPhase section */ 197 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 198 | isa = PBXShellScriptBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | inputPaths = ( 203 | ); 204 | name = "Thin Binary"; 205 | outputPaths = ( 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | shellPath = /bin/sh; 209 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 210 | }; 211 | 9740EEB61CF901F6004384FC /* Run Script */ = { 212 | isa = PBXShellScriptBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | inputPaths = ( 217 | ); 218 | name = "Run Script"; 219 | outputPaths = ( 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | shellPath = /bin/sh; 223 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 224 | }; 225 | /* End PBXShellScriptBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 97C146EA1CF9000F007C117D /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 233 | 97C146F31CF9000F007C117D /* main.m in Sources */, 234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXSourcesBuildPhase section */ 239 | 240 | /* Begin PBXVariantGroup section */ 241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 242 | isa = PBXVariantGroup; 243 | children = ( 244 | 97C146FB1CF9000F007C117D /* Base */, 245 | ); 246 | name = Main.storyboard; 247 | sourceTree = ""; 248 | }; 249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 250 | isa = PBXVariantGroup; 251 | children = ( 252 | 97C147001CF9000F007C117D /* Base */, 253 | ); 254 | name = LaunchScreen.storyboard; 255 | sourceTree = ""; 256 | }; 257 | /* End PBXVariantGroup section */ 258 | 259 | /* Begin XCBuildConfiguration section */ 260 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 261 | isa = XCBuildConfiguration; 262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_ANALYZER_NONNULL = YES; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 271 | CLANG_WARN_BOOL_CONVERSION = YES; 272 | CLANG_WARN_COMMA = YES; 273 | CLANG_WARN_CONSTANT_CONVERSION = YES; 274 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_EMPTY_BODY = YES; 277 | CLANG_WARN_ENUM_CONVERSION = YES; 278 | CLANG_WARN_INFINITE_RECURSION = YES; 279 | CLANG_WARN_INT_CONVERSION = YES; 280 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 281 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 282 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 283 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 284 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 285 | CLANG_WARN_STRICT_PROTOTYPES = YES; 286 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 287 | CLANG_WARN_UNREACHABLE_CODE = YES; 288 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 289 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 290 | COPY_PHASE_STRIP = NO; 291 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 292 | ENABLE_NS_ASSERTIONS = NO; 293 | ENABLE_STRICT_OBJC_MSGSEND = YES; 294 | GCC_C_LANGUAGE_STANDARD = gnu99; 295 | GCC_NO_COMMON_BLOCKS = YES; 296 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 297 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 298 | GCC_WARN_UNDECLARED_SELECTOR = YES; 299 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 300 | GCC_WARN_UNUSED_FUNCTION = YES; 301 | GCC_WARN_UNUSED_VARIABLE = YES; 302 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 303 | MTL_ENABLE_DEBUG_INFO = NO; 304 | SDKROOT = iphoneos; 305 | TARGETED_DEVICE_FAMILY = "1,2"; 306 | VALIDATE_PRODUCT = YES; 307 | }; 308 | name = Profile; 309 | }; 310 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 311 | isa = XCBuildConfiguration; 312 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 313 | buildSettings = { 314 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 315 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 316 | DEVELOPMENT_TEAM = S8QB4VV633; 317 | ENABLE_BITCODE = NO; 318 | FRAMEWORK_SEARCH_PATHS = ( 319 | "$(inherited)", 320 | "$(PROJECT_DIR)/Flutter", 321 | ); 322 | INFOPLIST_FILE = Runner/Info.plist; 323 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 324 | LIBRARY_SEARCH_PATHS = ( 325 | "$(inherited)", 326 | "$(PROJECT_DIR)/Flutter", 327 | ); 328 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterCalendar; 329 | PRODUCT_NAME = "$(TARGET_NAME)"; 330 | VERSIONING_SYSTEM = "apple-generic"; 331 | }; 332 | name = Profile; 333 | }; 334 | 97C147031CF9000F007C117D /* Debug */ = { 335 | isa = XCBuildConfiguration; 336 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 337 | buildSettings = { 338 | ALWAYS_SEARCH_USER_PATHS = NO; 339 | CLANG_ANALYZER_NONNULL = YES; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 345 | CLANG_WARN_BOOL_CONVERSION = YES; 346 | CLANG_WARN_COMMA = YES; 347 | CLANG_WARN_CONSTANT_CONVERSION = YES; 348 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 349 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 350 | CLANG_WARN_EMPTY_BODY = YES; 351 | CLANG_WARN_ENUM_CONVERSION = YES; 352 | CLANG_WARN_INFINITE_RECURSION = YES; 353 | CLANG_WARN_INT_CONVERSION = YES; 354 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 359 | CLANG_WARN_STRICT_PROTOTYPES = YES; 360 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 364 | COPY_PHASE_STRIP = NO; 365 | DEBUG_INFORMATION_FORMAT = dwarf; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | ENABLE_TESTABILITY = YES; 368 | GCC_C_LANGUAGE_STANDARD = gnu99; 369 | GCC_DYNAMIC_NO_PIC = NO; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_OPTIMIZATION_LEVEL = 0; 372 | GCC_PREPROCESSOR_DEFINITIONS = ( 373 | "DEBUG=1", 374 | "$(inherited)", 375 | ); 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 383 | MTL_ENABLE_DEBUG_INFO = YES; 384 | ONLY_ACTIVE_ARCH = YES; 385 | SDKROOT = iphoneos; 386 | TARGETED_DEVICE_FAMILY = "1,2"; 387 | }; 388 | name = Debug; 389 | }; 390 | 97C147041CF9000F007C117D /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 393 | buildSettings = { 394 | ALWAYS_SEARCH_USER_PATHS = NO; 395 | CLANG_ANALYZER_NONNULL = YES; 396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 397 | CLANG_CXX_LIBRARY = "libc++"; 398 | CLANG_ENABLE_MODULES = YES; 399 | CLANG_ENABLE_OBJC_ARC = YES; 400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 401 | CLANG_WARN_BOOL_CONVERSION = YES; 402 | CLANG_WARN_COMMA = YES; 403 | CLANG_WARN_CONSTANT_CONVERSION = YES; 404 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 406 | CLANG_WARN_EMPTY_BODY = YES; 407 | CLANG_WARN_ENUM_CONVERSION = YES; 408 | CLANG_WARN_INFINITE_RECURSION = YES; 409 | CLANG_WARN_INT_CONVERSION = YES; 410 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 412 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 414 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 415 | CLANG_WARN_STRICT_PROTOTYPES = YES; 416 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 417 | CLANG_WARN_UNREACHABLE_CODE = YES; 418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 420 | COPY_PHASE_STRIP = NO; 421 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 422 | ENABLE_NS_ASSERTIONS = NO; 423 | ENABLE_STRICT_OBJC_MSGSEND = YES; 424 | GCC_C_LANGUAGE_STANDARD = gnu99; 425 | GCC_NO_COMMON_BLOCKS = YES; 426 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 427 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 428 | GCC_WARN_UNDECLARED_SELECTOR = YES; 429 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 430 | GCC_WARN_UNUSED_FUNCTION = YES; 431 | GCC_WARN_UNUSED_VARIABLE = YES; 432 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 433 | MTL_ENABLE_DEBUG_INFO = NO; 434 | SDKROOT = iphoneos; 435 | TARGETED_DEVICE_FAMILY = "1,2"; 436 | VALIDATE_PRODUCT = YES; 437 | }; 438 | name = Release; 439 | }; 440 | 97C147061CF9000F007C117D /* Debug */ = { 441 | isa = XCBuildConfiguration; 442 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 443 | buildSettings = { 444 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterCalendar; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | VERSIONING_SYSTEM = "apple-generic"; 460 | }; 461 | name = Debug; 462 | }; 463 | 97C147071CF9000F007C117D /* Release */ = { 464 | isa = XCBuildConfiguration; 465 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 466 | buildSettings = { 467 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 468 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 469 | ENABLE_BITCODE = NO; 470 | FRAMEWORK_SEARCH_PATHS = ( 471 | "$(inherited)", 472 | "$(PROJECT_DIR)/Flutter", 473 | ); 474 | INFOPLIST_FILE = Runner/Info.plist; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 476 | LIBRARY_SEARCH_PATHS = ( 477 | "$(inherited)", 478 | "$(PROJECT_DIR)/Flutter", 479 | ); 480 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterCalendar; 481 | PRODUCT_NAME = "$(TARGET_NAME)"; 482 | VERSIONING_SYSTEM = "apple-generic"; 483 | }; 484 | name = Release; 485 | }; 486 | /* End XCBuildConfiguration section */ 487 | 488 | /* Begin XCConfigurationList section */ 489 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 490 | isa = XCConfigurationList; 491 | buildConfigurations = ( 492 | 97C147031CF9000F007C117D /* Debug */, 493 | 97C147041CF9000F007C117D /* Release */, 494 | 249021D3217E4FDB00AE95B9 /* Profile */, 495 | ); 496 | defaultConfigurationIsVisible = 0; 497 | defaultConfigurationName = Release; 498 | }; 499 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 500 | isa = XCConfigurationList; 501 | buildConfigurations = ( 502 | 97C147061CF9000F007C117D /* Debug */, 503 | 97C147071CF9000F007C117D /* Release */, 504 | 249021D4217E4FDB00AE95B9 /* Profile */, 505 | ); 506 | defaultConfigurationIsVisible = 0; 507 | defaultConfigurationName = Release; 508 | }; 509 | /* End XCConfigurationList section */ 510 | }; 511 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 512 | } 513 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruijun/flutter_calendar_list/0a361ea14c8d24846edf2a2715111098769c1912/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_calendar 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/calendar_list.dart: -------------------------------------------------------------------------------- 1 | library calendar_list; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'month_view.dart'; 6 | import 'weekday_row.dart'; 7 | 8 | class CalendarList extends StatefulWidget { 9 | final DateTime firstDate; 10 | final DateTime lastDate; 11 | final DateTime selectedStartDate; 12 | final DateTime selectedEndDate; 13 | final Function onSelectFinish; 14 | 15 | CalendarList( 16 | {@required this.firstDate, 17 | @required this.lastDate, 18 | this.onSelectFinish, 19 | this.selectedStartDate, 20 | this.selectedEndDate}) 21 | : assert(firstDate != null), 22 | assert(lastDate != null), 23 | assert(!firstDate.isAfter(lastDate), 24 | 'lastDate must be on or after firstDate'); 25 | 26 | @override 27 | _CalendarListState createState() => _CalendarListState(); 28 | } 29 | 30 | class _CalendarListState extends State { 31 | final double HORIZONTAL_PADDING = 25.0; 32 | DateTime selectStartTime; 33 | DateTime selectEndTime; 34 | int yearStart; 35 | int monthStart; 36 | int yearEnd; 37 | int monthEnd; 38 | int count; 39 | 40 | @override 41 | void initState() { 42 | super.initState(); 43 | // 传入的开始日期 44 | selectStartTime = widget.selectedStartDate; 45 | // 传入的结束日期 46 | selectEndTime = widget.selectedEndDate; 47 | yearStart = widget.firstDate.year; 48 | monthStart = widget.firstDate.month; 49 | yearEnd = widget.lastDate.year; 50 | monthEnd = widget.lastDate.month; 51 | count = monthEnd - monthStart + (yearEnd - yearStart) * 12 + 1; 52 | } 53 | 54 | // 选项处理回调 55 | void onSelectDayChanged(dateTime) { 56 | if (selectStartTime == null && selectEndTime == null) { 57 | selectStartTime = dateTime; 58 | } else if (selectStartTime != null && selectEndTime == null) { 59 | selectEndTime = dateTime; 60 | // 如果选择的开始日期和结束日期相等,则清除选项 61 | if (selectStartTime == selectEndTime) { 62 | setState(() { 63 | selectStartTime = null; 64 | selectEndTime = null; 65 | }); 66 | return; 67 | } 68 | // 如果用户反选,则交换开始和结束日期 69 | if (selectStartTime?.isAfter(selectEndTime)) { 70 | DateTime temp = selectStartTime; 71 | selectStartTime = selectEndTime; 72 | selectEndTime = temp; 73 | } 74 | } else if (selectStartTime != null && selectEndTime != null) { 75 | selectStartTime = null; 76 | selectEndTime = null; 77 | selectStartTime = dateTime; 78 | } 79 | setState(() { 80 | selectStartTime; 81 | selectEndTime; 82 | }); 83 | } 84 | 85 | @override 86 | Widget build(BuildContext context) { 87 | return new Scaffold( 88 | body: SafeArea( 89 | child: Stack( 90 | children: [ 91 | Positioned( 92 | top: 0, 93 | left: 0, 94 | right: 0, 95 | height: 55.0, 96 | child: Container( 97 | padding: EdgeInsets.only( 98 | left: HORIZONTAL_PADDING, right: HORIZONTAL_PADDING), 99 | decoration: BoxDecoration( 100 | // border: Border.all(width: 3, color: Color(0xffaaaaaa)), 101 | // 实现阴影效果 102 | color: Colors.white, 103 | boxShadow: [ 104 | BoxShadow( 105 | color: Colors.black12, 106 | offset: Offset(0, 2.0), 107 | blurRadius: 1.0) 108 | ], 109 | ), 110 | child: WeekdayRow(), 111 | ), 112 | ), 113 | Container( 114 | margin: EdgeInsets.only(top: 55.0, bottom: 100.0), 115 | child: CustomScrollView( 116 | slivers: [ 117 | SliverList( 118 | delegate: SliverChildBuilderDelegate( 119 | (BuildContext context, int index) { 120 | int month = index + monthStart; 121 | DateTime calendarDateTime = DateTime(yearStart, month); 122 | return _getMonthView(calendarDateTime); 123 | }, 124 | childCount: count, 125 | ), 126 | ), 127 | ], 128 | ), 129 | ), 130 | Positioned( 131 | bottom: 0.0, 132 | left: 0.0, 133 | right: 0.0, 134 | height: 100.0, 135 | child: Container( 136 | alignment: Alignment.center, 137 | padding: EdgeInsets.only( 138 | left: 15.0, top: 15.0, bottom: 32.0, right: 15.0), 139 | decoration: BoxDecoration( 140 | // border: Border.all(width: 3, color: Color(0xffaaaaaa)), 141 | // 实现阴影效果 142 | color: Colors.white, 143 | boxShadow: [ 144 | BoxShadow( 145 | color: Colors.black12, 146 | offset: Offset(0, -4.0), 147 | blurRadius: 4.0) 148 | ], 149 | ), 150 | child: Flex( 151 | direction: Axis.horizontal, 152 | children: [ 153 | Expanded( 154 | flex: 1, 155 | child: FlatButton( 156 | color: (selectStartTime != null || 157 | (selectStartTime != null && 158 | selectEndTime != null)) 159 | ? Colors.deepOrange 160 | : Colors.grey, 161 | onPressed: _finishSelect, 162 | padding: EdgeInsets.only(top: 15.0, bottom: 15.0), 163 | textColor: Colors.white, 164 | child: DefaultTextStyle( 165 | style: TextStyle( 166 | color: Colors.white, 167 | fontSize: 16.0, 168 | ), 169 | child: Text( 170 | '确 定', 171 | textAlign: TextAlign.center, 172 | ), 173 | ), 174 | ), 175 | ), 176 | ], 177 | ), 178 | ), 179 | ) 180 | ], 181 | ), 182 | ), 183 | ); 184 | } 185 | 186 | void _finishSelect() { 187 | if (selectStartTime != null) { 188 | widget.onSelectFinish(selectStartTime, selectEndTime); 189 | } 190 | } 191 | 192 | Widget _getMonthView(DateTime dateTime) { 193 | int year = dateTime.year; 194 | int month = dateTime.month; 195 | return MonthView( 196 | context: context, 197 | year: year, 198 | month: month, 199 | padding: HORIZONTAL_PADDING, 200 | dateTimeStart: selectStartTime, 201 | dateTimeEnd: selectEndTime, 202 | todayColor: Colors.deepOrange, 203 | onSelectDayRang: (dateTime) => onSelectDayChanged(dateTime), 204 | ); 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /lib/calendar_notification.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class CalendarNotification extends Notification { 4 | CalendarNotification(this.selectDay); 5 | 6 | final int selectDay; 7 | } 8 | -------------------------------------------------------------------------------- /lib/day_number.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_calendar/calendar_notification.dart'; 3 | 4 | class DayNumber extends StatefulWidget { 5 | const DayNumber({ 6 | @required this.size, 7 | @required this.day, 8 | @required this.isDefaultSelected, 9 | this.isToday, 10 | this.todayColor = Colors.blue, 11 | }); 12 | 13 | final int day; 14 | final bool isToday; 15 | final Color todayColor; 16 | final double size; 17 | final bool isDefaultSelected; 18 | 19 | @override 20 | _DayNumberState createState() => _DayNumberState(); 21 | } 22 | 23 | class _DayNumberState extends State { 24 | final double itemMargin = 5.0; 25 | bool isSelected; 26 | 27 | Widget _dayItem() { 28 | return Container( 29 | width: widget.size - itemMargin * 2, 30 | height: widget.size - itemMargin * 2, 31 | margin: EdgeInsets.all(itemMargin), 32 | alignment: Alignment.center, 33 | decoration: (isSelected && widget.day > 0) 34 | ? BoxDecoration(color: Colors.blue) 35 | : widget.isToday ? BoxDecoration(color: widget.todayColor) : null, 36 | child: Text( 37 | widget.day < 1 ? '' : widget.day.toString(), 38 | textAlign: TextAlign.center, 39 | style: TextStyle( 40 | color: (widget.isToday || isSelected) ? Colors.white : Colors.black87, 41 | fontSize: 15.0, 42 | fontWeight: FontWeight.normal, 43 | ), 44 | ), 45 | ); 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | isSelected = widget.isDefaultSelected; 51 | return widget.day > 0 52 | ? InkWell( 53 | onTap: () => CalendarNotification(widget.day).dispatch(context), 54 | child: _dayItem()) 55 | : _dayItem(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/fullscreen_demo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'calendar_list.dart'; 4 | 5 | class FullScreenDemo extends StatefulWidget { 6 | FullScreenDemo({Key key}) : super(key: key); 7 | 8 | @override 9 | _FullScreenDemoState createState() => new _FullScreenDemoState(); 10 | } 11 | 12 | class _FullScreenDemoState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return CalendarList( 16 | firstDate: DateTime(2019, 8), 17 | lastDate: DateTime(2020, 8), 18 | // selectedStartDate: DateTime(2019, 8, 28), 19 | // selectedEndDate: DateTime(2019, 9, 2), 20 | onSelectFinish: (selectStartTime, selectEndTime) { 21 | List result = []; 22 | result.add(selectStartTime); 23 | if (selectEndTime != null) { 24 | result.add(selectEndTime); 25 | } 26 | Navigator.pop(context, result); 27 | }, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'fullscreen_demo.dart'; 4 | 5 | void main() => runApp(new MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return new MaterialApp( 11 | title: '列表型日历选择组件', 12 | theme: new ThemeData( 13 | primarySwatch: Colors.blue, 14 | ), 15 | home: new MyHomePage(), 16 | ); 17 | } 18 | } 19 | 20 | class MyHomePage extends StatefulWidget { 21 | MyHomePage({Key key}) : super(key: key); 22 | 23 | @override 24 | _MyHomePageState createState() => new _MyHomePageState(); 25 | } 26 | 27 | class _MyHomePageState extends State { 28 | List selectResult1 = []; 29 | List selectResult2 = []; 30 | 31 | // 全屏方式 32 | _navigateFullScreenDemo(BuildContext context) async { 33 | selectResult1 = await Navigator.push( 34 | context, 35 | MaterialPageRoute(builder: (context) => FullScreenDemo()), 36 | ); 37 | } 38 | 39 | // Dialog方式 40 | _navigateDailogDemo(BuildContext context) { 41 | showModalBottomSheet( 42 | context: context, 43 | builder: (BuildContext context) { 44 | return Container( 45 | height: 600.0, 46 | child: FullScreenDemo(), 47 | ); 48 | }, 49 | ).then((result) { 50 | setState(() { 51 | selectResult2 = result; 52 | }); 53 | }); 54 | } 55 | 56 | @override 57 | Widget build(BuildContext context) { 58 | return Scaffold( 59 | appBar: AppBar( 60 | title: Text("列表型日历"), 61 | ), 62 | body: Center( 63 | child: Column( 64 | // mainAxisAlignment: MainAxisAlignment.center, 65 | children: [ 66 | FlatButton( 67 | child: Text('全屏日历'), 68 | onPressed: () { 69 | _navigateFullScreenDemo(context); 70 | }, 71 | ), 72 | Text( 73 | selectResult1.toString(), 74 | ), 75 | FlatButton( 76 | child: Text('弹出框日历'), 77 | onPressed: () { 78 | _navigateDailogDemo(context); 79 | }, 80 | ), 81 | Text( 82 | selectResult2.toString(), 83 | ), 84 | ], 85 | ), 86 | ), 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /lib/month_title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'utils/dates.dart'; 4 | 5 | class MonthTitle extends StatelessWidget { 6 | const MonthTitle({ 7 | @required this.month, 8 | this.monthNames, 9 | }); 10 | 11 | final int month; 12 | final List monthNames; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | child: Text( 18 | getMonthName(month, monthNames: monthNames), 19 | style: TextStyle( 20 | fontSize: 18.0, 21 | fontWeight: FontWeight.w600, 22 | ), 23 | maxLines: 1, 24 | overflow: TextOverflow.fade, 25 | softWrap: false, 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/month_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_calendar/calendar_notification.dart'; 3 | 4 | import 'day_number.dart'; 5 | import 'month_title.dart'; 6 | import 'utils/dates.dart'; 7 | import 'utils/screen_sizes.dart'; 8 | 9 | class MonthView extends StatefulWidget { 10 | const MonthView({ 11 | @required this.context, 12 | @required this.year, 13 | @required this.month, 14 | @required this.padding, 15 | @required this.dateTimeStart, 16 | @required this.dateTimeEnd, 17 | @required this.onSelectDayRang, 18 | this.todayColor, 19 | this.monthNames, 20 | }); 21 | 22 | final BuildContext context; 23 | final int year; 24 | final int month; 25 | final double padding; 26 | final Color todayColor; 27 | final List monthNames; 28 | final DateTime dateTimeStart; 29 | final DateTime dateTimeEnd; 30 | final Function onSelectDayRang; 31 | 32 | double get itemWidth => getDayNumberSize(context, padding); 33 | 34 | @override 35 | _MonthViewState createState() => _MonthViewState(); 36 | } 37 | 38 | class _MonthViewState extends State { 39 | DateTime selectedDate; 40 | 41 | Widget buildMonthDays(BuildContext context) { 42 | List dayRows = []; 43 | List dayRowChildren = []; 44 | 45 | int daysInMonth = getDaysInMonth(widget.year, widget.month); 46 | 47 | // 日 一 二 三 四 五 六 48 | int firstWeekdayOfMonth = DateTime(widget.year, widget.month, 2).weekday; 49 | 50 | for (int day = 2 - firstWeekdayOfMonth; day <= daysInMonth; day++) { 51 | DateTime moment = DateTime(widget.year, widget.month, day); 52 | final bool isToday = dateIsToday(moment); 53 | 54 | bool isDefaultSelected = false; 55 | if (widget.dateTimeStart == null && 56 | widget.dateTimeEnd == null && 57 | selectedDate == null) { 58 | isDefaultSelected = false; 59 | } 60 | if (widget.dateTimeStart == selectedDate && 61 | widget.dateTimeEnd == null && 62 | selectedDate?.day == day && 63 | day > 0) { 64 | isDefaultSelected = true; 65 | } 66 | if (widget.dateTimeStart != null && widget.dateTimeEnd != null) { 67 | isDefaultSelected = (moment.isAtSameMomentAs(widget.dateTimeStart) || 68 | moment.isAtSameMomentAs(widget.dateTimeEnd)) || 69 | moment.isAfter(widget.dateTimeStart) && 70 | moment.isBefore(widget.dateTimeEnd) && 71 | day > 0 72 | ? true 73 | : false; 74 | } 75 | 76 | dayRowChildren.add( 77 | DayNumber( 78 | size: widget.itemWidth, 79 | day: day, 80 | isToday: isToday, 81 | isDefaultSelected: isDefaultSelected, 82 | todayColor: widget.todayColor, 83 | ), 84 | ); 85 | 86 | if ((day - 1 + firstWeekdayOfMonth) % DateTime.daysPerWeek == 0 || 87 | day == daysInMonth) { 88 | dayRows.add( 89 | Row( 90 | children: List.from(dayRowChildren), 91 | ), 92 | ); 93 | dayRowChildren.clear(); 94 | } 95 | } 96 | 97 | return Column( 98 | crossAxisAlignment: CrossAxisAlignment.start, 99 | children: dayRows, 100 | ); 101 | } 102 | 103 | Widget buildMonthView(BuildContext context) { 104 | return NotificationListener( 105 | onNotification: (notification) { 106 | selectedDate = 107 | DateTime(widget.year, widget.month, notification.selectDay); 108 | widget.onSelectDayRang(selectedDate); 109 | return true; 110 | }, 111 | child: Container( 112 | width: 7 * getDayNumberSize(context, widget.padding), 113 | margin: EdgeInsets.all(widget.padding), 114 | child: Column( 115 | crossAxisAlignment: CrossAxisAlignment.start, 116 | children: [ 117 | MonthTitle( 118 | month: widget.month, 119 | monthNames: widget.monthNames, 120 | ), 121 | Container( 122 | margin: const EdgeInsets.only(top: 8.0), 123 | child: buildMonthDays(context), 124 | ), 125 | ], 126 | ), 127 | )); 128 | } 129 | 130 | @override 131 | Widget build(BuildContext context) { 132 | return Container( 133 | child: buildMonthView(context), 134 | ); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /lib/utils/dates.dart: -------------------------------------------------------------------------------- 1 | bool dateIsToday(DateTime date) { 2 | final DateTime now = DateTime.now(); 3 | return date.isAtSameMomentAs(DateTime(now.year, now.month, now.day)); 4 | } 5 | 6 | int getDaysInMonth(int year, int month) { 7 | return month < DateTime.monthsPerYear 8 | ? DateTime(year, month + 1, 0).day 9 | : DateTime(year + 1, 1, 0).day; 10 | } 11 | 12 | String getMonthName(int month, {List monthNames}) { 13 | final List names = monthNames ?? 14 | [ 15 | '一月', 16 | '二月', 17 | '三月', 18 | '四月', 19 | '五月', 20 | '六月', 21 | '七月', 22 | '八月', 23 | '九月', 24 | '十月', 25 | '十一月', 26 | '十二月', 27 | ]; 28 | return names[month - 1]; 29 | } 30 | -------------------------------------------------------------------------------- /lib/utils/screen_sizes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum ScreenSizes { 4 | small, 5 | medium, 6 | large, 7 | } 8 | 9 | ScreenSizes screenSize(BuildContext context) { 10 | final double width = MediaQuery.of(context).size.width; 11 | if (width < 340) { 12 | return ScreenSizes.small; 13 | } else if (width < 540) { 14 | return ScreenSizes.medium; 15 | } else { 16 | return ScreenSizes.large; 17 | } 18 | } 19 | 20 | double getDayNumberSize(BuildContext context, double padding) { 21 | return (MediaQuery.of(context).size.width - padding * 2) / 7; 22 | } 23 | 24 | double getMonthViewHeight(BuildContext context) { 25 | const double padding = 8.0; 26 | const double titleHeight = 21.0; 27 | 28 | return (2 * padding) + titleHeight + 8.0 + (6 * getDayNumberSize(context, 0)); 29 | } -------------------------------------------------------------------------------- /lib/weekday_row.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class WeekdayRow extends StatelessWidget { 4 | Widget _weekdayContainer(String weekDay) => Expanded( 5 | child: Container( 6 | child: Center( 7 | child: DefaultTextStyle( 8 | style: TextStyle( 9 | color: Colors.black, 10 | fontSize: 14.0, 11 | ), 12 | child: Text( 13 | weekDay, 14 | ), 15 | ), 16 | ), 17 | ), 18 | ); 19 | 20 | List _renderWeekDays() { 21 | List list = []; 22 | list.add(_weekdayContainer("周日")); 23 | list.add(_weekdayContainer("周一")); 24 | list.add(_weekdayContainer("周二")); 25 | list.add(_weekdayContainer("周三")); 26 | list.add(_weekdayContainer("周四")); 27 | list.add(_weekdayContainer("周五")); 28 | list.add(_weekdayContainer("周六")); 29 | return list; 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) => Row( 34 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 35 | children: _renderWeekDays(), 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "2.2.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "1.0.4" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.14.11" 32 | cupertino_icons: 33 | dependency: "direct main" 34 | description: 35 | name: cupertino_icons 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "0.1.2" 39 | date_utils: 40 | dependency: "direct main" 41 | description: 42 | name: date_utils 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "0.1.0+2" 46 | flutter: 47 | dependency: "direct main" 48 | description: flutter 49 | source: sdk 50 | version: "0.0.0" 51 | flutter_test: 52 | dependency: "direct dev" 53 | description: flutter 54 | source: sdk 55 | version: "0.0.0" 56 | intl: 57 | dependency: transitive 58 | description: 59 | name: intl 60 | url: "https://pub.flutter-io.cn" 61 | source: hosted 62 | version: "0.15.8" 63 | matcher: 64 | dependency: transitive 65 | description: 66 | name: matcher 67 | url: "https://pub.flutter-io.cn" 68 | source: hosted 69 | version: "0.12.5" 70 | meta: 71 | dependency: transitive 72 | description: 73 | name: meta 74 | url: "https://pub.flutter-io.cn" 75 | source: hosted 76 | version: "1.1.6" 77 | path: 78 | dependency: transitive 79 | description: 80 | name: path 81 | url: "https://pub.flutter-io.cn" 82 | source: hosted 83 | version: "1.6.2" 84 | pedantic: 85 | dependency: transitive 86 | description: 87 | name: pedantic 88 | url: "https://pub.flutter-io.cn" 89 | source: hosted 90 | version: "1.7.0" 91 | quiver: 92 | dependency: transitive 93 | description: 94 | name: quiver 95 | url: "https://pub.flutter-io.cn" 96 | source: hosted 97 | version: "2.0.3" 98 | sky_engine: 99 | dependency: transitive 100 | description: flutter 101 | source: sdk 102 | version: "0.0.99" 103 | source_span: 104 | dependency: transitive 105 | description: 106 | name: source_span 107 | url: "https://pub.flutter-io.cn" 108 | source: hosted 109 | version: "1.5.5" 110 | stack_trace: 111 | dependency: transitive 112 | description: 113 | name: stack_trace 114 | url: "https://pub.flutter-io.cn" 115 | source: hosted 116 | version: "1.9.3" 117 | stream_channel: 118 | dependency: transitive 119 | description: 120 | name: stream_channel 121 | url: "https://pub.flutter-io.cn" 122 | source: hosted 123 | version: "2.0.0" 124 | string_scanner: 125 | dependency: transitive 126 | description: 127 | name: string_scanner 128 | url: "https://pub.flutter-io.cn" 129 | source: hosted 130 | version: "1.0.4" 131 | term_glyph: 132 | dependency: transitive 133 | description: 134 | name: term_glyph 135 | url: "https://pub.flutter-io.cn" 136 | source: hosted 137 | version: "1.1.0" 138 | test_api: 139 | dependency: transitive 140 | description: 141 | name: test_api 142 | url: "https://pub.flutter-io.cn" 143 | source: hosted 144 | version: "0.2.5" 145 | typed_data: 146 | dependency: transitive 147 | description: 148 | name: typed_data 149 | url: "https://pub.flutter-io.cn" 150 | source: hosted 151 | version: "1.1.6" 152 | vector_math: 153 | dependency: transitive 154 | description: 155 | name: vector_math 156 | url: "https://pub.flutter-io.cn" 157 | source: hosted 158 | version: "2.0.8" 159 | sdks: 160 | dart: ">=2.2.2 <3.0.0" 161 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_calendar 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | date_utils: ^0.1.0 23 | 24 | # The following adds the Cupertino Icons font to your application. 25 | # Use with the CupertinoIcons class for iOS style icons. 26 | cupertino_icons: ^0.1.2 27 | 28 | dev_dependencies: 29 | flutter_test: 30 | sdk: flutter 31 | 32 | 33 | # For information on the generic Dart part of this file, see the 34 | # following page: https://dart.dev/tools/pub/pubspec 35 | 36 | # The following section is specific to Flutter. 37 | flutter: 38 | 39 | # The following line ensures that the Material Icons font is 40 | # included with your application, so that you can use the icons in 41 | # the material Icons class. 42 | uses-material-design: true 43 | 44 | # To add assets to your application, add an assets section, like this: 45 | # assets: 46 | # - images/a_dot_burr.jpeg 47 | # - images/a_dot_ham.jpeg 48 | 49 | # An image asset can refer to one or more resolution-specific "variants", see 50 | # https://flutter.dev/assets-and-images/#resolution-aware. 51 | 52 | # For details regarding adding assets from package dependencies, see 53 | # https://flutter.dev/assets-and-images/#from-packages 54 | 55 | # To add custom fonts to your application, add a fonts section here, 56 | # in this "flutter" section. Each entry in this list should have a 57 | # "family" key with the font family name, and a "fonts" key with a 58 | # list giving the asset and other descriptors for the font. For 59 | # example: 60 | # fonts: 61 | # - family: Schyler 62 | # fonts: 63 | # - asset: fonts/Schyler-Regular.ttf 64 | # - asset: fonts/Schyler-Italic.ttf 65 | # style: italic 66 | # - family: Trajan Pro 67 | # fonts: 68 | # - asset: fonts/TrajanPro.ttf 69 | # - asset: fonts/TrajanPro_Bold.ttf 70 | # weight: 700 71 | # 72 | # For details regarding fonts from package dependencies, 73 | # see https://flutter.dev/custom-fonts/#from-packages 74 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_calendar/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------