You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Release 1.0.27 - Create base branch
* Fix for #347 (include in LiveList) (#348)
* LiveList: reload included objects
First implementation
* Key was wrong on order change
* include sub-includes
* reuse loaded pointers
* Deleted stuff
* LiveList autoupdate included sub-objects (#349)
* LiveList: reload included objects
First implementation
* Key was wrong on order change
* include sub-includes
* reuse loaded pointers
* Deleted stuff
* Adding listening on included objects to LiveList
* Updated readme for ParseLiveList
* Update parse_live_list.dart
* LiveList: sync subObjects after reconnect (#352)
* Sync subObjects after reconnect
* Update README.md
* Update README.md (#353)
* ISSUE-351: Replaced isTypeOfException with Exception (#355)
Great work! Thank you
* RegisterSubClass and smaler changes (#368)
* added subclass handler
* integraded subclass handler
* added constructor for QueryBuilder using registered SubClasses
* subclass handler optimizations
* Convenience changes
* Convenience change
* sembast CoreStore on macos
* Fix: ParseUser updated on server but not locally
This should be a fix for:
#364
and
#256
* Update README.md
* Update README.md
* Update README.md (#367)
* Save installationId when new installation created. Send installationId when User login (#375)
* ParseLiveElement (#376)
* First implementation for ParseLiveElement
* ParseLiveElement further implementation
* Update parse_live_list.dart
* ParseLiveElement working
* News methods for ParseQuery - whereMatchesKeyInQuery and whereDoesNotMatchKeyInQuery (#379)
* Add method whereMatchesKeyInQuery
Add method whereMatchesKeyInQuery
* Update parse_query.dart
* Fix whereMatchesKeyInQuery / whereDoesNotMatchKeyInQuery
* Update README.md
* Update README.md
* Update README.md
* Add google login helper (#387)
- Update README to show how to get google login attributes for parse
* Update parse_response_builder.dart (#390)
* [web] Check web before Platform.isX (#392)
Platform.isX is unsupported in web
* Make web compatible calls for locale and skip PackageInfo (#395)
* Make web compatible calls for locale and skip PackageInfo
* Also get country code for web locale
* Add description of early web support
* Added ParseFile check to _canBeSerialized() (#396)
* Update README.md (#397)
Fix Parse Server parameter name
* ParseLiveList: first implementation of lazyLoading (#407)
Setting lazyLoading=false should disable lazyLoading.
* Update parse_live_list.dart (#406)
In theory this should not make any difference. In practise sometimes an error gets thrown:
The following NoSuchMethodError was thrown while finalizing the widget tree:
The method 'dispose' was called on null.
Receiver: null
Tried calling: dispose()
* File Support for web (#409)
* created files and started implementation
* add different filetypes to sdk
* Update README.md
* add an other file example to README (#410)
* added file example to README
* Update README.md
* Web file upload: set content type to "text/plain" incase neighter name nor url is set (#411)
This breaks the extension at the uploaded file, but otherwise the upload would fail with a server error.
* LiveQuery reconnecting intervals (#414)
* parseFileConstructor was missing at Parse.initialize
* add liveListRetryIntervals to Parse.initialize
* replace kIsWeb with its definition (#415)
Using less libaries is always good.
* release/1.0.27 update dependencies
* Release/1.0.27 (#427)
* forgetLocalSession before login / signUP / loginAnonymous #426
* forgetLocalSession before login / signUP / loginAnonymous #426
* Release 1.0.27 - Pre-release process
- Update dependencies
* Release 1.0.27 - Pre-release process
- Static analysis fixes
Co-authored-by: Maximilian Fischer <[email protected]>
Co-authored-by: Michal Baran <[email protected]>
Co-authored-by: Maximilian Fischer <[email protected]>
Co-authored-by: Phani Rithvij <[email protected]>
Co-authored-by: Danaru <[email protected]>
Co-authored-by: Rodrigo de Souza Marques <[email protected]>
Co-authored-by: vreamer <[email protected]>
Co-authored-by: Dmytro Karpovych <[email protected]>
Co-authored-by: Nils Strelow <[email protected]>
Co-authored-by: hyperrecursive <[email protected]>
Hi, this is a Flutter plugin that allows communication with a Parse Server, (https://parseplatform.org) either hosted on your own server or another, like (http://Back4App.com).
6
6
7
-
This is a work in project 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.
7
+
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)
8
8
9
9
## Join in!
10
10
Want to get involved? Join our Slack channel and help out! (http://flutter-parse-sdk.slack.com)
@@ -13,7 +13,7 @@ Want to get involved? Join our Slack channel and help out! (http://flutter-parse
13
13
To install, either add to your pubspec.yaml
14
14
```yml
15
15
dependencies:
16
-
parse_server_sdk: ^1.0.26
16
+
parse_server_sdk: ^1.0.27
17
17
```
18
18
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.
19
19
@@ -49,6 +49,15 @@ It's possible to add other parameters to work with your instance of Parse Server
49
49
coreStore: await CoreStoreSharedPrefsImp.getInstance()); // Local data storage method. Will use SharedPreferences instead of Sembast as an internal DB
50
50
```
51
51
52
+
53
+
#### Early Web support
54
+
Currently this requires adding `X-Parse-Installation-Id` as an allowed header to parse-server.
55
+
When running directly via docker, set the env var `PARSE_SERVER_ALLOW_HEADERS=X-Parse-Installation-Id`.
56
+
When running via express, set [ParseServerOptions](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html)`allowHeaders: ['X-Parse-Installation-Id']`.
57
+
58
+
Be aware that for web ParseInstallation does include app name, version or package identifier.
59
+
60
+
52
61
## Objects
53
62
You can create custom objects by calling:
54
63
```dart
@@ -98,7 +107,7 @@ The features available are:-
98
107
* Array Operators
99
108
100
109
## Custom Objects
101
-
You can create your own ParseObjects or convert your existing objects into Parse Objects by doing the following:
110
+
You can create your own `ParseObjects` or convert your existing objects into Parse Objects by doing the following:
102
111
103
112
```dart
104
113
class DietPlan extends ParseObject implements ParseCloneable {
Providing a `ParseObject` as described above should still work, even if you have registered a different `SubClass`.
148
+
149
+
For custom file classes have a lock at [here](#File).
150
+
122
151
## Add new values to objects
123
152
To add a variable to an object call and retrieve it, call
124
153
@@ -128,7 +157,7 @@ var randomInt = dietPlan.get<int>('RandomInt');
128
157
```
129
158
130
159
## Save objects using pins
131
-
You can now save an object by calling .pin() on an instance of an object
160
+
You can now save an object by calling `.pin()` on an instance of an object
132
161
133
162
```dart
134
163
dietPlan.pin();
@@ -229,6 +258,26 @@ if (response.success) {
229
258
}
230
259
```
231
260
261
+
if you want to find objects that match one of several queries, you can use __QueryBuilder.or__ method to construct a query that is an OR of the queries passed in. For instance if you want to find players who either have a lot of wins or a few wins, you can do:
You can use the __whereMatchesKeyInQuery__ method to get objects where a key matches the value of a key in a set of objects resulting from another query. For example, if you have a class containing sports teams and you store a user’s hometown in the user class, you can issue one query to find the list of users whose hometown teams have winning records. The query would look like::
Conversely, to get objects where a key does not match the value of a key in a set of objects resulting from another query, use __whereDoesNotMatchKeyInQuery__. For example, to find users whose hometown teams have losing records:
If you only care about the number of games played by a particular player:
293
387
@@ -430,10 +524,17 @@ LiveQuery server.
430
524
liveQuery.client.unSubscribe(subscription);
431
525
```
432
526
527
+
__Disconnection__
528
+
In case the client's connection to the server breaks,
529
+
LiveQuery will automatically try to reconnect.
530
+
LiveQuery will wait at increasing intervals between reconnection attempts.
531
+
By default, these intervals are set to `[0, 500, 1000, 2000, 5000, 10000]` for mobile and `[0, 500, 1000, 2000, 5000]` for web.
532
+
You can change these by providing a custom list using the `liveListRetryIntervals` parameter at `Parse.initialize()` ("-1" means "do not try to reconnect").
533
+
433
534
## ParseLiveList
434
535
ParseLiveList makes implementing a dynamic List as simple as possible.
435
536
436
-
537
+
#### General Use
437
538
It ships with the ParseLiveList class itself, this class manages all elements of the list, sorts them,
438
539
keeps itself up to date and Notifies you on changes.
By default, ParseLiveQuery will provide you with all the objects you included in your Query like this:
593
+
```dart
594
+
queryBuilder.includeObject(/*List of all the included sub-objects*/);
595
+
```
596
+
ParseLiveList will not listen for updates on this objects by default.
597
+
To activate listening for updates on all included objects, add `listenOnAllSubItems: true` to your ParseLiveListWidgets constructor.
598
+
If you want ParseLiveList to listen for updates on only some sub-objects, use `listeningIncludes: const <String>[/*all the included sub-objects*/]` instead.
599
+
Just as QueryBuilder, ParseLiveList supports nested sub-objects too.
490
600
491
-
Note: To use this features you have to enable [Live Queries](#live-queries) first.
601
+
**NOTE:** To use this features you have to enable [Live Queries](#live-queries) first.
492
602
493
603
## Users
494
604
You can create and control users just as normal using this SDK.
@@ -566,6 +676,24 @@ Other user features are:-
566
676
}
567
677
```
568
678
679
+
For Google and the example below, we used the library provided at https://pub.dev/packages/google_sign_in
680
+
681
+
```
682
+
class OAuthLogin {
683
+
final GoogleSignIn _googleSignIn = GoogleSignIn( scopes: ['email', 'https://www.googleapis.com/auth/contacts.readonly'] );
There are three different file classes in this SDK:
823
+
-`ParseFileBase` is and abstract class and is the foundation of every file class that can be handled by this SDK.
824
+
-`ParseFile` (former the only file class in the SDK) extends ParseFileBase and is by default used as the file class on every platform but web.
825
+
This class uses a `File` from `dart:io` for storing the raw file.
826
+
-`ParseWebFile` is the equivalent to ParseFile used at Flutter Web.
827
+
This class uses an `Uint8List` for storing the raw file.
828
+
829
+
These classes are used by default to represent files, but you can also build your own class extending ParseFileBase and provide a custom `ParseFileConstructor` similar to the `SubClasses`.
830
+
831
+
Have a look at the example application for a small (non web) example.
832
+
833
+
834
+
```dart
835
+
//A short example for showing an image from a ParseFileBase
836
+
Widget buildImage(ParseFileBase image){
837
+
return FutureBuilder<ParseFileBase>(
838
+
future: image.download(),
839
+
builder: (BuildContext context,
840
+
AsyncSnapshot<ParseFileBase> snapshot) {
841
+
if (snapshot.hasData) {
842
+
if (kIsWeb) {
843
+
return Image.memory((snapshot.data as ParseWebFile).file);
844
+
} else {
845
+
return Image.file((snapshot.data as ParseFile).file);
0 commit comments