Skip to content

feat: Add support for Dart 3.1, 3.2, 3.3; remove support for Dart 2.19 #993

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

Merged
Merged
Prev Previous commit
Next Next commit
fix: Update dependency's
  • Loading branch information
mbfakourii committed Apr 2, 2024
commit a2383d62c36ddfd55f7903c3c5f81bbafd5e70bd
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,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

// Library
const String keySdkVersion = '6.4.0';
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/data/parse_core_data.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// Singleton class that defines all user keys and data
class ParseCoreData {
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/data/parse_subclass_handler.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

typedef ParseObjectConstructor = ParseObject Function();
typedef ParseUserConstructor = ParseUser Function(
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/enums/parse_enum_api_rq.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// Used to define the API calls made in ParseObject logs
enum ParseApiRQ {
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/network/options.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseNetworkOptions {
ParseNetworkOptions({this.headers});
Expand Down
11 changes: 4 additions & 7 deletions packages/dart/lib/src/network/parse_client.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

typedef ParseClientCreator = ParseClient Function(
{required bool sendSessionId, SecurityContext? securityContext});
Expand Down Expand Up @@ -93,12 +93,9 @@ class ParseNetworkResponse {
class ParseNetworkByteResponse extends ParseNetworkResponse {
ParseNetworkByteResponse({
this.bytes,
final String data = 'byte response',
final int statusCode = -1,
}) : super(
data: data,
statusCode: statusCode,
);
super.data = 'byte response',
super.statusCode,
});

final List<int>? bytes;
}
2 changes: 1 addition & 1 deletion packages/dart/lib/src/network/parse_connectivity.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// Connection status check result.
enum ParseConnectivityResult {
Expand Down
26 changes: 2 additions & 24 deletions packages/dart/lib/src/network/parse_dio_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,33 +272,11 @@ class _ParseDioClient with dio.DioMixin implements dio.Dio {

class _Options extends dio.Options {
_Options({
String? method,
Duration? sendTimeout,
Duration? receiveTimeout,
Map<String, dynamic>? extra,
Map<String, dynamic>? headers,
dio.ResponseType? responseType,
super.headers,
super.responseType,
String? contentType,
dio.ValidateStatus? validateStatus,
bool? receiveDataWhenStatusError,
bool? followRedirects,
int? maxRedirects,
dio.RequestEncoder? requestEncoder,
dio.ResponseDecoder? responseDecoder,
}) : super(
method: method,
sendTimeout: sendTimeout,
receiveTimeout: receiveTimeout,
extra: extra,
headers: headers,
responseType: responseType,
contentType: contentType ??
(headers ?? <String, dynamic>{})[dio.Headers.contentTypeHeader],
validateStatus: validateStatus,
receiveDataWhenStatusError: receiveDataWhenStatusError,
followRedirects: followRedirects,
maxRedirects: maxRedirects,
requestEncoder: requestEncoder,
responseDecoder: responseDecoder,
);
}
2 changes: 1 addition & 1 deletion packages/dart/lib/src/network/parse_live_query.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

enum LiveQueryEvent { create, enter, update, leave, delete, error }

Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/network/parse_query.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// Class to create complex queries
class QueryBuilder<T extends ParseObject> {
Expand Down
1 change: 1 addition & 0 deletions packages/dart/lib/src/network/parse_websocket_html.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// If you change this file, you should apply the same changes to the 'parse_websocket_io.dart' file
library;

import 'dart:html' as html;

Expand Down
1 change: 1 addition & 0 deletions packages/dart/lib/src/network/parse_websocket_io.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// If you change this file, you should apply the same changes to the 'parse_websocket_html.dart' file
library;

import 'dart:io' as io;

Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_acl.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// [ParseACL] is used to control which users can access or modify a particular object
/// [ParseObject] can have its own [ParseACL]
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_array.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class _ParseArray implements _Valuable<List>, _ParseSaveStateAwareChild {
_ParseArray({this.setMode = false});
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_base.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

abstract class ParseBase {
/// refers to the Table Name in your Parse Server
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_cloneable.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// Creates method which can be used to deep clone objects
abstract class ParseCloneable {
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_config.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseConfig extends ParseObject {
/// Creates an instance of ParseConfig so that you can grab all configs from the server
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_error.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// ParseException is used in [ParseResult] to inform the user of the exception
class ParseError {
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_exception.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

abstract class ParseException implements Exception {}

Expand Down
14 changes: 5 additions & 9 deletions packages/dart/lib/src/objects/parse_file.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseFile extends ParseFileBase {
/// Creates a new file
///
/// {https://docs.parseplatform.org/rest/guide/#files/}
ParseFile(this.file,
{String? name,
String? url,
bool? debug,
ParseClient? client,
bool? autoSendSessionId})
super.url,
super.debug,
super.client,
super.autoSendSessionId})
: super(
name: file != null ? path.basename(file.path) : name!,
url: url,
debug: debug,
client: client,
autoSendSessionId: autoSendSessionId,
);

File? file;
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_file_base.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

abstract class ParseFileBase extends ParseObject {
/// Creates a new file
Expand Down
19 changes: 6 additions & 13 deletions packages/dart/lib/src/objects/parse_file_web.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseWebFile extends ParseFileBase {
ParseWebFile(this.file,
{required String name,
String? url,
bool? debug,
ParseClient? client,
bool? autoSendSessionId})
: super(
name: name,
url: url,
debug: debug,
client: client,
autoSendSessionId: autoSendSessionId,
);
{required super.name,
super.url,
super.debug,
super.client,
super.autoSendSessionId});

Uint8List? file;
CancelToken? _cancelToken;
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_function.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseCloudFunction extends ParseObject {
/// Creates a new cloud function object
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_geo_point.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

const String keyLatitude = 'latitude';
const String keyLongitude = 'longitude';
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_installation.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseInstallation extends ParseObject {
/// Creates an instance of ParseInstallation
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_number.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class _ParseNumber implements _Valuable<num>, _ParseSaveStateAwareChild {
num estimateNumber;
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_object.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// [ParseObject] is a local representation of data that can be saved and
/// retrieved from the Parse cloud.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
part of flutter_parse_sdk;
part of '../../../parse_server_sdk.dart';

/// An operation that adds a new element to an array
class _ParseAddOperation extends _ParseArrayOperation {
_ParseAddOperation(List value) : super(value);
_ParseAddOperation(super.value);

@override
String get operationName => 'Add';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
part of flutter_parse_sdk;
part of '../../../parse_server_sdk.dart';

/// An operation that adds new objects to a [ParseRelation]
class _ParseAddRelationOperation extends _ParseRelationOperation {
_ParseAddRelationOperation(Set<ParseObject> value) : super(value);
_ParseAddRelationOperation(super.value);

@override
String get operationName => 'AddRelation';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
part of flutter_parse_sdk;
part of '../../../parse_server_sdk.dart';

/// An operation that adds a new element to an array field,
/// only if it wasn't already present
class _ParseAddUniqueOperation extends _ParseArrayOperation {
_ParseAddUniqueOperation(List value) : super(value);
_ParseAddUniqueOperation(super.value);

@override
String get operationName => 'AddUnique';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
part of flutter_parse_sdk;
part of '../../../parse_server_sdk.dart';

/// An operation that increment a numeric value by a given amount
class _ParseIncrementOperation extends _ParseNumberOperation {
_ParseIncrementOperation(num value) : super(value);
_ParseIncrementOperation(super.value);

@override
String get operationName => 'Increment';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../../parse_server_sdk.dart';

/// Represents an operation performed on Parse data. It defines the core
/// functionality of any operation performed on Parse data.
Expand Down Expand Up @@ -182,7 +182,7 @@ abstract class _ParseOperation<T> implements _Valuable<T> {
}

abstract class _ParseArrayOperation extends _ParseOperation<List> {
_ParseArrayOperation(List value) : super(value) {
_ParseArrayOperation(super.value) {
super.valueForApiRequest = [];
}

Expand Down Expand Up @@ -229,7 +229,7 @@ abstract class _ParseArrayOperation extends _ParseOperation<List> {

abstract class _ParseRelationOperation
extends _ParseOperation<Set<ParseObject>> {
_ParseRelationOperation(Set<ParseObject> value) : super(value) {
_ParseRelationOperation(super.value) {
super.valueForApiRequest = {};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
part of flutter_parse_sdk;
part of '../../../parse_server_sdk.dart';

/// An operation that removes every instance of an element from an array
class _ParseRemoveOperation extends _ParseArrayOperation {
_ParseRemoveOperation(List value) : super(value);
_ParseRemoveOperation(super.value);

@override
String get operationName => 'Remove';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
part of flutter_parse_sdk;
part of '../../../parse_server_sdk.dart';

/// An operation that Removes objects from a [ParseRelation]
class _ParseRemoveRelationOperation extends _ParseRelationOperation {
_ParseRemoveRelationOperation(Set<ParseObject> value) : super(value);
_ParseRemoveRelationOperation(super.value);

@override
String get operationName => 'RemoveRelation';
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_relation.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

abstract class ParseRelation<T extends ParseObject> {
//The owning object of this ParseRelation
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_response.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseResponse {
ParseResponse({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

/// An interface used to notify a child about its parent save state.
///
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_session.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseSession extends ParseObject implements ParseCloneable {
ParseSession({
Expand Down
2 changes: 1 addition & 1 deletion packages/dart/lib/src/objects/parse_user.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseUser extends ParseObject implements ParseCloneable {
/// Creates an instance of ParseUser
Expand Down
14 changes: 5 additions & 9 deletions packages/dart/lib/src/objects/parse_x_file.dart
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
part of flutter_parse_sdk;
part of '../../parse_server_sdk.dart';

class ParseXFile extends ParseFileBase {
/// Creates a new file base XFile
///
/// {https://docs.parseplatform.org/rest/guide/#files/}
ParseXFile(this.file,
{String? name,
String? url,
bool? debug,
ParseClient? client,
bool? autoSendSessionId})
super.url,
super.debug,
super.client,
super.autoSendSessionId})
: super(
name: file != null ? path.basename(file.path) : name!,
url: url,
debug: debug,
client: client,
autoSendSessionId: autoSendSessionId,
);

XFile? file;
Expand Down
Loading