Skip to content
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

feat: Update min flutter version to ^3.22.0 #37

Merged
merged 3 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: xsahil03x
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
github: xsahil03x
14 changes: 12 additions & 2 deletions .github/workflows/before_after.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,25 @@ jobs:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1

build:
strategy:
matrix:
flutter-version:
# The version of Flutter to use should use the minimum Dart SDK version supported by the package,
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
- "3.22.0"
- "3.x"
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{matrix.flutter-version}}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 📦 Install Dependencies
run: flutter packages get
Expand All @@ -46,13 +55,14 @@ jobs:
working-directory: example
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 📁 Build and release
uses: bluefireteam/flutter-gh-pages@v8
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Upcoming

- Increased the minimum Flutter version required to `3.22.0`.

## 3.1.0

- Migrated deprecated `MaterialStateProperty` to `WidgetStateProperty`.
Expand Down
2 changes: 1 addition & 1 deletion lib/before_after.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library before_after;
library;

export 'src/before_after.dart';
export 'src/before_after_theme.dart';
9 changes: 4 additions & 5 deletions lib/src/before_after.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum SliderDirection {
class BeforeAfter extends StatefulWidget {
/// Creates a [BeforeAfter] widget with the specified before and after images.
BeforeAfter({
Key? key,
super.key,
required this.before,
required this.after,
this.height,
Expand Down Expand Up @@ -68,8 +68,7 @@ class BeforeAfter extends StatefulWidget {
thumbColor == null || thumbDecoration == null,
'Cannot provide both a thumbColor and a thumbDecoration\n'
'To provide both, use "thumbDecoration: BoxDecoration(color: thumbColor)".',
),
super(key: key);
);

/// The widget to be displayed before the slider.
final Widget before;
Expand Down Expand Up @@ -551,9 +550,9 @@ class _BeforeAfterState extends State<BeforeAfter>
class Hide extends StatelessWidget {
/// Creates a [Hide] widget with the specified child.
const Hide({
Key? key,
super.key,
required this.child,
}) : super(key: key);
});

/// The child widget to be hidden.
final Widget child;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/two_directional_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TwoDirectionalSlider extends StatefulWidget {
///
/// The [child] parameter must not be null.
const TwoDirectionalSlider({
Key? key,
super.key,
required this.child,
this.initialVerticalValue = 0.0,
this.initialHorizontalValue = 0.0,
Expand All @@ -46,7 +46,7 @@ class TwoDirectionalSlider extends StatefulWidget {
this.onHorizontalChanged,
this.onHorizontalChangeEnd,
this.horizontalDivisions,
}) : super(key: key);
});

/// The child widget wrapped by the slider.
final Widget child;
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repository: https://github.com/xsahil03x/before_after
issue_tracker: https://github.com/xsahil03x/before_after/issues

environment:
sdk: '>=2.12.0 <4.0.0'
flutter: '>=2.0.0'
sdk: ^3.4.0
flutter: ^3.22.0

dependencies:
flutter:
Expand All @@ -16,7 +16,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter_lints: ">=4.0.0 <6.0.0"

topics:
- slider
Expand Down