Skip to content

Commit

Permalink
feat: Add support for Dart 3.1, 3.2, 3.3; remove support for Da…
Browse files Browse the repository at this point in the history
…rt `2.19` (#993)

BREAKING CHANGE: This release removes support for Dart 2.19.
  • Loading branch information
mbfakourii authored Apr 12, 2024
1 parent 3849065 commit 98f4a26
Show file tree
Hide file tree
Showing 61 changed files with 133 additions and 151 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,25 @@ jobs:
include:
# Dart framework may contain breaking changes in minor version releases, not following semver.
# The latest Dart framework (below) is tested on all architectures (Ubuntu, macOS, Windows).
- name: Dart 3.1, Ubuntu
- name: Dart 3.3, Ubuntu
os: ubuntu-latest
sdk: 3.1.2
- name: Dart 3.1, macOS
sdk: 3.3.3
- name: Dart 3.3, macOS
os: macos-latest
sdk: 3.1.2
- name: Dart 3.1, Windows
sdk: 3.3.3
- name: Dart 3.3, Windows
os: windows-latest
sdk: 3.1.2
sdk: 3.3.3
# Older Dart framework versions (below) are only tested with Ubuntu to reduce CI resource usage.
- name: Dart 3.2
os: ubuntu-latest
sdk: 3.2.6
- name: Dart 3.1
os: ubuntu-latest
sdk: 3.1.5
- name: Dart 3.0
os: ubuntu-latest
sdk: 3.0.7
- name: Dart 2.19
os: ubuntu-latest
sdk: 2.19.6
- name: Dart beta
os: ubuntu-latest
sdk: beta
Expand Down
10 changes: 10 additions & 0 deletions packages/dart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [7.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/dart-6.4.0...dart-7.0.0) (2024-04-12)

### BREAKING CHANGES

* This release removes support for Dart 2.19 ([#993](https://github.com/parse-community/Parse-SDK-Flutter/pull/993))

### Features

* Add support for Dart 3.1, 3.2, 3.3; remove support for Dart 2.19 ([#993](https://github.com/parse-community/Parse-SDK-Flutter/pull/993))

## [6.4.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/dart-6.3.0...dart-6.4.0) (2024-03-30)

### Features
Expand Down
5 changes: 3 additions & 2 deletions packages/dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ The Parse Dart SDK is continuously tested with the most recent release of the Da

| Version | Latest Version | End of Support | Compatible |
|-----------|----------------|----------------|------------|
| Dart 3.1 | 3.1.2 | Sep 2024 | ✅ Yes |
| Dart 3.3 | 3.3.3 | Mar 2025 | ✅ Yes |
| Dart 3.2 | 3.2.6 | Jan 2025 | ✅ Yes |
| Dart 3.1 | 3.1.5 | Oct 2024 | ✅ Yes |
| Dart 3.0 | 3.0.7 | May 2024 | ✅ Yes |
| Dart 2.19 | 2.19.6 | Mar 2024 | ✅ Yes |

## Getting Started

Expand Down
4 changes: 2 additions & 2 deletions 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;
part of '../../parse_server_sdk.dart';

// Library
const String keySdkVersion = '6.4.0';
const String keySdkVersion = '7.0.0';
const String keyLibraryName = 'Flutter Parse SDK';

// End Points
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
Loading

0 comments on commit 98f4a26

Please sign in to comment.