Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
c3bfa4b
Added details about querying for users
gunhaxxor Mar 5, 2021
a9dbafb
Add official flutter .gitignore
nstrelow Mar 17, 2021
be49148
Remove .gitignored files
nstrelow Mar 17, 2021
0861959
dart: Update dependencies to null-safety
nstrelow Mar 17, 2021
d50b932
dart: Use relative imports for our files
nstrelow Mar 17, 2021
06f6247
dart: Fix breaking http change: String -> Uri
nstrelow Mar 17, 2021
66e9183
dart: Remove unused variable
nstrelow Mar 17, 2021
7ab54d2
dart: constants: Update version
nstrelow Mar 17, 2021
4e22739
dart: Make debug, autoSendSessionId required
nstrelow Mar 17, 2021
397afd0
dart(CoreData): No need to check for null
nstrelow Mar 17, 2021
8b69703
dart(CoreData): liveListRetryIntervals always set
nstrelow Mar 17, 2021
636766f
Change order of vars
nstrelow Mar 17, 2021
bad4f7c
dart(CoreData): Storage is never set outside
nstrelow Mar 17, 2021
84122da
dart(CoreData): storage is never null
nstrelow Mar 17, 2021
d63a231
clientCreator is initialized, so never null
nstrelow Mar 17, 2021
8fa8b91
Do not use a setter and then provide a nullable
nstrelow Mar 17, 2021
27982f3
dart: Annotate ParseClient
nstrelow Mar 17, 2021
420ca1d
dart: Headers are always Map<String,String>
nstrelow Mar 17, 2021
9f47889
data could be null, use null-safe operator
nstrelow Mar 17, 2021
f03ab44
HTTP header value should always be set
nstrelow Mar 17, 2021
8193d21
sendSessionId has to be set or defaults to false
nstrelow Mar 17, 2021
261554b
additionalHeaders is null, if not overriden
nstrelow Mar 17, 2021
eaca9f7
Rename data -> parseCoreData
nstrelow Mar 17, 2021
402efc6
Remove unnecessary parantheses and == true check
nstrelow Mar 17, 2021
fd1e714
Change to BaseRequest
nstrelow Mar 17, 2021
822d69f
Name and value are never null
nstrelow Mar 17, 2021
e4af180
Rename data -> parseCoreData
nstrelow Mar 17, 2021
5852ae5
Remove unnecessary this
nstrelow Mar 17, 2021
bb4bfef
Remove unnecessary parantheses
nstrelow Mar 17, 2021
4e87a39
Make sure headers is never null
nstrelow Mar 17, 2021
ebcdebb
Name is never null
nstrelow Mar 17, 2021
8034382
parseClassName must be set
nstrelow Mar 17, 2021
18b3afd
list will never be null
nstrelow Mar 17, 2021
e80924f
dart(Query): Specifu compound query type
nstrelow Mar 17, 2021
b08a519
dart(lint): Use collection literals
nstrelow Mar 17, 2021
3591803
dart(lint): Prefer const constructor
nstrelow Mar 17, 2021
fb5efad
dart(lint): Fix sort constuctors and others
nstrelow Mar 17, 2021
04ed7ac
dart(lint): Future -> Future<void>
nstrelow Mar 17, 2021
b5182ac
_requestSubScription => _requestSubscription
nstrelow Mar 17, 2021
8955f46
dart: LiveQueryClient._getInstance never null
nstrelow Mar 17, 2021
f80d18d
dart(LiveQuery): ParseClient is never used
nstrelow Mar 17, 2021
17d35f7
dart(LiveQuery): Remove deprecated code
nstrelow Mar 17, 2021
daf5ca5
dart(LiveQuery): _clientEventStream is never null
nstrelow Mar 17, 2021
3cb0e47
dart(utils): No need to assing, just return
nstrelow Mar 17, 2021
f63f61d
dart(LiveQuery): Add assert if liveQueryUrl set
nstrelow Mar 17, 2021
5294522
dart(LiveQuery): _debug is never null
nstrelow Mar 17, 2021
1fbc50b
dart(LiveQuery): reconnectingController is never null
nstrelow Mar 17, 2021
41e004e
dart(LiveQuery): Add more not nullable annotation
nstrelow Mar 17, 2021
0c4d6df
dart(CoreData): instance is always set
nstrelow Mar 17, 2021
ceecef7
dart(ACL): No need to check for null
nstrelow Mar 17, 2021
9bc4be3
dart(ACL): Improve toJson
nstrelow Mar 17, 2021
b5fd674
dart(ACL): Make internal function params required
nstrelow Mar 17, 2021
c82c4aa
dart(ACL): writePermissions is always set
nstrelow Mar 17, 2021
7f8b7e6
dart(ACL): Simplify code
nstrelow Mar 17, 2021
6fe987f
dart(ACL): Set to non-nullable
nstrelow Mar 17, 2021
34862ab
dart(Base): _objectData is never null
nstrelow Mar 18, 2021
569c26e
dart(Base): Fix returning after first passthrough
nstrelow Mar 18, 2021
b77ea0a
dart(base): Type type is never assigned or used
nstrelow Mar 18, 2021
b9f15fc
dart(base): Can only be String and nothing else
nstrelow Mar 18, 2021
d2ad107
dart(base): generic type T cannot be null
nstrelow Mar 18, 2021
0b87990
dart(base): This will always be casted to T
nstrelow Mar 18, 2021
6f14483
dart: Default full=false for toJson,parseEncode
nstrelow Mar 18, 2021
16e0ad2
dart(base): fromJson expects non-null
nstrelow Mar 18, 2021
c9e6354
dart(base): value cannot be null anymore
nstrelow Mar 18, 2021
603f95a
dart(base): Reorder methods
nstrelow Mar 18, 2021
1f37479
dart(base): Remove deprecated getObjectData() etc.
nstrelow Mar 18, 2021
bad599e
dart(base): Finish null-safety annotation
nstrelow Mar 18, 2021
df8fefe
dart(clonable): Map needs to be not null
nstrelow Mar 18, 2021
57229fa
dart(object): GetObject needs objectId
nstrelow Mar 18, 2021
f34a188
dart(response): Add null-safe annotations
nstrelow Mar 18, 2021
e4acc32
dart(object): Remove deprecated methods
nstrelow Mar 18, 2021
a6a84d8
dart(object): Add null-safe annotations
nstrelow Mar 18, 2021
f4ce24e
dart(error): Annotate null-safety
nstrelow Mar 18, 2021
9f92545
dart(relation): Annotate null-safety
nstrelow Mar 18, 2021
8a50b5e
dart(client): statusCode should always be set
nstrelow Mar 18, 2021
2685fc7
dart(error_response): Migrate
nstrelow Mar 18, 2021
94f228e
dart(store): Annotate
nstrelow Mar 18, 2021
beae227
dart(utils): Annotate
nstrelow Mar 18, 2021
f7840ed
dart(function): Migrate
nstrelow Mar 18, 2021
507e358
dart(session): Annotate
nstrelow Mar 18, 2021
82555b7
dart: parse_file_extensions is deprecated
nstrelow Mar 18, 2021
f8c5820
dart(encoder): Annotate
nstrelow Mar 18, 2021
2ac7391
dart(res_builder): response cannot be null
nstrelow Mar 18, 2021
a023b8a
dart(res_builder): Annotate
nstrelow Mar 18, 2021
cef907e
dart(xxtea): Annotate
nstrelow Mar 18, 2021
8203cd7
dart(SembastStore): Annotate
nstrelow Mar 18, 2021
eea21cd
dart(file_base): Annotate
nstrelow Mar 18, 2021
0cd124a
dart(file): name is required and not null
nstrelow Mar 18, 2021
d65aac8
dart(file): Migrate/Anotate file classes
nstrelow Mar 18, 2021
3e37da1
dart(installation): Simplify
nstrelow Mar 18, 2021
836d6e3
dart(inst): Make getSubscribedChannels safer
nstrelow Mar 18, 2021
d6d810f
dart(logger): Handle appName=null
nstrelow Mar 18, 2021
d6669dc
dart(inst): Annotate
nstrelow Mar 18, 2021
2874046
Redundant call
nstrelow Mar 18, 2021
464d202
dart(user): Anntotate
nstrelow Mar 18, 2021
34268a5
dart(liveQueryList): Migrate
nstrelow Mar 18, 2021
9ea3727
dart: Upgrade dependencies
nstrelow Mar 18, 2021
7914319
dart: Remove unnecessary operators
nstrelow Mar 18, 2021
3aeda9c
dart(user): throw error when email is null
nstrelow Mar 20, 2021
d47a6ea
dart: Annotate getBytes path as nonnullable
nstrelow Mar 20, 2021
80ee77d
dart(core): Annotate late init of vars
nstrelow Mar 20, 2021
715c708
dart(base): Set parseClassName=ParseBase
nstrelow Mar 20, 2021
c4ff700
dart(coreData): Make sure clientCreator is optional
nstrelow Mar 20, 2021
69946e7
dart(liveQuery): Remove unneded true
nstrelow Mar 20, 2021
0c4fc35
dart(LiveQuery): add missing late inits
nstrelow Mar 20, 2021
0c79302
dart(object): Add missing late inits
nstrelow Mar 20, 2021
5c84a66
dart: Fix getter setter need same type
nstrelow Mar 20, 2021
3960a7d
dart(user): SessionId needs to be present on logout
nstrelow Mar 20, 2021
7731b6c
dart: Upgrade http 0.13.1
nstrelow Mar 20, 2021
4a54d15
dart: Fix null-safety access
nstrelow Mar 20, 2021
def8edd
dart: Apply null-safety migration
nstrelow Mar 20, 2021
3bd68f3
Adapt Readme with input from @RodrigoSMarques
nstrelow Mar 20, 2021
ec147a7
flutter: Upgrade dependencies for null-safety
nstrelow Mar 20, 2021
66fd83d
flutter: Upgrade example dependecies
nstrelow Mar 20, 2021
c8b9a34
flutter: Switch to package_info_plus
nstrelow Mar 20, 2021
14194f6
flutter(sdk): Return parent class sdk.Parse class
nstrelow Mar 20, 2021
aa89e89
flutter: package_info_plus has web support
nstrelow Mar 20, 2021
995a11c
flutter: Add correct parantheses
nstrelow Mar 20, 2021
e665549
flutter: SharedPrefStore does not support password
nstrelow Mar 20, 2021
ad4a85a
flutter: connectivity now supported on web
nstrelow Mar 20, 2021
8b30290
flutter: No need to provide a default password here
nstrelow Mar 20, 2021
23a0a43
flutter: path_provider supports linux and windows
nstrelow Mar 20, 2021
05124cd
flutter(CoreSharedPref): Improve code
nstrelow Mar 20, 2021
9213991
flutter(SharedPrefStore): Always returns a value
nstrelow Mar 20, 2021
50dc5ed
flutter: Split dbDirectory from CoreStoreSembastImp
nstrelow Mar 20, 2021
a2ded5a
dart(SemStore): Better way to set default password
nstrelow Mar 20, 2021
5291b28
flutter: widget is never null
nstrelow Mar 20, 2021
8804ae2
flutter: Pass _liveList as parameter
nstrelow Mar 20, 2021
dba58b4
flutter: Less confusing ternary operators
nstrelow Mar 20, 2021
57146d7
dart(liveList): Make preloaded column param nullable
nstrelow Mar 20, 2021
57bacfe
flutter: Add null check for pre/loadedData
nstrelow Mar 20, 2021
bcfbfb0
flutter: Remove unreachable case
nstrelow Mar 20, 2021
852a5be
flutter(LiveList): Usually we start with noData
nstrelow Mar 20, 2021
92a90f1
flutter(LiveList): Annotate
nstrelow Mar 20, 2021
6981cc4
flutter: Remove unused variables
nstrelow Mar 20, 2021
73ecf08
flutter(LiveGrid): replicate LiveList improvements
nstrelow Mar 20, 2021
e0fb9e9
flutter(LiveGrid): Add todo
nstrelow Mar 20, 2021
e154aa2
flutter: Apply migration
nstrelow Mar 20, 2021
2838645
flutter: Fix errors after migration
nstrelow Mar 20, 2021
a00d4a4
Upgrade dio to 4.0.0-prev3
nstrelow Mar 20, 2021
56ebcc1
Can never be null
nstrelow Mar 20, 2021
bece32e
dart(DioClient): Make sure headers != null
nstrelow Mar 20, 2021
87c5876
dart: Fix Web support by migrating dio_adapter_js
nstrelow Mar 20, 2021
f8549e7
fix(dart): Fix default password typo
nstrelow Mar 21, 2021
de2c73d
Merge branch 'nullsafety' into nullsafety-new
RodrigoSMarques Mar 22, 2021
123876a
Merge pull request #579 from nstrelow/nullsafety-new
RodrigoSMarques Mar 22, 2021
743a4a4
flutter: Removed dbPath added by mistake
nstrelow Mar 22, 2021
ebafe4e
dart: Fix and improve DioError extraction
nstrelow Mar 22, 2021
b3830d0
Remove unused AppInfo class
nstrelow Mar 23, 2021
db83e3f
Merge pull request #589 from nstrelow/nullsafety-fixes
RodrigoSMarques Mar 23, 2021
7ea52dc
Nullsafety fixes
RodrigoSMarques Mar 24, 2021
c51981b
Nullsafety fixes / Return Types
RodrigoSMarques Mar 24, 2021
b09fb71
Merge pull request #569 from Dealerpriest/patch-1
RodrigoSMarques Mar 25, 2021
de9819a
Nullsafety fixes / New ParseObject Fetch method
RodrigoSMarques Apr 5, 2021
7c06ff1
Update pubspec.yaml
RodrigoSMarques Apr 5, 2021
8b5f36e
Update pubspec.yaml
RodrigoSMarques Apr 13, 2021
635c43e
Update pubspec.yaml
RodrigoSMarques Apr 14, 2021
d8f485a
Added UpdateEvent on ParseLiveList (#606)
gcostaapps Apr 23, 2021
88b42f7
fix dart tests
fischerscode Apr 23, 2021
f331fb9
Delete parse_query_test.dart
fischerscode Apr 23, 2021
851531a
Update .travis.yml
fischerscode Apr 23, 2021
cb55e11
Merge pull request #609 from fischerscode/testing
RodrigoSMarques Apr 27, 2021
acf1224
Additional query methods (#611)
fischerscode Apr 29, 2021
ab9a1bc
fix livequery (#608)
fischerscode Apr 29, 2021
1f5a6d6
Merge pull request #1 from parse-community/nullsafety
gcostaapps Apr 30, 2021
13be28e
Fix error on live query when pointer is null
gcostaapps Apr 30, 2021
8f06fe0
Connectivity switched to connectivity_plus to support windows
gcostaapps Apr 30, 2021
e6d4f71
Update pubspec for point to dart package in github
gcostaapps Apr 30, 2021
4801624
Prevent a TypeError from being thrown while parsing an object from a …
Molkars May 9, 2021
eb1ffcb
Update README.md
7flash May 21, 2021
a0ede76
Expose additionalHeaders field using a getter and setter on the paren…
Jun 4, 2021
654e1e3
:bug: containsKey on wrong key
bernhardfrenking Jun 6, 2021
c5e903c
null safety for setSessionId on keyParamSessionToken
bernhardfrenking Jun 7, 2021
4929fae
Merge pull request #638 from bernhardfrenking/bernhardfrenking-contai…
RodrigoSMarques Jun 8, 2021
7f14ea0
Merge pull request #637 from Moomba42/635-expose-additional-headers-n…
RodrigoSMarques Jun 8, 2021
df1396d
Merge pull request #628 from 7flash/patch-1
RodrigoSMarques Jun 8, 2021
b636c67
Merge pull request #626 from Molkars/nullsafety
RodrigoSMarques Jun 8, 2021
9097ccd
Update pubspec.yaml
RodrigoSMarques Jun 8, 2021
5fb29a4
Update pubspec.yaml
RodrigoSMarques Jun 8, 2021
254dcda
Merge pull request #618 from gcostaapps/nullsafety
RodrigoSMarques Jun 8, 2021
d5223d1
make object in QueryBuilder not nullable
fischerscode Jun 9, 2021
1935c5b
parse_live_list: fix unmodifiable list
fischerscode Jun 9, 2021
b294d4b
auto format
fischerscode Jun 9, 2021
d52cefa
fix forced not-null cast in LiveList
fischerscode Jun 9, 2021
ac1aadd
remove null assertion operator
fischerscode Jun 9, 2021
44b8611
remove null assertion operator
fischerscode Jun 9, 2021
6568bc2
update version
fischerscode Jun 9, 2021
4b0c310
LiveQuery: make _liveQueryURL not null and final
fischerscode Jun 9, 2021
42f82a3
LiveQuery: _currentTimer null-safe
fischerscode Jun 9, 2021
aaeb522
LiveList: fix _objectUpdated
fischerscode Jun 9, 2021
0619422
LiveQuery: fix forced not-null cast
fischerscode Jun 9, 2021
481f59e
LiveQuery: remove forced not-null casts
fischerscode Jun 9, 2021
ad1d966
LiveList: remove forced not-null casts
fischerscode Jun 9, 2021
50fa812
LiveList: move typedefs to flutter package
fischerscode Jun 9, 2021
769fbf7
LiveListWidget: remove forced not-null casts
fischerscode Jun 9, 2021
ea7edf4
LiveList: fix reusage of unchanged child objects
fischerscode Jun 9, 2021
aa80140
update version to 3.1.0
fischerscode Jun 9, 2021
a1d95b3
Update .travis.yml
fischerscode Jun 9, 2021
a25d4a9
Merge pull request #640 from fischerscode/livelist-nullsafety
RodrigoSMarques Jun 11, 2021
0608e6f
New method for ParseQuery / Bugfix ParseQuery methods / Bugfix ParseR…
RodrigoSMarques Jun 12, 2021
a20cbd8
Update parse_query.dart
RodrigoSMarques Jun 14, 2021
50b1d2a
Merge branch 'nullsafety' into nullsafety
RodrigoSMarques Jun 14, 2021
f94a624
Documentation update: README and CHANGELOG
RodrigoSMarques Jun 16, 2021
de85621
Update pubspec.yaml
RodrigoSMarques Jun 16, 2021
f14dbbf
Fix Travis CI build failed
RodrigoSMarques Jun 16, 2021
7cf98c5
Delete parse_relation_test.dart
RodrigoSMarques Jun 16, 2021
8432589
Update parse_relation.dart
RodrigoSMarques Jun 16, 2021
9e3997f
Merge pull request #645 from RodrigoSMarques/nullsafety
RodrigoSMarques Jun 21, 2021
f5c979c
Update dependencies in pubspec.yaml
RodrigoSMarques Jun 28, 2021
1b8f604
Merge pull request #649 from RodrigoSMarques/nullsafety
RodrigoSMarques Jun 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 95 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,64 @@
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.dart_tool/
.atom/
.buildlog/
.history
.packages
.pub/
pubspec.lock
.example/lib/application_constants.dart
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# Visual Studio Code related
.classpath
.project
.settings/
.vscode/

# Flutter repo-specific
/bin/cache/
/bin/internal/bootstrap.bat
/bin/internal/bootstrap.sh
/bin/mingit/
/dev/benchmarks/mega_gallery/
/dev/bots/.recipe_deps
/dev/bots/android_tools/
/dev/devicelab/ABresults*.json
/dev/docs/doc/
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
/dev/integration_tests/**/xcuserdata
/dev/integration_tests/**/Pods
/packages/flutter/coverage/
version
analysis_benchmark.json

# packages file containing multi-root paths
.packages.generated

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
**/generated_plugin_registrant.dart
.packages
.pub-cache/
.pub/
build/
flutter_*.png
linked_*.ds
unlinked.ds
unlinked_spec.ds

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
Expand All @@ -20,16 +67,52 @@ pubspec.lock
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
**/android/key.properties
*.jks

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/.last_build_id
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

build/
.idea
example/ios/Frameworks/
example/lib/ui/
# macOS
**/macos/Flutter/GeneratedPluginRegistrant.swift

example_livelist/lib/application_constants.dart
# Coverage
coverage/

.flutter-plugins-dependencies
# Symbols
app.*.symbols

.vscode/
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ install:

script:
- (cd packages/dart && pub get)
- (cd packages/dart && dart run build_runner build --delete-conflicting-outputs)
- (cd packages/dart && pub run test)
- (cd packages/flutter && flutter pub remove parse_server_sdk)
- (cd packages/flutter && flutter pub add parse_server_sdk --path ../dart)
- (cd packages/flutter && flutter pub get)
- (cd packages/flutter && flutter test --no-pub test/)

cache:
directories:
- "$HOME/.pub-cache"
- "$HOME/.pub-cache"
9 changes: 9 additions & 0 deletions packages/dart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 3.1.0
Bug fixes
General improvements
Updated dependencies

## 3.0.0
Stable null safety release.

## 2.1.0
Option para uses ParseHTTPClient (default) or ParseDioClient (slow on Flutter Web).
**BREAKING CHANGE** if use progress callback at the file upload in version 2.0.1
Expand All @@ -6,6 +14,7 @@ Changed to the method POST on Login
Bug fixes
General improvements
Updated dependencies

## 2.0.1
Fixed network exceptions. [#482](https://github.com/parse-community/Parse-SDK-Flutter/pull/482)

Expand Down
18 changes: 11 additions & 7 deletions packages/dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@ This is a Dart package that allows communication with a Parse Server, (https://p
This is a work in progress and we are consistently updating it. Please let us know if you think anything needs changing/adding, and more than ever, please do join in on this project. (Even if it is just to improve our documentation)

## Getting Started
To install, either add to your pubspec.yaml
```yml
dependencies:
parse_server_sdk: ^2.1.0
```
or clone this repository and add to your project. As this is an early development with multiple contributors, it is probably best to download/clone and keep updating as an when a new feature is added.

To install, either add [dependency in your pubspec.yaml file](https://pub.dev/packages/parse_server_sdk/install).

Once you have the library added to your project, upon first call to your app (Similar to what your application class would be) add the following...

Expand Down Expand Up @@ -66,7 +61,6 @@ When running via express, set [ParseServerOptions](https://parseplatform.org/par

Be aware that for web ParseInstallation does include app name, version or package identifier.


## Objects
You can create custom objects by calling:
```dart
Expand Down Expand Up @@ -248,6 +242,15 @@ if (dietPlan.success) {
}
```

### Alternative query methods

The standard query method `query()` returns a `ParseResponse` that contains the result or the error. As an alternative, you can also use `Future<List<T>> find()` for receiving options.
This method returns an `Future` that either resolves in an error (equivalent of the error in the `ParseResponse`) or an `List` containing the queried objects. One difference, you should be aware of, is the fact, that `Future<List<T>> find()` will return an empty list instead of the 'No results' error you receive in case no object matches you query.

Choosing between `query()` and `find()` comes down to personal preference. Both methods can be used for querying a `ParseQuery`, just the output method differs.

Similar to `find()` the `QueryBuilder` also has a function called `Future<T>? first()`. Just like `find()` `first()` is just a convenience method that makes querying the first object satisfying the query simpler. `first()` returns an `Future`, that resoles in an error or the first object matching the query. In case no object satisfies the query, the result will be `null`.

## Complex queries
You can create complex queries to really put your database to the test:

Expand Down Expand Up @@ -303,6 +306,7 @@ The features available are:-
* WithinKilometers
* WithinRadians
* WithinGeoBox
* WithinPolygon
* MatchesQuery
* DoesNotMatchQuery
* MatchesKeyInQuery
Expand Down
Empty file.
58 changes: 26 additions & 32 deletions packages/dart/lib/parse_server_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import 'dart:io';
import 'dart:math';
import 'dart:typed_data';

import 'package:dio/dio.dart';
import 'package:meta/meta.dart';
import 'package:mime_type/mime_type.dart';
import 'package:parse_server_sdk/src/network/parse_http_client.dart';
import 'package:parse_server_sdk/src/network/parse_websocket.dart'
as parse_web_socket;
import 'package:path/path.dart' as path;
import 'package:sembast/sembast.dart';
import 'package:sembast/sembast_io.dart';
Expand All @@ -19,6 +17,9 @@ import 'package:uuid/uuid.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
import 'package:xxtea/xxtea.dart';

import 'src/network/parse_http_client.dart';
import 'src/network/parse_websocket.dart' as parse_web_socket;

export 'src/network/parse_dio_client.dart';
export 'src/network/parse_http_client.dart';

Expand Down Expand Up @@ -60,14 +61,12 @@ part 'src/storage/xxtea_codec.dart';
part 'src/utils/parse_date_format.dart';
part 'src/utils/parse_decoder.dart';
part 'src/utils/parse_encoder.dart';
part 'src/utils/parse_file_extensions.dart';
part 'src/utils/parse_live_list.dart';
part 'src/utils/parse_logger.dart';
part 'src/utils/parse_login_helpers.dart';
part 'src/utils/parse_utils.dart';

class Parse {
ParseCoreData data;
bool _hasBeenInitialized = false;

/// To initialize Parse Server in your application
Expand All @@ -86,25 +85,25 @@ class Parse {
String appId,
String serverUrl, {
bool debug = false,
String appName,
String appVersion,
String appPackageName,
String locale,
String liveQueryUrl,
String clientKey,
String masterKey,
String sessionId,
String? appName,
String? appVersion,
String? appPackageName,
String? locale,
String? liveQueryUrl,
String? clientKey,
String? masterKey,
String? sessionId,
bool autoSendSessionId = true,
SecurityContext securityContext,
CoreStore coreStore,
Map<String, ParseObjectConstructor> registeredSubClassMap,
ParseUserConstructor parseUserConstructor,
ParseFileConstructor parseFileConstructor,
List<int> liveListRetryIntervals,
ParseConnectivityProvider connectivityProvider,
String fileDirectory,
Stream<void> appResumedStream,
ParseClientCreator clientCreator,
SecurityContext? securityContext,
CoreStore? coreStore,
Map<String, ParseObjectConstructor>? registeredSubClassMap,
ParseUserConstructor? parseUserConstructor,
ParseFileConstructor? parseFileConstructor,
List<int>? liveListRetryIntervals,
ParseConnectivityProvider? connectivityProvider,
String? fileDirectory,
Stream<void>? appResumedStream,
ParseClientCreator? clientCreator,
}) async {
final String url = removeTrailingSlash(serverUrl);

Expand Down Expand Up @@ -140,10 +139,8 @@ class Parse {

bool hasParseBeenInitialized() => _hasBeenInitialized;

Future<ParseResponse> healthCheck(
{bool debug, ParseClient client, bool sendSessionIdByDefault}) async {
ParseResponse parseResponse;

Future<ParseResponse > healthCheck(
{bool? debug, ParseClient? client, bool? sendSessionIdByDefault}) async {
final bool _debug = isDebugEnabled(objectLevelDebug: debug);

final ParseClient _client = client ??
Expand All @@ -158,12 +155,9 @@ class Parse {
try {
final ParseNetworkResponse response =
await _client.get('${ParseCoreData().serverUrl}$keyEndPointHealth');
parseResponse =
handleResponse<Parse>(null, response, type, _debug, className);
return handleResponse<Parse>(null, response, type, _debug, className);
} on Exception catch (e) {
parseResponse = handleException(e, type, _debug, className);
return handleException(e, type, _debug, className);
}

return parseResponse;
}
}
2 changes: 1 addition & 1 deletion packages/dart/lib/src/base/parse_constants.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
part of flutter_parse_sdk;

// Library
const String keySdkVersion = '2.1.0';
const String keySdkVersion = '3.1.0';
const String keyLibraryName = 'Flutter Parse SDK';

// End Points
Expand Down
13 changes: 0 additions & 13 deletions packages/dart/lib/src/data/app_info.dart

This file was deleted.

Loading