Skip to content

Commit

Permalink
feat(ui): Scroll list view to today
Browse files Browse the repository at this point in the history
  • Loading branch information
agfeo committed Aug 27, 2024
1 parent 9fa8c95 commit 5f08c6b
Show file tree
Hide file tree
Showing 13 changed files with 117 additions and 194 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [0.4.10] - 2024-08-27
* macos_ui removed as dependency
* Issue #84: Events added after initial load are not displayed in the monthly view
* touch target of the today button enlarded
* event list view now scrolls to today (or closest entry to today's date) when today button is hit
* CalendarTiles text doesn't scale with system settings

## [0.4.9] - 2024-08-14
* Issue #83: Updating the internal data possible again

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ final bool showEvents;
```
This is a `bool`. This parameter allows you to decide, if the calender shows a list of events. Default value is set to `true`, but you can hide the events entirely by setting it to `false`.

#### `showEventListView`
#### `forceEventListView`

```dart
final bool showEventListView;
final bool forceEventListView;
````
With this `bool` parameter you can switch the view to a list of events only. If set to `true` the calendar grid gets hidden.

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class _CalendarScreenState extends State<CalendarScreen> {
datePickerType: DatePickerType.date,
dayOfWeekStyle: TextStyle(
color: Colors.red, fontWeight: FontWeight.w800, fontSize: 11),
showEventListViewIcon: false,
showEventListViewIcon: true,
showEvents: showEvents,
),
),
Expand Down
6 changes: 0 additions & 6 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
import FlutterMacOS
import Foundation

import appkit_ui_element_colors
import macos_ui
import macos_window_utils

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AppkitUiElementColorsPlugin.register(with: registry.registrar(forPlugin: "AppkitUiElementColorsPlugin"))
MacOSUiPlugin.register(with: registry.registrar(forPlugin: "MacOSUiPlugin"))
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
}
20 changes: 1 addition & 19 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
PODS:
- appkit_ui_element_colors (1.0.0):
- FlutterMacOS
- FlutterMacOS (1.0.0)
- macos_ui (0.1.0):
- FlutterMacOS
- macos_window_utils (1.0.0):
- FlutterMacOS

DEPENDENCIES:
- appkit_ui_element_colors (from `Flutter/ephemeral/.symlinks/plugins/appkit_ui_element_colors/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- macos_ui (from `Flutter/ephemeral/.symlinks/plugins/macos_ui/macos`)
- macos_window_utils (from `Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos`)

EXTERNAL SOURCES:
appkit_ui_element_colors:
:path: Flutter/ephemeral/.symlinks/plugins/appkit_ui_element_colors/macos
FlutterMacOS:
:path: Flutter/ephemeral
macos_ui:
:path: Flutter/ephemeral/.symlinks/plugins/macos_ui/macos
macos_window_utils:
:path: Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos

SPEC CHECKSUMS:
appkit_ui_element_colors: 39bb2d80be3f19b152ccf4c70d5bbe6cba43d74a
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
macos_ui: 6229a8922cd97bafb7d9636c8eb8dfb0744183ca
macos_window_utils: 933f91f64805e2eb91a5bd057cf97cd097276663

PODFILE CHECKSUM: 505596d150d38022472859d890f709281982e016

COCOAPODS: 1.13.0
COCOAPODS: 1.15.2
18 changes: 0 additions & 18 deletions example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
E5ED0699756C4EAF38EEC7A3 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -314,23 +313,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E5ED0699756C4EAF38EEC7A3 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
2 changes: 1 addition & 1 deletion example/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
Expand Down
74 changes: 13 additions & 61 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
appkit_ui_element_colors:
dependency: transitive
description:
name: appkit_ui_element_colors
sha256: c3e50f900aae314d339de489535736238627071457c4a4a2dbbb1545b4f04f22
url: "https://pub.dev"
source: hosted
version: "1.0.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -57,14 +49,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.8"
equatable:
dependency: transitive
description:
name: equatable
sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
url: "https://pub.dev"
source: hosted
version: "2.0.5"
fake_async:
dependency: transitive
description:
Expand All @@ -89,7 +73,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.4.7"
version: "0.4.10"
flutter_platform_widgets:
dependency: transitive
description:
Expand All @@ -103,14 +87,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
gradient_borders:
dependency: transitive
description:
name: gradient_borders
sha256: "69eeaff519d145a4c6c213ada1abae386bcc8981a4970d923e478ce7ba19e309"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
intl:
dependency: transitive
description:
Expand All @@ -123,18 +99,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev"
source: hosted
version: "10.0.4"
version: "10.0.5"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
Expand All @@ -143,22 +119,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.1"
macos_ui:
dependency: transitive
description:
name: macos_ui
sha256: "91c7f3427f763fd96b65831342b896b18751140e6bf55f8572fcb41f7b30bcab"
url: "https://pub.dev"
source: hosted
version: "2.0.7"
macos_window_utils:
dependency: transitive
description:
name: macos_window_utils
sha256: "230be594d26f6dee92c5a1544f4242d25138a5bfb9f185b27f14de3949ef0be8"
url: "https://pub.dev"
source: hosted
version: "1.5.0"
matcher:
dependency: transitive
description:
Expand All @@ -171,18 +131,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.15.0"
path:
dependency: transitive
description:
Expand All @@ -191,14 +151,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.8"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -248,10 +200,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
version: "0.7.2"
vector_math:
dependency: transitive
description:
Expand All @@ -264,10 +216,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "14.2.1"
version: "14.2.5"
sdks:
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.19.0"
1 change: 1 addition & 0 deletions lib/calendar_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class NeatCleanCalendarTile extends StatelessWidget {
? defaultOutOfMonthDayColor
: Colors.grey),
),
textScaler: TextScaler.noScaling,
// Grey color for previous or next months dates
),
// Dots for the events
Expand Down
Loading

0 comments on commit 5f08c6b

Please sign in to comment.