-
-
Notifications
You must be signed in to change notification settings - Fork 206
Add Aggregate Query Support to Parse Flutter SDK #1041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
part of '../../parse_server_sdk.dart'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
class ParseAggregate { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
final String className; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Map<String, dynamic> pipeline; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
final bool? debug; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
final ParseClient? client; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
final bool? autoSendSessionId; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
final String? parseClassName; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ParseAggregate(this.className,{required this.pipeline,this.debug, this.client, this.autoSendSessionId, this.parseClassName}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+1
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add comprehensive documentation and improve code formatting. The class lacks proper documentation explaining its purpose, parameters, and usage. Additionally, there are formatting issues. Add proper documentation and fix formatting: part of '../../parse_server_sdk.dart';
+/// A class that provides support for Parse Server aggregate queries.
+///
+/// Aggregate queries allow complex data aggregation operations like grouping,
+/// filtering, projecting, etc. using MongoDB's aggregation pipeline syntax.
+///
+/// Example usage:
+/// ```dart
+/// final aggregate = ParseAggregate('YourClassName',
+/// pipeline: {'\$match': {'field': 'value'}});
+/// final response = await aggregate.execute();
+/// ```
class ParseAggregate {
/// The Parse class name to perform aggregation on
final String className;
/// The aggregation pipeline defining the operations to perform
/// Must be a valid MongoDB aggregation pipeline
Map<String, dynamic> pipeline;
/// Whether to enable debug logging
final bool? debug;
/// Custom Parse client instance
final ParseClient? client;
/// Whether to automatically send the session ID
final bool? autoSendSessionId;
/// Custom Parse class name for response handling
final String? parseClassName;
- ParseAggregate(this.className,{required this.pipeline,this.debug, this.client, this.autoSendSessionId, this.parseClassName});
+ /// Creates a new ParseAggregate instance.
+ ///
+ /// [className] is the Parse class to query.
+ /// [pipeline] defines the aggregation operations to perform.
+ ParseAggregate(
+ this.className, {
+ required this.pipeline,
+ this.debug,
+ this.client,
+ this.autoSendSessionId,
+ this.parseClassName,
+ }); 🤖 Prompt for AI Agents (early access)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Future<ParseResponse> execute() async { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Map<String,String> _pipeline={}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if(pipeline.isEmpty){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
throw ArgumentError('pipeline must not be empty. Please add pipeline operations to aggregate data. Example: {"\$group": {"_id": "\$userId", "totalScore": {"\$sum": "\$score"}}} '); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
_pipeline.addAll({'pipeline':jsonEncode([pipeline])}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
final debugBool = isDebugEnabled(objectLevelDebug: debug); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
final result = await ParseObject(className)._client.get( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uri.parse('${ParseCoreData().serverUrl}$keyEndPointAggregate$className').replace(queryParameters: _pipeline).toString(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
print('result >>> ${result.data}'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return handleResponse<ParseObject>( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ParseObject(className), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
result, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ParseApiRQ.get, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
debugBool, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parseClassName ?? 'ParseBase', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+13
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove debug print statement and improve pipeline parameter handling. The Make the following improvements: + /// Executes the aggregate query and returns the response.
+ ///
+ /// Throws an [ArgumentError] if the pipeline is empty.
+ /// Returns a [ParseResponse] containing the query results.
Future<ParseResponse> execute() async {
- Map<String,String> _pipeline={};
+ Map<String, String> queryParams = {};
if(pipeline.isEmpty){
throw ArgumentError('pipeline must not be empty. Please add pipeline operations to aggregate data. Example: {"\$group": {"_id": "\$userId", "totalScore": {"\$sum": "\$score"}}} ');
}
else{
- _pipeline.addAll({'pipeline':jsonEncode([pipeline])});
+ queryParams.addAll({'pipeline': jsonEncode([pipeline])});
}
final debugBool = isDebugEnabled(objectLevelDebug: debug);
final result = await ParseObject(className)._client.get(
- Uri.parse('${ParseCoreData().serverUrl}$keyEndPointAggregate$className').replace(queryParameters: _pipeline).toString(),
+ Uri.parse('${ParseCoreData().serverUrl}$keyEndPointAggregate$className')
+ .replace(queryParameters: queryParams)
+ .toString(),
);
- print('result >>> ${result.data}');
+ // Use ParseCoreData().logger instead of print for debugging
+ if (debugBool) {
+ ParseCoreData().logger.info('Aggregate query result: ${result.data}');
+ }
return handleResponse<ParseObject>(
ParseObject(className),
result,
ParseApiRQ.get,
debugBool,
parseClassName ?? 'ParseBase',
);
} 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents (early access)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+1
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent ❓ Verification inconclusiveAdd test coverage for the new aggregate functionality. The PR objectives mention that tests are planned but not yet implemented. Tests are essential for ensuring this new functionality works correctly. Please ensure comprehensive test coverage is added for the
🏁 Script executed: #!/bin/bash
# Look for test files related to the aggregate functionality
fd -e dart "aggregate.*test"
# Check coverage in existing test files for references to ParseAggregate
rg -l "ParseAggregate" --type dart packages/dart/test/ Length of output: 85 Add comprehensive test coverage for No existing tests for the new aggregate functionality were found. Please add tests in
Ensure these tests exercise both positive and negative scenarios and validate that 🤖 Prompt for AI Agents (early access)
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class UrlReplace{ | ||
String? scheme; | ||
String? userInfo; | ||
String? host; | ||
int? port; | ||
String? path; | ||
Iterable<String>? pathSegments; | ||
String? query; | ||
Map<String, dynamic>? queryParameters; | ||
String? fragment; | ||
|
||
UrlReplace({ | ||
this.scheme, | ||
this.userInfo, | ||
this.host, | ||
this.port, | ||
this.path, | ||
this.pathSegments, | ||
this.query, | ||
this.queryParameters, | ||
this.fragment, | ||
}); | ||
|
||
} | ||
Comment on lines
+1
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add documentation and consider using Dart's Uri class instead. This class lacks documentation explaining its purpose and usage. Additionally, it appears to duplicate functionality that's already available in Dart's
-class UrlReplace{
+/// A container for URL components used for URL manipulation operations.
+/// This class provides a convenient way to store and pass URL components.
+class UrlReplace {
/// The URL scheme (e.g., 'http', 'https')
String? scheme;
/// The user info portion of the URL
String? userInfo;
/// The host name
String? host;
/// The port number
int? port;
/// The path component of the URL
String? path;
/// The path segments as an iterable collection
Iterable<String>? pathSegments;
/// The query string
String? query;
/// The query parameters as a map
Map<String, dynamic>? queryParameters;
/// The fragment identifier
String? fragment;
+ /// Creates a new UrlReplace instance with the specified URL components.
UrlReplace({
this.scheme,
this.userInfo,
this.host,
this.port,
this.path,
this.pathSegments,
this.query,
this.queryParameters,
this.fragment,
});
} 🤖 Prompt for AI Agents (early access)
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -24,7 +24,7 @@ dependencies: | |||||||||||
# Networking | ||||||||||||
dio: ^5.7.0 | ||||||||||||
http: ^1.2.0 | ||||||||||||
web_socket_channel: ^2.4.3 | ||||||||||||
web_socket_channel: ^3.0.3 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify compatibility with web_socket_channel major version upgrade The 🌐 Web query:
💡 Result: Breaking Changes in
|
Breaking Change | Details |
---|---|
Constructor removal | No direct WebSocketChannel() instantiation; use factory constructors instead |
Abstract interface | WebSocketChannel is now abstract; use specific implementations |
Exception change in ready |
Throws WebSocketChannelException (previously WebSocketException ) |
Default web adapter | Uses package:web_socket adapter for web via WebSocketChannel.connect |
Developers upgrading to v3.0.0 should adjust their code to accommodate these changes[1][6].
Citations:
- 1: https://github.com/dart-lang/web_socket_channel/blob/master/CHANGELOG.md
- 2: https://github.com/dart-lang/web_socket_channel/releases
- 3: https://chromium.googlesource.com/external/github.com/dart-lang/shelf_web_socket/+/24fb8a04befa75a94ac63a27047b231d1a22aab4/CHANGELOG.md
- 4: https://pub.dev/packages/web_socket_channel
- 5: https://dartfrog.vgv.dev/docs/tutorials/web_socket_counter
- 6: https://pub.dev/packages/web_socket_channel/changelog
- 7: https://pub.dev/packages/centrifuge/changelog
- 8: https://pub.dev/packages/deepgram_speech_to_text/changelog
- 9: https://dartfrog.vgv.dev/docs/advanced/web_socket
- 10: https://websockets.readthedocs.io/en/stable/project/changelog.html
Validate Breaking Changes for web_socket_channel v3.0.0
We’ve bumped web_socket_channel
from ^2.4.3
to ^3.0.3
, which includes these breaking changes:
- Removal of the direct
WebSocketChannel()
constructor – you must now useWebSocketChannel.connect(...)
. WebSocketChannel
is now an abstract interface.IOWebSocketChannel.ready
throwsWebSocketChannelException
(instead ofWebSocketException
).- Default web implementation now uses the
package:web_socket
adapter.
Please audit the Dart code for:
- Any instantiation of
WebSocketChannel()
(replace withconnect
). - Direct uses of
IOWebSocketChannel
and calls to itsready
property (update exception handling). - Web‐platform socket code relying on the old adapter.
Make the necessary updates or confirm that your code paths already comply with the new API.
🤖 Prompt for AI Agents (early access)
In packages/dart/pubspec.yaml at line 27, the web_socket_channel dependency has been upgraded from ^2.4.3 to ^3.0.3, which introduces breaking changes. Audit all Dart code that uses web_socket_channel for direct instantiation of WebSocketChannel() and replace these with WebSocketChannel.connect(...) factory methods. Also, update any exception handling around IOWebSocketChannel.ready to catch WebSocketChannelException instead of WebSocketException. Verify web platform socket code to ensure compatibility with the new package:web_socket adapter. Make these code adjustments to align with the new major version API.
Original file line number | Diff line number | Diff line change | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -25,7 +25,7 @@ dependencies: | ||||||||||||||||
flutter: | |||||||||||||||||
sdk: flutter | |||||||||||||||||
|
|||||||||||||||||
parse_server_sdk: ^6.4.0 | |||||||||||||||||
parse_server_sdk: ^8.0.0 | |||||||||||||||||
# Uncomment for local testing | |||||||||||||||||
#parse_server_sdk: | |||||||||||||||||
# path: ../dart | |||||||||||||||||
|
@@ -40,14 +40,14 @@ dependencies: | ||||||||||||||||
|
|||||||||||||||||
# Utils | |||||||||||||||||
path_provider: ^2.1.4 | |||||||||||||||||
package_info_plus: ^5.0.1 | |||||||||||||||||
package_info_plus: ^8.3.0 | |||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainCheck for potential issues with package_info_plus upgrade The 🌐 Web query:
💡 Result: Breaking Changes Between
|
Version | Breaking Change Description |
---|---|
5.0.1 | versionJsonUrl can omit .json extension on web[3] |
7.0.0 | buildSignature uses SHA-256 on Android[1] |
If you rely on either buildSignature
for Android or serve web builds with a specific versionJsonUrl
file extension, carefully review your implementation when upgrading between these versions.
Further Recommendations:
- Review the full changelog for
package_info_plus
for all detailed updates between your installed version and the latest[1]. - Test each platform you support (Android, iOS, Web) after upgrading to catch any behavioral nuances, especially around version/build info retrieval and signature computation.
Citations:
- 1: https://pub.dev/packages/package_info_plus/changelog
- 2: https://github.com/fluttercommunity/plus_plugins/blob/main/packages/share_plus/share_plus/CHANGELOG.md
- 3: https://pub.dev/packages/package_info_plus/versions/5.0.1/changelog
- 4: package_info_plus 5.0.1 not supporting. fluttercommunity/wakelock_plus#16
- 5: https://docs.flutter.dev/release/breaking-changes
- 6: https://www.dhiwise.com/post/complete-guide-to-using-flutter-package-info-plus-for-app
- 7: https://pub.dev/packages/sentry_flutter/versions/8.14.1/changelog
- 8: https://pub.dev/packages/package_info_plus
- 9: [Question]: Error build android since package_info_plus 3.0.1 fluttercommunity/plus_plugins#1290
- 10: https://community.flutterflow.io/ask-the-community/post/execution-failed-for-task-package-info-plus-compilereleasejavawithjavac-lx9rOtUbT6bNb4f
Review Breaking Changes in package_info_plus Upgrade
The jump from ^5.0.1
to ^8.3.0
introduces a couple of breaking changes you should verify:
- Android (v7.0.0):
buildSignature
now uses SHA-256 instead of the previous hashing method. If your app logic depends on this value, update or re-test accordingly. - Web (v5.0.1):
versionJsonUrl
no longer requires a.json
extension. Ensure your server or deployment doesn’t rely on a fixed.json
suffix.
All other core PackageInfo
APIs (version, build number, etc.) remain unchanged. Please review your implementation, adjust any dependent logic, and test each platform (Android, iOS, Web) after upgrading.
🤖 Prompt for AI Agents (early access)
In packages/flutter/pubspec.yaml at line 43, the package_info_plus dependency was upgraded from ^5.0.1 to ^8.3.0, which includes breaking changes. Review your app code for any usage of buildSignature on Android and update or retest it due to the switch to SHA-256 hashing in v7.0.0. Also, verify your web deployment does not rely on a .json extension in versionJsonUrl, adjusting server or deployment settings if necessary. Finally, test all platforms thoroughly to ensure compatibility with the new package version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Updated linting rules
The flutter_lints
dev dependency has been updated from ^4.0.0
to ^5.0.0
. This may introduce new linting rules or deprecate existing ones.
🌐 Web query:
What are the changes in flutter_lints between version 4.0.0 and 5.0.0?
💡 Result:
Changes in flutter_lints
Between Versions 4.0.0 and 5.0.0
Summary Table
Category | 4.0.0 | 5.0.0 |
---|---|---|
package:lints dependency |
4.0.0 | 5.0.0 |
Minimum SDK | Flutter 3.13 / Dart 3.1 | Flutter 3.24 / Dart 3.5 |
Lints Added | library_annotations no_wildcard_variable_uses |
invalid_runtime_check_with_js_interop_types unnecessary_library_name |
Lints Removed | package_prefixed_library_names library_names |
avoid_null_checks_in_equality_operators prefer_const_constructors prefer_const_declarations prefer_const_literals_to_create_immutables |
Detailed Changes
Dependency and SDK Updates
- The internal dependency was updated:
package:lints
upgraded from version 4.0.0 to 5.0.0. - Minimum required Flutter and Dart SDK versions increased to Flutter 3.24 and Dart 3.5[1][2][4].
New Lints Added
invalid_runtime_check_with_js_interop_types
: Prevents incorrect runtime checks with interop types, improving JavaScript interoperability safety.unnecessary_library_name
: Discourages unnecessary library name declarations for cleaner code[1][4].
Lints Removed
avoid_null_checks_in_equality_operators
: This removal gives developers more control over hownull
is handled in equality checks[1][4].prefer_const_constructors
prefer_const_declarations
prefer_const_literals_to_create_immutables
These three "prefer_const_" lints were removed to simplify constant usage recommendations in Flutter projects, as they were sometimes seen as overly restrictive[1][4].
Removed in 4.0.0 (Still Absent in 5.0.0)
package_prefixed_library_names
library_names
These were already removed in the shift from 3.0.2 to 4.0.0[1].
Added in 4.0.0 (Still Present Unless Otherwise Stated)
library_annotations
no_wildcard_variable_uses
What This Means for Your Project
- Upgrading to 5.0.0 may introduce new lint warnings related to JavaScript interop and unnecessary library name usage.
- Code that previously failed the removed lints (
prefer_const_*
andavoid_null_checks_in_equality_operators
) will no longer be flagged. - Projects must now use newer Flutter and Dart SDKs (at least Flutter 3.24 / Dart 3.5)[1][2][4].
Upgrading will keep your project aligned with the latest best practices and Dart ecosystem trends, and may lead to cleaner, more maintainable codebases[4].
Citations:
- 1: https://pub.dev/packages/flutter_lints/changelog
- 2: https://pub.dev/packages/flutter_lints/versions
- 3: https://github.com/FlutterGen/flutter_gen/blob/main/CHANGELOG.md
- 4: https://www.victorcarreras.dev/2024/10/whats-new-in-flutter-lints-500-key.html
- 5: https://docs.flutter.dev/release/breaking-changes/flutter-lints-package
- 6: https://gitlab.com/TheOneWithTheBraid/f_wallet/-/merge_requests/67
- 7: https://github.com/inway/flutter_ringtone_player/blob/main/CHANGELOG.md
- 8: error fluttercommunity/flutter_launcher_icons#606
- 9: https://github.com/flutter-form-builder-ecosystem/form_builder_validators/actions/runs/11050840691
- 10: https://community.flutterflow.io/c/whats-new-in-flutterflow/post/what-s-new-in-flutterflow-october-22-2024-SwPJhrzf93cjCkp
Update Dart/Flutter SDK Constraints & Address New Lint Rules
Please ensure the upgrade to flutter_lints: ^5.0.0
is fully supported:
• In packages/flutter/pubspec.yaml
, bump your environment SDKs to meet the new minimums:
environment:
sdk: ">=3.5.0 <4.0.0"
flutter: ">=3.24.0"
• Run
flutter pub upgrade
flutter analyze
to surface the two new lints:
invalid_runtime_check_with_js_interop_types
unnecessary_library_name
• Review and adjust any code patterns that relied on lints now removed:
avoid_null_checks_in_equality_operators
prefer_const_constructors
prefer_const_declarations
prefer_const_literals_to_create_immutables
🤖 Prompt for AI Agents (early access)
In packages/flutter/pubspec.yaml at line 50, after updating flutter_lints to ^5.0.0, update the environment SDK constraints to sdk: ">=3.5.0 <4.0.0" and flutter: ">=3.24.0" to meet new minimum requirements. Then run flutter pub upgrade and flutter analyze to detect new lint warnings for invalid_runtime_check_with_js_interop_types and unnecessary_library_name. Finally, review and modify code to comply with these new lints and adjust any code relying on removed lints like avoid_null_checks_in_equality_operators and the prefer_const_* rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance the ParseAggregate example with error handling and documentation
The example demonstrates the new aggregation query feature, but could be improved with error handling and better documentation.
Consider adding error handling and more descriptive output:
🤖 Prompt for AI Agents (early access)