├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── assets
├── dark_five_days.jpg
├── dark_without_week.jpg
├── white_with_week.gif
└── white_without_week.jpg
├── demo-small.gif
├── demo.gif
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example2
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── 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-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── 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
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── lib
│ └── main.dart
├── pubspec.lock
└── pubspec.yaml
├── lib
├── datetime_apis.dart
└── weekly_date_picker.dart
├── pubspec.lock
├── pubspec.yaml
└── test
├── datetime_apis_test.dart
└── weekly_date_picker_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 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | build/
32 |
33 | # Android related
34 | **/android/**/gradle-wrapper.jar
35 | **/android/.gradle
36 | **/android/captures/
37 | **/android/gradlew
38 | **/android/gradlew.bat
39 | **/android/local.properties
40 | **/android/**/GeneratedPluginRegistrant.java
41 |
42 | # iOS/XCode related
43 | **/ios/**/*.mode1v3
44 | **/ios/**/*.mode2v3
45 | **/ios/**/*.moved-aside
46 | **/ios/**/*.pbxuser
47 | **/ios/**/*.perspectivev3
48 | **/ios/**/*sync/
49 | **/ios/**/.sconsign.dblite
50 | **/ios/**/.tags*
51 | **/ios/**/.vagrant/
52 | **/ios/**/DerivedData/
53 | **/ios/**/Icon?
54 | **/ios/**/Pods/
55 | **/ios/**/.symlinks/
56 | **/ios/**/profile
57 | **/ios/**/xcuserdata
58 | **/ios/.generated/
59 | **/ios/Flutter/App.framework
60 | **/ios/Flutter/Flutter.framework
61 | **/ios/Flutter/Flutter.podspec
62 | **/ios/Flutter/Generated.xcconfig
63 | **/ios/Flutter/app.flx
64 | **/ios/Flutter/app.zip
65 | **/ios/Flutter/flutter_assets/
66 | **/ios/Flutter/flutter_export_environment.sh
67 | **/ios/ServiceDefinitions.json
68 | **/ios/Runner/GeneratedPluginRegistrant.*
69 |
70 | # Exceptions to above rules.
71 | !**/ios/**/default.mode1v3
72 | !**/ios/**/default.mode2v3
73 | !**/ios/**/default.pbxuser
74 | !**/ios/**/default.perspectivev3
75 |
--------------------------------------------------------------------------------
/.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: d408d302e22179d598f467e11da5dd968dbdc9ec
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.4.2
2 |
3 | Small README update.
4 |
5 | ## 1.4.1
6 |
7 | No functional changes. Fixed `CHANGELOG.md` to format correctly.
8 |
9 | ## 1.4.0
10 |
11 | Added possibility to change the border color of the selected digit.
12 |
13 | - Renamed `selectedBackgroundColor` to `selectedDigitBackgroundColor`
14 |
15 | ## 1.3.2
16 |
17 | Fixed a bug with daylight savings causing the next day to not be calculated properly.
18 |
19 | ## 1.3.1
20 |
21 | Upgraded Flutter version to 3.
22 |
23 | ## 1.3.0
24 |
25 | Made it possible to swipe backwards in time from today's date.
26 |
27 | ## 1.2.0
28 |
29 | - Replaced custom weeknumber calculation (which didn't work with leap years) with the `week_of_year` package.
30 | - Fixed proper dispose of controller
31 | - Added tests
32 |
33 | ## 1.1.3
34 |
35 | Fixed wrong naming due to previous package name
36 |
37 | ## 1.1.2
38 |
39 | Updated README.
40 |
41 | ## 1.1.1
42 |
43 | Changes package name.
44 |
45 | ## 1.1.0
46 |
47 | - Migrated to Flutter 2
48 | - Added support for disabling the weekday text
49 | - Adjusted borders, margins and colors
50 | - Improved parameter names
51 |
52 | ## 1.0.2
53 |
54 | Fixed GIFs for pub.dev README
55 |
56 | ## 1.0.1
57 |
58 | Added documentation
59 |
60 | ## 1.0.0
61 |
62 | Initial version
63 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Magnuti
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Weekly Date Picker
2 |
3 | A weekday picker where you can scroll between weeks.
4 |
5 |
6 |
7 | ## Custom styling
8 |
9 | ### You can remove the week text
10 |
11 |
12 |
13 | ### Add custom colors
14 |
15 |
16 |
17 | ### You can also make only the weekdays selectable
18 |
19 |
20 |
21 | ## Installing
22 |
23 | To use this package, add `weekly_date_picker` as a dependency in your `pubspec.yaml` file.
24 |
25 | ## Usage
26 |
27 | ```dart
28 | WeeklyDatePicker(
29 | selectedDay: _selectedDay, // DateTime
30 | changeDay: (value) => setState(() {
31 | _selectedDay = value;
32 | }),
33 | ),
34 | ```
35 |
36 | ## How to use custom styling
37 |
38 | You can use custom colors and labels by the optional parameters:
39 |
40 | - `weekdayText` Specifies the weekday text: default is 'Week'
41 | - `weekdays` Specifies the weekday strings ['Mon', 'Tue'...]
42 | - `backgroundColor` Background color
43 | - `selectedDigitBackgroundColor` Color of the selected day circle
44 | - `selectedDigitBorderColor` Color of the border of the selected day circle
45 | - `selectedDigitColor` Color of the selected digit text
46 | - `digitsColor` Color of the unselected digits text
47 | - `weekdayTextColor` Is the color of the weekdays 'Mon', 'Tue'...
48 | - `enableWeeknumberText` Set to false to hide the weeknumber textfield to the left of the slider
49 | - `weeknumberColor` Color of the weekday container
50 | - `weeknumberTextColor` Color of the weekday text
51 | - `daysInWeek` Specifies the number of weekdays to render, default is 7, so Monday to Sunday
52 |
--------------------------------------------------------------------------------
/assets/dark_five_days.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/assets/dark_five_days.jpg
--------------------------------------------------------------------------------
/assets/dark_without_week.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/assets/dark_without_week.jpg
--------------------------------------------------------------------------------
/assets/white_with_week.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/assets/white_with_week.gif
--------------------------------------------------------------------------------
/assets/white_without_week.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/assets/white_without_week.jpg
--------------------------------------------------------------------------------
/demo-small.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/demo-small.gif
--------------------------------------------------------------------------------
/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/demo.gif
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/example/.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: "c973f3ae031775d5b39d5e157ce16cdf0a735b0d"
8 | channel: "main"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: c973f3ae031775d5b39d5e157ce16cdf0a735b0d
17 | base_revision: c973f3ae031775d5b39d5e157ce16cdf0a735b0d
18 | - platform: android
19 | create_revision: c973f3ae031775d5b39d5e157ce16cdf0a735b0d
20 | base_revision: c973f3ae031775d5b39d5e157ce16cdf0a735b0d
21 | - platform: ios
22 | create_revision: c973f3ae031775d5b39d5e157ce16cdf0a735b0d
23 | base_revision: c973f3ae031775d5b39d5e157ce16cdf0a735b0d
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | "A new Flutter project."
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | namespace "com.example.example"
27 | compileSdkVersion flutter.compileSdkVersion
28 | ndkVersion flutter.ndkVersion
29 |
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 |
35 | kotlinOptions {
36 | jvmTarget = '1.8'
37 | }
38 |
39 | sourceSets {
40 | main.java.srcDirs += 'src/main/kotlin'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "com.example.example"
46 | // You can update the following values to match your application needs.
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48 | minSdkVersion flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | }
53 |
54 | buildTypes {
55 | release {
56 | // TODO: Add your own signing config for the release build.
57 | // Signing with the debug keys for now, so `flutter run --release` works.
58 | signingConfig signingConfigs.debug
59 | }
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {}
68 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example2/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.3.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | tasks.register("clean", Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | plugins {
14 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
15 | }
16 | }
17 |
18 | include ":app"
19 |
20 | apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
21 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
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 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 97C146E61CF9000F007C117D /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 97C146ED1CF9000F007C117D;
25 | remoteInfo = Runner;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXCopyFilesBuildPhase section */
30 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
31 | isa = PBXCopyFilesBuildPhase;
32 | buildActionMask = 2147483647;
33 | dstPath = "";
34 | dstSubfolderSpec = 10;
35 | files = (
36 | );
37 | name = "Embed Frameworks";
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXCopyFilesBuildPhase section */
41 |
42 | /* Begin PBXFileReference section */
43 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
44 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
46 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
47 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
48 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
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 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
57 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 9740EEB11CF90186004384FC /* Flutter */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
78 | );
79 | name = Flutter;
80 | sourceTree = "";
81 | };
82 | 331C8082294A63A400263BE5 /* RunnerTests */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 331C807B294A618700263BE5 /* RunnerTests.swift */,
86 | );
87 | path = RunnerTests;
88 | sourceTree = "";
89 | };
90 | 97C146E51CF9000F007C117D = {
91 | isa = PBXGroup;
92 | children = (
93 | 9740EEB11CF90186004384FC /* Flutter */,
94 | 97C146F01CF9000F007C117D /* Runner */,
95 | 97C146EF1CF9000F007C117D /* Products */,
96 | 331C8082294A63A400263BE5 /* RunnerTests */,
97 | );
98 | sourceTree = "";
99 | };
100 | 97C146EF1CF9000F007C117D /* Products */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 97C146EE1CF9000F007C117D /* Runner.app */,
104 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
105 | );
106 | name = Products;
107 | sourceTree = "";
108 | };
109 | 97C146F01CF9000F007C117D /* Runner */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
113 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
114 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
115 | 97C147021CF9000F007C117D /* Info.plist */,
116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
118 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
119 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
120 | );
121 | path = Runner;
122 | sourceTree = "";
123 | };
124 | /* End PBXGroup section */
125 |
126 | /* Begin PBXNativeTarget section */
127 | 331C8080294A63A400263BE5 /* RunnerTests */ = {
128 | isa = PBXNativeTarget;
129 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
130 | buildPhases = (
131 | 331C807D294A63A400263BE5 /* Sources */,
132 | 331C807E294A63A400263BE5 /* Frameworks */,
133 | 331C807F294A63A400263BE5 /* Resources */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | 331C8086294A63A400263BE5 /* PBXTargetDependency */,
139 | );
140 | name = RunnerTests;
141 | productName = RunnerTests;
142 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
143 | productType = "com.apple.product-type.bundle.unit-test";
144 | };
145 | 97C146ED1CF9000F007C117D /* Runner */ = {
146 | isa = PBXNativeTarget;
147 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
148 | buildPhases = (
149 | 9740EEB61CF901F6004384FC /* Run Script */,
150 | 97C146EA1CF9000F007C117D /* Sources */,
151 | 97C146EB1CF9000F007C117D /* Frameworks */,
152 | 97C146EC1CF9000F007C117D /* Resources */,
153 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
154 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
155 | );
156 | buildRules = (
157 | );
158 | dependencies = (
159 | );
160 | name = Runner;
161 | productName = Runner;
162 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
163 | productType = "com.apple.product-type.application";
164 | };
165 | /* End PBXNativeTarget section */
166 |
167 | /* Begin PBXProject section */
168 | 97C146E61CF9000F007C117D /* Project object */ = {
169 | isa = PBXProject;
170 | attributes = {
171 | BuildIndependentTargetsInParallel = YES;
172 | LastUpgradeCheck = 1430;
173 | ORGANIZATIONNAME = "";
174 | TargetAttributes = {
175 | 331C8080294A63A400263BE5 = {
176 | CreatedOnToolsVersion = 14.0;
177 | TestTargetID = 97C146ED1CF9000F007C117D;
178 | };
179 | 97C146ED1CF9000F007C117D = {
180 | CreatedOnToolsVersion = 7.3.1;
181 | LastSwiftMigration = 1100;
182 | };
183 | };
184 | };
185 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
186 | compatibilityVersion = "Xcode 9.3";
187 | developmentRegion = en;
188 | hasScannedForEncodings = 0;
189 | knownRegions = (
190 | en,
191 | Base,
192 | );
193 | mainGroup = 97C146E51CF9000F007C117D;
194 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
195 | projectDirPath = "";
196 | projectRoot = "";
197 | targets = (
198 | 97C146ED1CF9000F007C117D /* Runner */,
199 | 331C8080294A63A400263BE5 /* RunnerTests */,
200 | );
201 | };
202 | /* End PBXProject section */
203 |
204 | /* Begin PBXResourcesBuildPhase section */
205 | 331C807F294A63A400263BE5 /* Resources */ = {
206 | isa = PBXResourcesBuildPhase;
207 | buildActionMask = 2147483647;
208 | files = (
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | 97C146EC1CF9000F007C117D /* Resources */ = {
213 | isa = PBXResourcesBuildPhase;
214 | buildActionMask = 2147483647;
215 | files = (
216 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
217 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
218 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
219 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
220 | );
221 | runOnlyForDeploymentPostprocessing = 0;
222 | };
223 | /* End PBXResourcesBuildPhase section */
224 |
225 | /* Begin PBXShellScriptBuildPhase section */
226 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
227 | isa = PBXShellScriptBuildPhase;
228 | alwaysOutOfDate = 1;
229 | buildActionMask = 2147483647;
230 | files = (
231 | );
232 | inputPaths = (
233 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
234 | );
235 | name = "Thin Binary";
236 | outputPaths = (
237 | );
238 | runOnlyForDeploymentPostprocessing = 0;
239 | shellPath = /bin/sh;
240 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
241 | };
242 | 9740EEB61CF901F6004384FC /* Run Script */ = {
243 | isa = PBXShellScriptBuildPhase;
244 | alwaysOutOfDate = 1;
245 | buildActionMask = 2147483647;
246 | files = (
247 | );
248 | inputPaths = (
249 | );
250 | name = "Run Script";
251 | outputPaths = (
252 | );
253 | runOnlyForDeploymentPostprocessing = 0;
254 | shellPath = /bin/sh;
255 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
256 | };
257 | /* End PBXShellScriptBuildPhase section */
258 |
259 | /* Begin PBXSourcesBuildPhase section */
260 | 331C807D294A63A400263BE5 /* Sources */ = {
261 | isa = PBXSourcesBuildPhase;
262 | buildActionMask = 2147483647;
263 | files = (
264 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | };
268 | 97C146EA1CF9000F007C117D /* Sources */ = {
269 | isa = PBXSourcesBuildPhase;
270 | buildActionMask = 2147483647;
271 | files = (
272 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
273 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
274 | );
275 | runOnlyForDeploymentPostprocessing = 0;
276 | };
277 | /* End PBXSourcesBuildPhase section */
278 |
279 | /* Begin PBXTargetDependency section */
280 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
281 | isa = PBXTargetDependency;
282 | target = 97C146ED1CF9000F007C117D /* Runner */;
283 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
284 | };
285 | /* End PBXTargetDependency section */
286 |
287 | /* Begin PBXVariantGroup section */
288 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
289 | isa = PBXVariantGroup;
290 | children = (
291 | 97C146FB1CF9000F007C117D /* Base */,
292 | );
293 | name = Main.storyboard;
294 | sourceTree = "";
295 | };
296 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
297 | isa = PBXVariantGroup;
298 | children = (
299 | 97C147001CF9000F007C117D /* Base */,
300 | );
301 | name = LaunchScreen.storyboard;
302 | sourceTree = "";
303 | };
304 | /* End PBXVariantGroup section */
305 |
306 | /* Begin XCBuildConfiguration section */
307 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
308 | isa = XCBuildConfiguration;
309 | buildSettings = {
310 | ALWAYS_SEARCH_USER_PATHS = NO;
311 | CLANG_ANALYZER_NONNULL = YES;
312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
313 | CLANG_CXX_LIBRARY = "libc++";
314 | CLANG_ENABLE_MODULES = YES;
315 | CLANG_ENABLE_OBJC_ARC = YES;
316 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317 | CLANG_WARN_BOOL_CONVERSION = YES;
318 | CLANG_WARN_COMMA = YES;
319 | CLANG_WARN_CONSTANT_CONVERSION = YES;
320 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322 | CLANG_WARN_EMPTY_BODY = YES;
323 | CLANG_WARN_ENUM_CONVERSION = YES;
324 | CLANG_WARN_INFINITE_RECURSION = YES;
325 | CLANG_WARN_INT_CONVERSION = YES;
326 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
328 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
331 | CLANG_WARN_STRICT_PROTOTYPES = YES;
332 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
333 | CLANG_WARN_UNREACHABLE_CODE = YES;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu99;
341 | GCC_NO_COMMON_BLOCKS = YES;
342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
344 | GCC_WARN_UNDECLARED_SELECTOR = YES;
345 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
346 | GCC_WARN_UNUSED_FUNCTION = YES;
347 | GCC_WARN_UNUSED_VARIABLE = YES;
348 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
349 | MTL_ENABLE_DEBUG_INFO = NO;
350 | SDKROOT = iphoneos;
351 | SUPPORTED_PLATFORMS = iphoneos;
352 | TARGETED_DEVICE_FAMILY = "1,2";
353 | VALIDATE_PRODUCT = YES;
354 | };
355 | name = Profile;
356 | };
357 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
358 | isa = XCBuildConfiguration;
359 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
360 | buildSettings = {
361 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
362 | CLANG_ENABLE_MODULES = YES;
363 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
364 | DEVELOPMENT_TEAM = F2MAS5MKJP;
365 | ENABLE_BITCODE = NO;
366 | INFOPLIST_FILE = Runner/Info.plist;
367 | LD_RUNPATH_SEARCH_PATHS = (
368 | "$(inherited)",
369 | "@executable_path/Frameworks",
370 | );
371 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
372 | PRODUCT_NAME = "$(TARGET_NAME)";
373 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
374 | SWIFT_VERSION = 5.0;
375 | VERSIONING_SYSTEM = "apple-generic";
376 | };
377 | name = Profile;
378 | };
379 | 331C8088294A63A400263BE5 /* Debug */ = {
380 | isa = XCBuildConfiguration;
381 | baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
382 | buildSettings = {
383 | BUNDLE_LOADER = "$(TEST_HOST)";
384 | CODE_SIGN_STYLE = Automatic;
385 | CURRENT_PROJECT_VERSION = 1;
386 | GENERATE_INFOPLIST_FILE = YES;
387 | MARKETING_VERSION = 1.0;
388 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
389 | PRODUCT_NAME = "$(TARGET_NAME)";
390 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
391 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
392 | SWIFT_VERSION = 5.0;
393 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
394 | };
395 | name = Debug;
396 | };
397 | 331C8089294A63A400263BE5 /* Release */ = {
398 | isa = XCBuildConfiguration;
399 | baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
400 | buildSettings = {
401 | BUNDLE_LOADER = "$(TEST_HOST)";
402 | CODE_SIGN_STYLE = Automatic;
403 | CURRENT_PROJECT_VERSION = 1;
404 | GENERATE_INFOPLIST_FILE = YES;
405 | MARKETING_VERSION = 1.0;
406 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
407 | PRODUCT_NAME = "$(TARGET_NAME)";
408 | SWIFT_VERSION = 5.0;
409 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
410 | };
411 | name = Release;
412 | };
413 | 331C808A294A63A400263BE5 /* Profile */ = {
414 | isa = XCBuildConfiguration;
415 | baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
416 | buildSettings = {
417 | BUNDLE_LOADER = "$(TEST_HOST)";
418 | CODE_SIGN_STYLE = Automatic;
419 | CURRENT_PROJECT_VERSION = 1;
420 | GENERATE_INFOPLIST_FILE = YES;
421 | MARKETING_VERSION = 1.0;
422 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
423 | PRODUCT_NAME = "$(TARGET_NAME)";
424 | SWIFT_VERSION = 5.0;
425 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
426 | };
427 | name = Profile;
428 | };
429 | 97C147031CF9000F007C117D /* Debug */ = {
430 | isa = XCBuildConfiguration;
431 | buildSettings = {
432 | ALWAYS_SEARCH_USER_PATHS = NO;
433 | CLANG_ANALYZER_NONNULL = YES;
434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
435 | CLANG_CXX_LIBRARY = "libc++";
436 | CLANG_ENABLE_MODULES = YES;
437 | CLANG_ENABLE_OBJC_ARC = YES;
438 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
439 | CLANG_WARN_BOOL_CONVERSION = YES;
440 | CLANG_WARN_COMMA = YES;
441 | CLANG_WARN_CONSTANT_CONVERSION = YES;
442 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
443 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
444 | CLANG_WARN_EMPTY_BODY = YES;
445 | CLANG_WARN_ENUM_CONVERSION = YES;
446 | CLANG_WARN_INFINITE_RECURSION = YES;
447 | CLANG_WARN_INT_CONVERSION = YES;
448 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
449 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
450 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
452 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
453 | CLANG_WARN_STRICT_PROTOTYPES = YES;
454 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
455 | CLANG_WARN_UNREACHABLE_CODE = YES;
456 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
458 | COPY_PHASE_STRIP = NO;
459 | DEBUG_INFORMATION_FORMAT = dwarf;
460 | ENABLE_STRICT_OBJC_MSGSEND = YES;
461 | ENABLE_TESTABILITY = YES;
462 | GCC_C_LANGUAGE_STANDARD = gnu99;
463 | GCC_DYNAMIC_NO_PIC = NO;
464 | GCC_NO_COMMON_BLOCKS = YES;
465 | GCC_OPTIMIZATION_LEVEL = 0;
466 | GCC_PREPROCESSOR_DEFINITIONS = (
467 | "DEBUG=1",
468 | "$(inherited)",
469 | );
470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
472 | GCC_WARN_UNDECLARED_SELECTOR = YES;
473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
474 | GCC_WARN_UNUSED_FUNCTION = YES;
475 | GCC_WARN_UNUSED_VARIABLE = YES;
476 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
477 | MTL_ENABLE_DEBUG_INFO = YES;
478 | ONLY_ACTIVE_ARCH = YES;
479 | SDKROOT = iphoneos;
480 | TARGETED_DEVICE_FAMILY = "1,2";
481 | };
482 | name = Debug;
483 | };
484 | 97C147041CF9000F007C117D /* Release */ = {
485 | isa = XCBuildConfiguration;
486 | buildSettings = {
487 | ALWAYS_SEARCH_USER_PATHS = NO;
488 | CLANG_ANALYZER_NONNULL = YES;
489 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
490 | CLANG_CXX_LIBRARY = "libc++";
491 | CLANG_ENABLE_MODULES = YES;
492 | CLANG_ENABLE_OBJC_ARC = YES;
493 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
494 | CLANG_WARN_BOOL_CONVERSION = YES;
495 | CLANG_WARN_COMMA = YES;
496 | CLANG_WARN_CONSTANT_CONVERSION = YES;
497 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
498 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
499 | CLANG_WARN_EMPTY_BODY = YES;
500 | CLANG_WARN_ENUM_CONVERSION = YES;
501 | CLANG_WARN_INFINITE_RECURSION = YES;
502 | CLANG_WARN_INT_CONVERSION = YES;
503 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
504 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
505 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
506 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
507 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
508 | CLANG_WARN_STRICT_PROTOTYPES = YES;
509 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
510 | CLANG_WARN_UNREACHABLE_CODE = YES;
511 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
512 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
513 | COPY_PHASE_STRIP = NO;
514 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
515 | ENABLE_NS_ASSERTIONS = NO;
516 | ENABLE_STRICT_OBJC_MSGSEND = YES;
517 | GCC_C_LANGUAGE_STANDARD = gnu99;
518 | GCC_NO_COMMON_BLOCKS = YES;
519 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
520 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
521 | GCC_WARN_UNDECLARED_SELECTOR = YES;
522 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
523 | GCC_WARN_UNUSED_FUNCTION = YES;
524 | GCC_WARN_UNUSED_VARIABLE = YES;
525 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
526 | MTL_ENABLE_DEBUG_INFO = NO;
527 | SDKROOT = iphoneos;
528 | SUPPORTED_PLATFORMS = iphoneos;
529 | SWIFT_COMPILATION_MODE = wholemodule;
530 | SWIFT_OPTIMIZATION_LEVEL = "-O";
531 | TARGETED_DEVICE_FAMILY = "1,2";
532 | VALIDATE_PRODUCT = YES;
533 | };
534 | name = Release;
535 | };
536 | 97C147061CF9000F007C117D /* Debug */ = {
537 | isa = XCBuildConfiguration;
538 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
539 | buildSettings = {
540 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
541 | CLANG_ENABLE_MODULES = YES;
542 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
543 | DEVELOPMENT_TEAM = F2MAS5MKJP;
544 | ENABLE_BITCODE = NO;
545 | INFOPLIST_FILE = Runner/Info.plist;
546 | LD_RUNPATH_SEARCH_PATHS = (
547 | "$(inherited)",
548 | "@executable_path/Frameworks",
549 | );
550 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
551 | PRODUCT_NAME = "$(TARGET_NAME)";
552 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
553 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
554 | SWIFT_VERSION = 5.0;
555 | VERSIONING_SYSTEM = "apple-generic";
556 | };
557 | name = Debug;
558 | };
559 | 97C147071CF9000F007C117D /* Release */ = {
560 | isa = XCBuildConfiguration;
561 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
562 | buildSettings = {
563 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
564 | CLANG_ENABLE_MODULES = YES;
565 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
566 | DEVELOPMENT_TEAM = F2MAS5MKJP;
567 | ENABLE_BITCODE = NO;
568 | INFOPLIST_FILE = Runner/Info.plist;
569 | LD_RUNPATH_SEARCH_PATHS = (
570 | "$(inherited)",
571 | "@executable_path/Frameworks",
572 | );
573 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
574 | PRODUCT_NAME = "$(TARGET_NAME)";
575 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
576 | SWIFT_VERSION = 5.0;
577 | VERSIONING_SYSTEM = "apple-generic";
578 | };
579 | name = Release;
580 | };
581 | /* End XCBuildConfiguration section */
582 |
583 | /* Begin XCConfigurationList section */
584 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
585 | isa = XCConfigurationList;
586 | buildConfigurations = (
587 | 331C8088294A63A400263BE5 /* Debug */,
588 | 331C8089294A63A400263BE5 /* Release */,
589 | 331C808A294A63A400263BE5 /* Profile */,
590 | );
591 | defaultConfigurationIsVisible = 0;
592 | defaultConfigurationName = Release;
593 | };
594 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
595 | isa = XCConfigurationList;
596 | buildConfigurations = (
597 | 97C147031CF9000F007C117D /* Debug */,
598 | 97C147041CF9000F007C117D /* Release */,
599 | 249021D3217E4FDB00AE95B9 /* Profile */,
600 | );
601 | defaultConfigurationIsVisible = 0;
602 | defaultConfigurationName = Release;
603 | };
604 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
605 | isa = XCConfigurationList;
606 | buildConfigurations = (
607 | 97C147061CF9000F007C117D /* Debug */,
608 | 97C147071CF9000F007C117D /* Release */,
609 | 249021D4217E4FDB00AE95B9 /* Profile */,
610 | );
611 | defaultConfigurationIsVisible = 0;
612 | defaultConfigurationName = Release;
613 | };
614 | /* End XCConfigurationList section */
615 | };
616 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
617 | }
618 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magnuti/Weekly-Date-Picker/2337abc5a772775afa198bb5d9613f887ee6a45e/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/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.
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | example
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:weekly_date_picker/weekly_date_picker.dart';
4 |
5 | void main() {
6 | runApp(const MyApp());
7 | }
8 |
9 | class MyApp extends StatelessWidget {
10 | const MyApp({super.key});
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return MaterialApp(
15 | title: 'Weekly Date Picker Example',
16 | theme: ThemeData(
17 | primarySwatch: Colors.blue,
18 | visualDensity: VisualDensity.adaptivePlatformDensity,
19 | ),
20 | home: const MyHomePage(title: 'Weekly Date Picker Example'),
21 | );
22 | }
23 | }
24 |
25 | class MyHomePage extends StatefulWidget {
26 | const MyHomePage({Key? key, required this.title}) : super(key: key);
27 |
28 | final String title;
29 |
30 | @override
31 | MyHomePageState createState() => MyHomePageState();
32 | }
33 |
34 | class MyHomePageState extends State {
35 | DateTime _selectedDay = DateTime.now();
36 |
37 | @override
38 | Widget build(BuildContext context) {
39 | return Scaffold(
40 | appBar: AppBar(
41 | title: Text(widget.title),
42 | ),
43 | body: Column(
44 | children: [
45 | WeeklyDatePicker(
46 | selectedDay: _selectedDay,
47 | changeDay: (value) => setState(() {
48 | _selectedDay = value;
49 | }),
50 | enableWeeknumberText: false,
51 | weeknumberColor: const Color(0xFF57AF87),
52 | weeknumberTextColor: Colors.white,
53 | backgroundColor: const Color(0xFF1A1A1A),
54 | weekdayTextColor: const Color(0xFF8A8A8A),
55 | digitsColor: Colors.white,
56 | selectedDigitBackgroundColor: const Color(0xFF57AF87),
57 | weekdays: const ["Mo", "Tu", "We", "Th", "Fr"],
58 | daysInWeek: 5,
59 | ),
60 | ],
61 | ),
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/example/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 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.17.2"
44 | cupertino_icons:
45 | dependency: "direct main"
46 | description:
47 | name: cupertino_icons
48 | sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.0.5"
52 | fake_async:
53 | dependency: transitive
54 | description:
55 | name: fake_async
56 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
57 | url: "https://pub.dev"
58 | source: hosted
59 | version: "1.3.1"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_lints:
66 | dependency: "direct dev"
67 | description:
68 | name: flutter_lints
69 | sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
70 | url: "https://pub.dev"
71 | source: hosted
72 | version: "2.0.2"
73 | flutter_test:
74 | dependency: "direct dev"
75 | description: flutter
76 | source: sdk
77 | version: "0.0.0"
78 | lints:
79 | dependency: transitive
80 | description:
81 | name: lints
82 | sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
83 | url: "https://pub.dev"
84 | source: hosted
85 | version: "2.1.1"
86 | matcher:
87 | dependency: transitive
88 | description:
89 | name: matcher
90 | sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
91 | url: "https://pub.dev"
92 | source: hosted
93 | version: "0.12.16"
94 | material_color_utilities:
95 | dependency: transitive
96 | description:
97 | name: material_color_utilities
98 | sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
99 | url: "https://pub.dev"
100 | source: hosted
101 | version: "0.5.0"
102 | meta:
103 | dependency: transitive
104 | description:
105 | name: meta
106 | sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
107 | url: "https://pub.dev"
108 | source: hosted
109 | version: "1.9.1"
110 | path:
111 | dependency: transitive
112 | description:
113 | name: path
114 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
115 | url: "https://pub.dev"
116 | source: hosted
117 | version: "1.8.3"
118 | sky_engine:
119 | dependency: transitive
120 | description: flutter
121 | source: sdk
122 | version: "0.0.99"
123 | source_span:
124 | dependency: transitive
125 | description:
126 | name: source_span
127 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
128 | url: "https://pub.dev"
129 | source: hosted
130 | version: "1.10.0"
131 | stack_trace:
132 | dependency: transitive
133 | description:
134 | name: stack_trace
135 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
136 | url: "https://pub.dev"
137 | source: hosted
138 | version: "1.11.0"
139 | stream_channel:
140 | dependency: transitive
141 | description:
142 | name: stream_channel
143 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
144 | url: "https://pub.dev"
145 | source: hosted
146 | version: "2.1.1"
147 | string_scanner:
148 | dependency: transitive
149 | description:
150 | name: string_scanner
151 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
152 | url: "https://pub.dev"
153 | source: hosted
154 | version: "1.2.0"
155 | term_glyph:
156 | dependency: transitive
157 | description:
158 | name: term_glyph
159 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
160 | url: "https://pub.dev"
161 | source: hosted
162 | version: "1.2.1"
163 | test_api:
164 | dependency: transitive
165 | description:
166 | name: test_api
167 | sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "0.6.0"
171 | vector_math:
172 | dependency: transitive
173 | description:
174 | name: vector_math
175 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
176 | url: "https://pub.dev"
177 | source: hosted
178 | version: "2.1.4"
179 | web:
180 | dependency: transitive
181 | description:
182 | name: web
183 | sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
184 | url: "https://pub.dev"
185 | source: hosted
186 | version: "0.1.4-beta"
187 | week_of_year:
188 | dependency: transitive
189 | description:
190 | name: week_of_year
191 | sha256: f4e852f441a77476e87e7d795ef7054c1c1d41a971058fded3506e0b6c335d68
192 | url: "https://pub.dev"
193 | source: hosted
194 | version: "2.1.0"
195 | weekly_date_picker:
196 | dependency: "direct main"
197 | description:
198 | path: ".."
199 | relative: true
200 | source: path
201 | version: "1.4.2"
202 | sdks:
203 | dart: ">=3.1.0-185.0.dev <4.0.0"
204 | flutter: ">=3.10.0"
205 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 | description: "A new Flutter project."
3 | # The following line prevents the package from being accidentally published to
4 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
6 |
7 | # The following defines the version and build number for your application.
8 | # A version number is three numbers separated by dots, like 1.2.43
9 | # followed by an optional build number separated by a +.
10 | # Both the version and the builder number may be overridden in flutter
11 | # build by specifying --build-name and --build-number, respectively.
12 | # In Android, build-name is used as versionName while build-number used as versionCode.
13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
15 | # Read more about iOS versioning at
16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17 | # In Windows, build-name is used as the major, minor, and patch parts
18 | # of the product and file versions while build-number is used as the build suffix.
19 | version: 1.0.0+1
20 |
21 | environment:
22 | sdk: '>=3.0.0 <4.0.0'
23 |
24 | # Dependencies specify other packages that your package needs in order to work.
25 | # To automatically upgrade your package dependencies to the latest versions
26 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
27 | # dependencies can be manually updated by changing the version numbers below to
28 | # the latest version available on pub.dev. To see which dependencies have newer
29 | # versions available, run `flutter pub outdated`.
30 | dependencies:
31 | flutter:
32 | sdk: flutter
33 | weekly_date_picker:
34 | path: ../
35 |
36 |
37 | # The following adds the Cupertino Icons font to your application.
38 | # Use with the CupertinoIcons class for iOS style icons.
39 | cupertino_icons: ^1.0.2
40 |
41 | dev_dependencies:
42 | flutter_test:
43 | sdk: flutter
44 |
45 | # The "flutter_lints" package below contains a set of recommended lints to
46 | # encourage good coding practices. The lint set provided by the package is
47 | # activated in the `analysis_options.yaml` file located at the root of your
48 | # package. See that file for information about deactivating specific lint
49 | # rules and activating additional ones.
50 | flutter_lints: ^2.0.0
51 |
52 | # For information on the generic Dart part of this file, see the
53 | # following page: https://dart.dev/tools/pub/pubspec
54 |
55 | # The following section is specific to Flutter packages.
56 | flutter:
57 |
58 | # The following line ensures that the Material Icons font is
59 | # included with your application, so that you can use the icons in
60 | # the material Icons class.
61 | uses-material-design: true
62 |
63 | # To add assets to your application, add an assets section, like this:
64 | # assets:
65 | # - images/a_dot_burr.jpeg
66 | # - images/a_dot_ham.jpeg
67 |
68 | # An image asset can refer to one or more resolution-specific "variants", see
69 | # https://flutter.dev/assets-and-images/#resolution-aware
70 |
71 | # For details regarding adding assets from package dependencies, see
72 | # https://flutter.dev/assets-and-images/#from-packages
73 |
74 | # To add custom fonts to your application, add a fonts section here,
75 | # in this "flutter" section. Each entry in this list should have a
76 | # "family" key with the font family name, and a "fonts" key with a
77 | # list giving the asset and other descriptors for the font. For
78 | # example:
79 | # fonts:
80 | # - family: Schyler
81 | # fonts:
82 | # - asset: fonts/Schyler-Regular.ttf
83 | # - asset: fonts/Schyler-Italic.ttf
84 | # style: italic
85 | # - family: Trajan Pro
86 | # fonts:
87 | # - asset: fonts/TrajanPro.ttf
88 | # - asset: fonts/TrajanPro_Bold.ttf
89 | # weight: 700
90 | #
91 | # For details regarding fonts from package dependencies,
92 | # see https://flutter.dev/custom-fonts/#from-packages
93 |
--------------------------------------------------------------------------------
/lib/datetime_apis.dart:
--------------------------------------------------------------------------------
1 | extension CompareDates on DateTime {
2 | bool isSameDateAs(DateTime other) {
3 | return this.day == other.day &&
4 | this.month == other.month &&
5 | this.year == other.year;
6 | }
7 |
8 | DateTime addDays(int days) {
9 | return DateTime(this.year, this.month, this.day + days);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/weekly_date_picker.dart:
--------------------------------------------------------------------------------
1 | library weekly_date_picker;
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:week_of_year/week_of_year.dart';
5 | import "package:weekly_date_picker/datetime_apis.dart";
6 |
7 | class WeeklyDatePicker extends StatefulWidget {
8 | WeeklyDatePicker({
9 | Key? key,
10 | required this.selectedDay,
11 | required this.changeDay,
12 | this.weekdayText = 'Week',
13 | this.weekdays = const ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
14 | this.backgroundColor = const Color(0xFFFAFAFA),
15 | this.selectedDigitBackgroundColor = const Color(0xFF2A2859),
16 | this.selectedDigitBorderColor =
17 | const Color(0x00000000), // Transparent color
18 | this.selectedDigitColor = const Color(0xFFFFFFFF),
19 | this.digitsColor = const Color(0xFF000000),
20 | this.weekdayTextColor = const Color(0xFF303030),
21 | this.enableWeeknumberText = true,
22 | this.weeknumberColor = const Color(0xFFB2F5FE),
23 | this.weeknumberTextColor = const Color(0xFF000000),
24 | this.daysInWeek = 7,
25 | }) : assert(weekdays.length == daysInWeek,
26 | "weekdays must be of length $daysInWeek"),
27 | super(key: key);
28 |
29 | /// The current selected day
30 | final DateTime selectedDay;
31 |
32 | /// Callback function with the new selected date
33 | final Function(DateTime) changeDay;
34 |
35 | /// Specifies the weekday text: default is 'Week'
36 | final String weekdayText;
37 |
38 | /// Specifies the weekday strings ['Mon', 'Tue'...]
39 | final List weekdays;
40 |
41 | /// Background color
42 | final Color backgroundColor;
43 |
44 | /// Color of the selected day circle
45 | final Color selectedDigitBackgroundColor;
46 |
47 | /// Color of the border of the selected day circle
48 | final Color selectedDigitBorderColor;
49 |
50 | /// Color of the selected digit text
51 | final Color selectedDigitColor;
52 |
53 | /// Color of the unselected digits text
54 | final Color digitsColor;
55 |
56 | /// Is the color of the weekdays 'Mon', 'Tue'...
57 | final Color weekdayTextColor;
58 |
59 | /// Set to false to hide the weeknumber textfield to the left of the slider
60 | final bool enableWeeknumberText;
61 |
62 | /// Color of the weekday container
63 | final Color weeknumberColor;
64 |
65 | /// Color of the weekday text
66 | final Color weeknumberTextColor;
67 |
68 | /// Specifies the number of weekdays to render, default is 7, so Monday to Sunday
69 | final int daysInWeek;
70 |
71 | @override
72 | _WeeklyDatePickerState createState() => _WeeklyDatePickerState();
73 | }
74 |
75 | class _WeeklyDatePickerState extends State {
76 | final DateTime _todaysDateTime = DateTime.now();
77 |
78 | // About 100 years back in time should be sufficient for most users, 52 weeks * 100
79 | final int _weekIndexOffset = 5200;
80 |
81 | late final PageController _controller;
82 | late final DateTime _initialSelectedDay;
83 | late int _weeknumberInSwipe;
84 |
85 | @override
86 | void initState() {
87 | super.initState();
88 | _controller = PageController(initialPage: _weekIndexOffset);
89 | _initialSelectedDay = widget.selectedDay;
90 | _weeknumberInSwipe = widget.selectedDay.weekOfYear;
91 | }
92 |
93 | @override
94 | void dispose() {
95 | _controller.dispose();
96 | super.dispose();
97 | }
98 |
99 | @override
100 | Widget build(BuildContext context) {
101 | return Container(
102 | height: 64,
103 | color: widget.backgroundColor,
104 | child: Row(
105 | children: [
106 | widget.enableWeeknumberText
107 | ? Container(
108 | padding: EdgeInsets.all(8.0),
109 | color: widget.weeknumberColor,
110 | child: Text(
111 | '${widget.weekdayText} $_weeknumberInSwipe',
112 | style: TextStyle(color: widget.weeknumberTextColor),
113 | ),
114 | )
115 | : Container(),
116 | Expanded(
117 | child: PageView.builder(
118 | controller: _controller,
119 | onPageChanged: (int index) {
120 | setState(() {
121 | _weeknumberInSwipe = _initialSelectedDay
122 | .addDays(7 * (index - _weekIndexOffset))
123 | .weekOfYear;
124 | });
125 | },
126 | scrollDirection: Axis.horizontal,
127 | itemBuilder: (_, weekIndex) => Row(
128 | mainAxisAlignment: MainAxisAlignment.spaceAround,
129 | crossAxisAlignment: CrossAxisAlignment.center,
130 | children: _weekdays(weekIndex - _weekIndexOffset),
131 | ),
132 | ),
133 | ),
134 | ],
135 | ),
136 | );
137 | }
138 |
139 | // Builds a 5 day list of DateButtons
140 | List _weekdays(int weekIndex) {
141 | List weekdays = [];
142 |
143 | for (int i = 0; i < widget.daysInWeek; i++) {
144 | final int offset = i + 1 - _initialSelectedDay.weekday;
145 | final int daysToAdd = weekIndex * 7 + offset;
146 | final DateTime dateTime = _initialSelectedDay.addDays(daysToAdd);
147 | weekdays.add(_dateButton(dateTime));
148 | }
149 | return weekdays;
150 | }
151 |
152 | Widget _dateButton(DateTime dateTime) {
153 | final String weekday = widget.weekdays[dateTime.weekday - 1];
154 | final bool isSelected = dateTime.isSameDateAs(widget.selectedDay);
155 | final bool isTodaysDate = dateTime.isSameDateAs(_todaysDateTime);
156 |
157 | return Expanded(
158 | child: GestureDetector(
159 | onTap: () => widget.changeDay(dateTime),
160 | child: Container(
161 | // Bugfix, the transparent container makes the GestureDetector fill the Expanded
162 | color: Colors.transparent,
163 | child: Column(
164 | mainAxisAlignment: MainAxisAlignment.center,
165 | children: [
166 | Padding(
167 | padding: EdgeInsets.only(bottom: 4.0),
168 | child: Text(
169 | '$weekday',
170 | style:
171 | TextStyle(fontSize: 12.0, color: widget.weekdayTextColor),
172 | ),
173 | ),
174 | Container(
175 | padding: const EdgeInsets.all(1.0),
176 | decoration: BoxDecoration(
177 | // Border around today's date
178 | color: isTodaysDate
179 | ? widget.selectedDigitBorderColor
180 | : Colors.transparent,
181 | shape: BoxShape.circle),
182 | child: CircleAvatar(
183 | backgroundColor: isSelected
184 | ? widget.selectedDigitBackgroundColor
185 | : widget.backgroundColor,
186 | radius: 14.0,
187 | child: Text(
188 | '${dateTime.day}',
189 | style: TextStyle(
190 | fontSize: 16.0,
191 | color: isSelected
192 | ? widget.selectedDigitColor
193 | : widget.digitsColor),
194 | ),
195 | ),
196 | ),
197 | ],
198 | ),
199 | ),
200 | ),
201 | );
202 | }
203 | }
204 |
--------------------------------------------------------------------------------
/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 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: "direct dev"
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.17.2"
44 | fake_async:
45 | dependency: transitive
46 | description:
47 | name: fake_async
48 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.3.1"
52 | flutter:
53 | dependency: "direct main"
54 | description: flutter
55 | source: sdk
56 | version: "0.0.0"
57 | flutter_test:
58 | dependency: "direct dev"
59 | description: flutter
60 | source: sdk
61 | version: "0.0.0"
62 | matcher:
63 | dependency: transitive
64 | description:
65 | name: matcher
66 | sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
67 | url: "https://pub.dev"
68 | source: hosted
69 | version: "0.12.16"
70 | material_color_utilities:
71 | dependency: transitive
72 | description:
73 | name: material_color_utilities
74 | sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
75 | url: "https://pub.dev"
76 | source: hosted
77 | version: "0.5.0"
78 | meta:
79 | dependency: transitive
80 | description:
81 | name: meta
82 | sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
83 | url: "https://pub.dev"
84 | source: hosted
85 | version: "1.9.1"
86 | path:
87 | dependency: transitive
88 | description:
89 | name: path
90 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
91 | url: "https://pub.dev"
92 | source: hosted
93 | version: "1.8.3"
94 | sky_engine:
95 | dependency: transitive
96 | description: flutter
97 | source: sdk
98 | version: "0.0.99"
99 | source_span:
100 | dependency: transitive
101 | description:
102 | name: source_span
103 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
104 | url: "https://pub.dev"
105 | source: hosted
106 | version: "1.10.0"
107 | stack_trace:
108 | dependency: transitive
109 | description:
110 | name: stack_trace
111 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
112 | url: "https://pub.dev"
113 | source: hosted
114 | version: "1.11.0"
115 | stream_channel:
116 | dependency: transitive
117 | description:
118 | name: stream_channel
119 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
120 | url: "https://pub.dev"
121 | source: hosted
122 | version: "2.1.1"
123 | string_scanner:
124 | dependency: transitive
125 | description:
126 | name: string_scanner
127 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
128 | url: "https://pub.dev"
129 | source: hosted
130 | version: "1.2.0"
131 | term_glyph:
132 | dependency: transitive
133 | description:
134 | name: term_glyph
135 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
136 | url: "https://pub.dev"
137 | source: hosted
138 | version: "1.2.1"
139 | test_api:
140 | dependency: transitive
141 | description:
142 | name: test_api
143 | sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
144 | url: "https://pub.dev"
145 | source: hosted
146 | version: "0.6.0"
147 | vector_math:
148 | dependency: transitive
149 | description:
150 | name: vector_math
151 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
152 | url: "https://pub.dev"
153 | source: hosted
154 | version: "2.1.4"
155 | web:
156 | dependency: transitive
157 | description:
158 | name: web
159 | sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
160 | url: "https://pub.dev"
161 | source: hosted
162 | version: "0.1.4-beta"
163 | week_of_year:
164 | dependency: "direct main"
165 | description:
166 | name: week_of_year
167 | sha256: "578d2a9c7d93264b363ff3b1789e1acbae42295e803e70d362cfa07fcb73d3d1"
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "2.2.0"
171 | sdks:
172 | dart: ">=3.1.0-185.0.dev <4.0.0"
173 | flutter: ">=3.10.0"
174 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: weekly_date_picker
2 | description: A weekly date picker where you can scroll between weeks and select a date.
3 | version: 1.4.2
4 | homepage: https://github.com/Magnuti/Weekly-Date-Picker
5 |
6 | environment:
7 | sdk: ">=2.19.0 <4.0.0"
8 | flutter: ">=3.10.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | week_of_year: ^2.0.0
14 |
15 | dev_dependencies:
16 | clock: ^1.1.0
17 | flutter_test:
18 | sdk: flutter
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://dart.dev/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter.
24 | flutter:
25 |
26 | # To add assets to your package, add an assets section, like this:
27 | # assets:
28 | # - images/a_dot_burr.jpeg
29 | # - images/a_dot_ham.jpeg
30 | #
31 | # For details regarding assets in packages, see
32 | # https://flutter.dev/assets-and-images/#from-packages
33 | #
34 | # An image asset can refer to one or more resolution-specific "variants", see
35 | # https://flutter.dev/assets-and-images/#resolution-aware.
36 |
37 | # To add custom fonts to your package, add a fonts section here,
38 | # in this "flutter" section. Each entry in this list should have a
39 | # "family" key with the font family name, and a "fonts" key with a
40 | # list giving the asset and other descriptors for the font. For
41 | # example:
42 | # fonts:
43 | # - family: Schyler
44 | # fonts:
45 | # - asset: fonts/Schyler-Regular.ttf
46 | # - asset: fonts/Schyler-Italic.ttf
47 | # style: italic
48 | # - family: Trajan Pro
49 | # fonts:
50 | # - asset: fonts/TrajanPro.ttf
51 | # - asset: fonts/TrajanPro_Bold.ttf
52 | # weight: 700
53 | #
54 | # For details regarding fonts in packages, see
55 | # https://flutter.dev/custom-fonts/#from-packages
56 |
--------------------------------------------------------------------------------
/test/datetime_apis_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_test/flutter_test.dart';
2 | import "package:weekly_date_picker/datetime_apis.dart";
3 |
4 | void main() {
5 | group("DateTime extension should compare dates only ", () {
6 | test("Dates should be equal", () {
7 | DateTime d1 = new DateTime(2020, 2, 2);
8 | DateTime d2 = new DateTime(2020, 2, 2);
9 |
10 | expect(d1.isSameDateAs(d2), true);
11 | });
12 |
13 | test("Dates should be equal", () {
14 | DateTime d1 = new DateTime(2020, 2, 2, 17, 30);
15 | DateTime d2 = new DateTime(2020, 2, 2, 10, 20);
16 |
17 | expect(d1.isSameDateAs(d2), true);
18 | });
19 |
20 | test("Dates should be unequal", () {
21 | DateTime d1 = new DateTime(2020, 2, 3);
22 | DateTime d2 = new DateTime(2020, 2, 2);
23 |
24 | expect(d1.isSameDateAs(d2), false);
25 | });
26 |
27 | test("Dates should be unequal", () {
28 | DateTime d1 = new DateTime(2020, 5, 2);
29 | DateTime d2 = new DateTime(2020, 1, 2);
30 |
31 | expect(d1.isSameDateAs(d2), false);
32 | });
33 |
34 | test("Dates should be unequal", () {
35 | DateTime d1 = new DateTime(2019, 1, 1, 17, 30);
36 | DateTime d2 = new DateTime(2020, 1, 1, 10, 20);
37 |
38 | expect(d1.isSameDateAs(d2), false);
39 | });
40 | });
41 |
42 | group("DateTime addDate extension should work ", () {
43 | test("Add dates should work", () {
44 | DateTime date = new DateTime(2023, 1, 1);
45 | expect(date.addDays(1).isSameDateAs(DateTime(2023, 1, 2)), true);
46 | expect(date.addDays(30).isSameDateAs(DateTime(2023, 1, 31)), true);
47 | expect(date.addDays(31).isSameDateAs(DateTime(2023, 2, 1)), true);
48 | });
49 |
50 | test("Add dates should work with daylight savings", () {
51 | DateTime date = new DateTime(2023, 10, 29);
52 | expect(date.addDays(1).isSameDateAs(DateTime(2023, 10, 30)), true);
53 |
54 | // This one should fail since that date is daylight savings in Europe
55 | expect(date.add(Duration(days: 1)).isSameDateAs(DateTime(2023, 10, 30)),
56 | false);
57 | });
58 |
59 | test("Add dates should works over new year", () {
60 | DateTime date = new DateTime(2020, 12, 30);
61 | expect(date.addDays(2).isSameDateAs(DateTime(2021, 1, 1)), true);
62 | });
63 | });
64 | }
65 |
--------------------------------------------------------------------------------
/test/weekly_date_picker_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:clock/clock.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_test/flutter_test.dart';
5 | import 'package:weekly_date_picker/weekly_date_picker.dart';
6 |
7 | void main() {
8 | final DateTime defaultTime = DateTime(2021, 09, 28, 14, 0);
9 | final List defaultDates = [27, 28, 29, 30, 1, 2, 3];
10 | final List defaultWeekdays = [
11 | 'Mon',
12 | 'Tue',
13 | 'Wed',
14 | 'Thu',
15 | 'Fri',
16 | 'Sat',
17 | 'Sun'
18 | ];
19 |
20 | testWidgets("WeeklyDatePicker works with MaterialApp",
21 | (WidgetTester tester) async {
22 | withClock(Clock.fixed(defaultTime), () async {
23 | await tester.pumpWidget(
24 | MaterialApp(
25 | home: WeeklyDatePicker(
26 | selectedDay: clock.now(), changeDay: (value) => {})),
27 | );
28 | final weekTextFinder = find.text("Week 39");
29 | expect(weekTextFinder, findsOneWidget);
30 |
31 | for (String weekday in defaultWeekdays) {
32 | final weekdayFinder = find.text(weekday);
33 | expect(weekdayFinder, findsOneWidget);
34 | }
35 |
36 | for (int date in defaultDates) {
37 | final dateFinder = find.text(date.toString());
38 | expect(dateFinder, findsOneWidget);
39 | }
40 | });
41 | });
42 |
43 | testWidgets("WeeklyDatePicker works with CupertinoApp",
44 | (WidgetTester tester) async {
45 | withClock(Clock.fixed(defaultTime), () async {
46 | await tester.pumpWidget(
47 | CupertinoApp(
48 | home: WeeklyDatePicker(
49 | selectedDay: clock.now(), changeDay: (value) => {})),
50 | );
51 |
52 | final weekTextFinder = find.text("Week 39");
53 | expect(weekTextFinder, findsOneWidget);
54 |
55 | for (String weekday in defaultWeekdays) {
56 | final weekdayFinder = find.text(weekday);
57 | expect(weekdayFinder, findsOneWidget);
58 | }
59 |
60 | for (int date in defaultDates) {
61 | final dateFinder = find.text(date.toString());
62 | expect(dateFinder, findsOneWidget);
63 | }
64 | });
65 | });
66 |
67 | testWidgets(
68 | "WeeklyDatePicker shows all custom weekdays with custom week length",
69 | (WidgetTester tester) async {
70 | withClock(Clock.fixed(defaultTime), () async {
71 | final List weekdays = ['Mo', 'Tu', 'We', 'Th', 'Fr'];
72 | final List dates = [27, 28, 29, 30, 1];
73 |
74 | await tester.pumpWidget(
75 | MaterialApp(
76 | home: WeeklyDatePicker(
77 | selectedDay: clock.now(),
78 | changeDay: (value) => {},
79 | weekdays: weekdays,
80 | daysInWeek: 5,
81 | )),
82 | );
83 |
84 | for (String weekday in weekdays) {
85 | final weekdayFinder = find.text(weekday);
86 | expect(weekdayFinder, findsOneWidget);
87 | }
88 |
89 | for (int date in dates) {
90 | final dateFinder = find.text(date.toString());
91 | expect(dateFinder, findsOneWidget);
92 | }
93 | });
94 | });
95 |
96 | testWidgets("WeeklyDatePicker correctly does not display the week text",
97 | (WidgetTester tester) async {
98 | withClock(Clock.fixed(defaultTime), () async {
99 | await tester.pumpWidget(
100 | MaterialApp(
101 | home: WeeklyDatePicker(
102 | selectedDay: clock.now(),
103 | changeDay: (value) => {},
104 | enableWeeknumberText: false,
105 | )),
106 | );
107 |
108 | final weekTextFinder = find.text("Week 39");
109 | expect(weekTextFinder, findsNothing);
110 | });
111 | });
112 |
113 | testWidgets("WeeklyDatePicker allows custom week text",
114 | (WidgetTester tester) async {
115 | withClock(Clock.fixed(defaultTime), () async {
116 | await tester.pumpWidget(
117 | MaterialApp(
118 | home: WeeklyDatePicker(
119 | selectedDay: clock.now(),
120 | changeDay: (value) => {},
121 | weekdayText: "Uke",
122 | )),
123 | );
124 |
125 | final weekTextFinder = find.text("Week 39");
126 | expect(weekTextFinder, findsNothing);
127 | final ukeTextFinder = find.text("Uke 39");
128 | expect(ukeTextFinder, findsOneWidget);
129 | });
130 | });
131 |
132 | testWidgets("WeeklyDatePicker works with swipe", (WidgetTester tester) async {
133 | withClock(Clock.fixed(defaultTime), () async {
134 | await tester.pumpWidget(
135 | MaterialApp(
136 | home: WeeklyDatePicker(
137 | selectedDay: clock.now(), changeDay: (value) => {})),
138 | );
139 |
140 | final pageViewFinder = find.byType(PageView);
141 | final nextWeekDateFinder = find.text("4");
142 |
143 | await tester.dragUntilVisible(
144 | nextWeekDateFinder,
145 | pageViewFinder,
146 | Offset(-250, 0),
147 | );
148 |
149 | expect(nextWeekDateFinder, findsOneWidget);
150 | });
151 | });
152 |
153 | testWidgets("WeeklyDatePicker works with leap years",
154 | (WidgetTester tester) async {
155 | final DateTime leapYearDateTime = DateTime(2020, 02, 27);
156 |
157 | withClock(Clock.fixed(leapYearDateTime), () async {
158 | await tester.pumpWidget(
159 | MaterialApp(
160 | home: WeeklyDatePicker(
161 | selectedDay: leapYearDateTime, changeDay: (value) => {})),
162 | );
163 |
164 | final List dates = [24, 25, 26, 27, 28, 29, 1];
165 |
166 | for (int date in dates) {
167 | final dateFinder = find.text(date.toString());
168 | expect(dateFinder, findsOneWidget);
169 | }
170 |
171 | expect(find.text("Week 9"), findsOneWidget);
172 | });
173 | });
174 |
175 | testWidgets("WeeklyDatePicker works over new year",
176 | (WidgetTester tester) async {
177 | final DateTime leapYearDateTime = DateTime(2020, 12, 30);
178 |
179 | withClock(Clock.fixed(leapYearDateTime), () async {
180 | await tester.pumpWidget(
181 | MaterialApp(
182 | home: WeeklyDatePicker(
183 | selectedDay: leapYearDateTime, changeDay: (value) => {})),
184 | );
185 |
186 | final List dates = [28, 29, 30, 31, 1, 2, 3];
187 |
188 | for (int date in dates) {
189 | final dateFinder = find.text(date.toString());
190 | expect(dateFinder, findsOneWidget);
191 | }
192 |
193 | expect(find.text("Week 53"), findsOneWidget);
194 |
195 | final pageViewFinder = find.byType(PageView);
196 | final nextWeekDateFinder = find.text("10");
197 |
198 | await tester.dragUntilVisible(
199 | nextWeekDateFinder,
200 | pageViewFinder,
201 | Offset(-250, 0),
202 | );
203 |
204 | expect(find.text("Week 54"), findsNothing);
205 | expect(find.text("Week 1"), findsOneWidget);
206 |
207 | final List datesAfterScroll = [4, 5, 6, 7, 8, 9, 10];
208 |
209 | for (int date in datesAfterScroll) {
210 | final dateFinder = find.text(date.toString());
211 | expect(dateFinder, findsOneWidget);
212 | }
213 | });
214 | });
215 |
216 | testWidgets("WeeklyDatePicker works backwards in time",
217 | (WidgetTester tester) async {
218 | withClock(Clock.fixed(defaultTime), () async {
219 | await tester.pumpWidget(
220 | MaterialApp(
221 | home: WeeklyDatePicker(
222 | selectedDay: clock.now(), changeDay: (value) => {})),
223 | );
224 |
225 | expect(find.text("Week 39"), findsOneWidget);
226 |
227 | final pageViewFinder = find.byType(PageView);
228 | final nextWeekDateFinder = find.text("21");
229 |
230 | await tester.dragUntilVisible(
231 | nextWeekDateFinder,
232 | pageViewFinder,
233 | Offset(250, 0),
234 | );
235 |
236 | expect(nextWeekDateFinder, findsOneWidget);
237 |
238 | final List previousWeekDates = [20, 21, 22, 23, 24, 25, 26];
239 | for (int date in previousWeekDates) {
240 | final dateFinder = find.text(date.toString());
241 | expect(dateFinder, findsOneWidget);
242 | }
243 |
244 | expect(find.text("Week 38"), findsOneWidget);
245 | expect(find.text("Week 39"), findsNothing);
246 | });
247 | });
248 | }
249 |
--------------------------------------------------------------------------------