From 1ae080835d0c1c5736ad58c5e6194075ca674e58 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Fakouri Date: Mon, 16 Oct 2023 22:58:30 +0330 Subject: [PATCH] feat: Add support for Flutter 3.10 and 3.13, remove support for Flutter 3.0 (#971) --- .github/workflows/ci.yml | 30 ++++------ packages/flutter/CHANGELOG.md | 10 ++++ packages/flutter/README.md | 18 +++--- .../flutter/example/lib/pages/home_page.dart | 59 +++++++++---------- .../flutter/example/lib/pages/login_page.dart | 25 ++++---- packages/flutter/example/pubspec.yaml | 12 ++-- packages/flutter/pubspec.yaml | 7 ++- 7 files changed, 82 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a56e36314..f090059fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,23 +77,23 @@ jobs: matrix: include: # Flutter framework may contain breaking changes in minor version releases, not following semver. - - name: Flutter 3.10, Ubuntu + - name: Flutter 3.13, Ubuntu os: ubuntu-latest - sdk: 3.10.x - - name: Flutter 3.10, macOS + sdk: 3.13.6 + - name: Flutter 3.13, macOS os: macos-latest - sdk: 3.10.x - - name: Flutter 3.10, Windows + sdk: 3.13.6 + - name: Flutter 3.13, Windows os: windows-latest - sdk: 3.10.x + sdk: 3.13.6 # Only the latest Flutter framework version (above) is tested with all architectures. Previous # Flutter framework versions (below) are only tested with Ubuntu to reduce CI resource usage. - - name: Flutter 3.7 + - name: Flutter 3.10 os: ubuntu-latest - sdk: 3.7.x - - name: Flutter 3.3 + sdk: 3.10.6 + - name: Flutter 3.7 os: ubuntu-latest - sdk: 3.3.x + sdk: 3.7.12 - name: Flutter beta os: ubuntu-latest sdk: beta @@ -101,7 +101,7 @@ jobs: name: Test ${{ matrix.name }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup flutter (beta) if: ${{ matrix.sdk == 'beta' }} uses: subosito/flutter-action@v2 @@ -116,14 +116,10 @@ jobs: cache: true - name: Install dependencies on Ubuntu and MacOS if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - run: | - (cd packages/dart && flutter pub get) - (cd packages/flutter && flutter pub get) + run: (cd packages/flutter && flutter pub get) - name: Install dependencies on Windows if: matrix.os == 'windows-latest' - run: | - cmd /c "cd packages\dart && flutter pub get" - cmd /c "cd packages\flutter && flutter pub get" + run: cmd /c "cd packages\flutter && flutter pub get" - name: Analyze code run: flutter analyze packages/flutter --fatal-infos - name: Lint diff --git a/packages/flutter/CHANGELOG.md b/packages/flutter/CHANGELOG.md index e0524f152..421029bfe 100644 --- a/packages/flutter/CHANGELOG.md +++ b/packages/flutter/CHANGELOG.md @@ -1,3 +1,13 @@ +## [7.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-6.0.0...flutter-7.0.0) (2023-10-16) + +### BREAKING CHANGES + +* This release removes support for Flutter 3.0 ([#971](https://github.com/parse-community/Parse-SDK-Flutter/pull/971)) + +### Features + +* Add support for Flutter 3.10 and 3.13, remove support for Flutter 3.0 ([#971](https://github.com/parse-community/Parse-SDK-Flutter/pull/971)) + ## [6.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-5.1.2...flutter-6.0.0) (2023-08-06) ### BREAKING CHANGES diff --git a/packages/flutter/README.md b/packages/flutter/README.md index 21ad7ecc6..5aa6c65ef 100644 --- a/packages/flutter/README.md +++ b/packages/flutter/README.md @@ -5,7 +5,7 @@ [![Build Status](https://github.com/parse-community/Parse-SDK-Flutter/workflows/ci/badge.svg?branch=master)](https://github.com/parse-community/Parse-SDK-Flutter/actions?query=workflow%3Aci+branch%3Amaster) [![Coverage](https://img.shields.io/codecov/c/github/parse-community/Parse-SDK-Flutter/master)](https://app.codecov.io/gh/parse-community/Parse-SDK-Flutter/branch/master) -[![pub package](https://img.shields.io/pub/v/parse_server_sdk_flutter.svg)](https://pub.dev/packages/parse_server_sdk_flutter) +[![pub package](https://img.shields.io/pub/v/parse_server_sdk_flutter.svg)](https://pub.dev/packages/parse_server_sdk_flutter) [![Forum](https://img.shields.io/discourse/https/community.parseplatform.org/topics.svg)](https://community.parseplatform.org/c/parse-server) [![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link] @@ -28,14 +28,14 @@ This library gives you access to the powerful Parse Server backend from your Flu ## Compatibility -The Parse Flutter SDK is continuously tested with the most recent release of the Flutter framework to ensure compatibility. To give developers time to upgrade their app to the newest Flutter framework, previous Flutter framework releases are supported for at least 1 year after their [release date](https://docs.flutter.dev/release/archive?tab=linux). The Parse Flutter SDK depends on the Parse Dart SDK which may require a higher Dart framework version than the Flutter framework version, in which case the Flutter framework version cannot be supported even though its release date may have been less than a year ago. +The Parse Flutter SDK is continuously tested with the most recent release of the Flutter framework to ensure compatibility. To give developers time to upgrade their app to a newer Flutter framework, previous Flutter framework releases are supported for at least 1 year after the [release date](https://docs.flutter.dev/release/archive?tab=linux) of the next higher significant version. The Parse Flutter SDK depends on the Parse Dart SDK which may require a higher Dart framework version than the Flutter framework version, in which case the specific Flutter framework version cannot be supported. -| Version | End of Support | Compatible | -|--------------|----------------|----------------------------------------------| -| Flutter 3.10 | May 2024 | ❌ No | -| Flutter 3.7 | Apr 2024 | ✅ Yes | -| Flutter 3.3 | Jan 2024 | ✅ Yes | -| Flutter 3.0 | Jul 2023 | ❌ No (Parse Flutter SDK requires Flutter >=3.3.0) | +| Version | Latest Version | End of Support | Compatible | +|--------------|----------------|----------------|------------| +| Flutter 3.13 | 3.13.6 | Sep 2024 | ✅ Yes | +| Flutter 3.10 | 3.10.6 | Jul 2024 | ✅ Yes | +| Flutter 3.7 | 3.7.12 | Apr 2024 | ✅ Yes | +| Flutter 3.3 | 3.3.10 | Dec 2024 | ✅ Yes | ## Getting Started @@ -50,4 +50,4 @@ Find the full documentation in the [Parse Flutter SDK guide][guide]. We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines](https://github.com/parse-community/Parse-SDK-Flutter/blob/master/CONTRIBUTING.md). [guide]: https://docs.parseplatform.org/flutter/guide/ -[open-collective-link]: https://opencollective.com/parse-server +[open-collective-link]: https://opencollective.com/parse-server \ No newline at end of file diff --git a/packages/flutter/example/lib/pages/home_page.dart b/packages/flutter/example/lib/pages/home_page.dart index 6c5349e64..7323d2fe4 100644 --- a/packages/flutter/example/lib/pages/home_page.dart +++ b/packages/flutter/example/lib/pages/home_page.dart @@ -33,37 +33,34 @@ class _HomePageState extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async => false, - child: Scaffold( - appBar: AppBar( - automaticallyImplyLeading: false, - title: const Text('Parse Server demo'), - actions: [ - TextButton( - child: const Text('Logout', - style: TextStyle(fontSize: 17.0, color: Colors.white)), - onPressed: () async { - final ParseUser user = await ParseUser.currentUser(); - user.logout(deleteLocalUserData: true); - Navigator.pop(context as dynamic, true); - }) - ], - ), - body: _showDietList(), - floatingActionButton: FloatingActionButton( - onPressed: () async { - final DietPlan dietPlan = - randomDietPlans[Random().nextInt(randomDietPlans.length - 1)]; - final ParseUser user = await ParseUser.currentUser(); - dietPlan.set('user', user); - await widget._dietPlanProvider.add(dietPlan); - setState(() {}); - }, - tooltip: 'Add Diet Plans', - child: const Icon(Icons.add), - )), - ); + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + title: const Text('Parse Server demo'), + actions: [ + TextButton( + child: const Text('Logout', + style: TextStyle(fontSize: 17.0, color: Colors.white)), + onPressed: () async { + final ParseUser user = await ParseUser.currentUser(); + user.logout(deleteLocalUserData: true); + Navigator.pop(context as dynamic, true); + }) + ], + ), + body: _showDietList(), + floatingActionButton: FloatingActionButton( + onPressed: () async { + final DietPlan dietPlan = + randomDietPlans[Random().nextInt(randomDietPlans.length - 1)]; + final ParseUser user = await ParseUser.currentUser(); + dietPlan.set('user', user); + await widget._dietPlanProvider.add(dietPlan); + setState(() {}); + }, + tooltip: 'Add Diet Plans', + child: const Icon(Icons.add), + )); } Widget _showDietList() { diff --git a/packages/flutter/example/lib/pages/login_page.dart b/packages/flutter/example/lib/pages/login_page.dart index ab3a386d8..d68d86bbc 100644 --- a/packages/flutter/example/lib/pages/login_page.dart +++ b/packages/flutter/example/lib/pages/login_page.dart @@ -98,20 +98,17 @@ class _LoginPageState extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async => false, - child: Scaffold( - appBar: AppBar( - automaticallyImplyLeading: false, - title: const Text('Parse Server demo'), - ), - body: Stack( - children: [ - _showBody(), - _showCircularProgress(), - ], - )), - ); + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + title: const Text('Parse Server demo'), + ), + body: Stack( + children: [ + _showBody(), + _showCircularProgress(), + ], + )); } Widget _showCircularProgress() { diff --git a/packages/flutter/example/pubspec.yaml b/packages/flutter/example/pubspec.yaml index 0a48d0b20..9cab9b2a5 100644 --- a/packages/flutter/example/pubspec.yaml +++ b/packages/flutter/example/pubspec.yaml @@ -5,7 +5,8 @@ publish_to: 'none' version: 1.0.0 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=2.19.6 <4.0.0" + flutter: ">=3.3.10" dependencies: flutter: @@ -20,9 +21,10 @@ dependencies: sembast: ^3.4.6+1 shared_preferences: ^2.2.0 -dependency_overrides: - parse_server_sdk: - path: ../../dart +# Uncomment for local testing +# dependency_overrides: +# parse_server_sdk: +# path: ../../dart dev_dependencies: flutter_test: @@ -49,4 +51,4 @@ flutter: - asset: fonts/Roboto/Roboto-Bold.ttf weight: 700 - asset: fonts/Roboto/Roboto-Black.ttf - weight: 900 \ No newline at end of file + weight: 900 diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 8f3a18c63..4ebb01698 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: parse_server_sdk_flutter description: The Flutter SDK to connect to Parse Server. Build your apps faster with Parse Platform, the complete application stack. -version: 6.0.0 +version: 7.0.0 homepage: https://parseplatform.org repository: https://github.com/parse-community/Parse-SDK-Flutter issue_tracker: https://github.com/parse-community/Parse-SDK-Flutter/issues @@ -18,13 +18,14 @@ topics: - backend environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=2.19.6 <4.0.0" + flutter: ">=3.3.10" dependencies: flutter: sdk: flutter - parse_server_sdk: ^5.1.2 + parse_server_sdk: ^5.1.3 # Uncomment for local testing #parse_server_sdk: # path: ../dart