From 8255791c475380f1783502f474d8c860640ff273 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Wed, 10 Dec 2025 09:02:43 -0800 Subject: [PATCH] 0.70.0 sensors (#59) * Update flet dependency to use 'sensors' branch Changed the flet package override to reference the 'sensors' branch instead of 'main'. This may be to incorporate new features or fixes related to sensors from the upstream repository. * Update and clean up dependencies in pubspec.yaml Removed 'url_strategy' dependency, updated 'package_info_plus' and 'window_manager' to newer versions, and added 'sensors_plus'. This keeps dependencies current and removes unused packages. * Add url_strategy dependency to pubspec.yaml Included the url_strategy package version 0.2.0 to the dependencies for improved URL handling in the project. * Update sensors_plus to version 7.0.0 Bumped sensors_plus dependency from 6.1.1 to 7.0.0 in pubspec.yaml to use the latest features and fixes. * Add screen_brightness dependency and update flet ref Added the screen_brightness package to dependencies and updated the flet dependency override to use the sensors-brightness branch. This enables brightness control functionality and ensures compatibility with the latest flet features. * Update flet dependency override to 'sensors' ref Changed the flet package git reference from 'sensors-brightness' to 'sensors' in pubspec.yaml to use the updated branch. * Add wakelock_plus dependency Added wakelock_plus version 1.4.0 to pubspec.yaml to enable wakelock functionality in the project. * Remove wakelock_plus and window_manager dependencies The wakelock_plus and window_manager dependencies have been removed from pubspec.yaml, possibly due to no longer being required in the project. * Remove url_strategy dependency from pubspec.yaml The url_strategy package has been removed from the dependencies list, possibly because it is no longer needed or used in the project. * Update url_strategy import and add flutter_web_plugins Replaced the url_strategy import with flutter_web_plugins/url_strategy in main.dart and added flutter_web_plugins to pubspec.yaml dependencies to ensure compatibility and proper URL strategy support. * Replace setPathUrlStrategy with usePathUrlStrategy Updated the URL strategy function call to usePathUrlStrategy for web routing. This change ensures compatibility with the latest API and improves route handling. * Add wakelock_plus to dependency overrides Added wakelock_plus version 1.4.0 to the dependency_overrides section in pubspec.yaml to enable wakelock functionality in the project. * Add file_picker dependency to pubspec.yaml Included the file_picker package (version ^10.3.3) in dependencies to enable file selection functionality in the project. * Add new dependencies to pubspec.yaml Added device_info_plus, shared_preferences, and url_launcher to the dependencies. Reordered some existing dependencies for consistency. * Add battery_plus dependency to pubspec.yaml Included battery_plus version ^6.2.2 in dependencies to enable battery information features in the project. * Add connectivity_plus dependency to pubspec.yaml Added the connectivity_plus package (version ^6.1.2) to the dependencies for network connectivity features. * Add share_plus dependency to pubspec.yaml Included the share_plus package (version ^12.0.1) in dependencies to enable sharing functionality within the project. * Update Flutter plugin dependencies to latest versions Upgraded battery_plus, connectivity_plus, device_info_plus, and screen_brightness to their latest compatible versions in pubspec.yaml to ensure compatibility and access to new features and bug fixes. * Update flet dependency to use main branch Changed the flet dependency override from the 'sensors' branch to the 'main' branch in pubspec.yaml to ensure the latest stable code is used. --- {{cookiecutter.out_dir}}/lib/main.dart | 4 ++-- {{cookiecutter.out_dir}}/pubspec.yaml | 25 +++++++++++++++++-------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/{{cookiecutter.out_dir}}/lib/main.dart b/{{cookiecutter.out_dir}}/lib/main.dart index 2b04d2b..02b0d80 100644 --- a/{{cookiecutter.out_dir}}/lib/main.dart +++ b/{{cookiecutter.out_dir}}/lib/main.dart @@ -9,7 +9,7 @@ import 'package:package_info_plus/package_info_plus.dart'; import 'package:path/path.dart' as path; import 'package:path_provider/path_provider.dart' as path_provider; import 'package:serious_python/serious_python.dart'; -import 'package:url_strategy/url_strategy.dart'; +import 'package:flutter_web_plugins/url_strategy.dart'; import 'package:window_manager/window_manager.dart'; import "python.dart"; @@ -134,7 +134,7 @@ Future prepareApp() async { pageUrl = Uri.base.toString(); var routeUrlStrategy = getFletRouteUrlStrategy(); if (routeUrlStrategy == "path") { - setPathUrlStrategy(); + usePathUrlStrategy(); } } else if (_args.isNotEmpty && isDesktopPlatform()) { // developer mode diff --git a/{{cookiecutter.out_dir}}/pubspec.yaml b/{{cookiecutter.out_dir}}/pubspec.yaml index f3e376b..0e3ed24 100644 --- a/{{cookiecutter.out_dir}}/pubspec.yaml +++ b/{{cookiecutter.out_dir}}/pubspec.yaml @@ -10,16 +10,26 @@ environment: dependencies: flutter: sdk: flutter - + flutter_web_plugins: + sdk: flutter + serious_python: 0.9.6 - path: ^1.9.0 - file_picker: ^10.3.3 - url_strategy: ^0.2.0 + battery_plus: ^7.0.0 + connectivity_plus: ^7.0.0 cupertino_icons: ^1.0.6 + device_info_plus: ^12.3.0 + file_picker: ^10.3.3 + package_info_plus: ^9.0.0 path_provider: ^2.1.4 - package_info_plus: ^8.0.2 - window_manager: ^0.4.3 + path: ^1.9.0 + screen_brightness: ^2.1.7 + sensors_plus: ^7.0.0 + shared_preferences: 2.5.3 + share_plus: ^12.0.1 + url_launcher: 6.3.2 + wakelock_plus: ^1.4.0 + window_manager: ^0.5.1 dependency_overrides: #flet: 0.27.6 @@ -38,9 +48,8 @@ dependency_overrides: # ref: fix-zip-directory # path: src/serious_python - wakelock_plus: ^1.4.0 package_info_plus: ^9.0.0 - window_manager: ^0.5.1 + wakelock_plus: ^1.4.0 # {% if 'flet_geolocator' in cookiecutter.flutter.dependencies %} # geolocator: ^12.0.0