Skip to content

Commit 79d6a4a

Browse files
yulingtianxiaphillwiggins
authored andcommitted
ParseFile should NOT extends ParseObject. (#233)
1 parent d857c3a commit 79d6a4a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/src/objects/parse_base.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class ParseBase {
2323
}
2424

2525
bool _isDirty(bool considerChildren) {
26-
if (_dirty || _unsavedChanges.isNotEmpty) {
26+
if (_dirty || _unsavedChanges.isNotEmpty || objectId == null) {
2727
return true;
2828
}
2929

lib/src/objects/parse_file.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
part of flutter_parse_sdk;
22

3-
class ParseFile extends ParseObject {
3+
class ParseFile extends ParseBase {
44
/// Creates a new file
55
///
66
/// {https://docs.parseplatform.org/rest/guide/#files/}
@@ -9,8 +9,7 @@ class ParseFile extends ParseObject {
99
String url,
1010
bool debug,
1111
ParseHTTPClient client,
12-
bool autoSendSessionId})
13-
: super(keyFile) {
12+
bool autoSendSessionId}) {
1413
_debug = isDebugEnabled(objectLevelDebug: debug);
1514
_client = client ??
1615
ParseHTTPClient(
@@ -27,6 +26,9 @@ class ParseFile extends ParseObject {
2726
}
2827
}
2928

29+
bool _debug;
30+
ParseHTTPClient _client;
31+
3032
File file;
3133

3234
String get name => super.get<String>(keyVarName);

0 commit comments

Comments
 (0)