Skip to content

Commit

Permalink
Merge pull request #38 from leancodepl/chore/bump-version-1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert221 authored Jan 17, 2025
2 parents 453fecd + b107f06 commit 47dac21
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bloc_presentation-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.0
sdk: 3.6.0

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.10.0
flutter-version: 3.27.0
cache: true

- name: Publish and release
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/bloc_presentation-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ on:

jobs:
test:
name: Flutter ${{ matrix.version }}
name: Flutter ${{ matrix.flutter.version }}

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['3.10.x', '3.13.x']
flutter:
- version: '3.10.x'
- version: '3.13.x'
- version: '3.27.x'
analyze: true

defaults:
run:
Expand All @@ -34,7 +38,7 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
flutter-version: ${{ matrix.flutter.version }}
cache: true

- name: Download pub dependencies
Expand All @@ -44,6 +48,7 @@ jobs:
run: dart format --set-exit-if-changed --output none .

- name: Run analyzer
if: ${{ matrix.flutter.analyze }}
run: flutter analyze --fatal-warnings --fatal-infos

- name: Run tests
Expand Down
4 changes: 4 additions & 0 deletions packages/bloc_presentation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.0

- Bump dependency on `flutter_bloc` to `9.0.0`. (#37, thanks @bobekos)

# 1.0.1

- Removed dependency on `provider`.
Expand Down
2 changes: 1 addition & 1 deletion packages/bloc_presentation/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dev_dependencies:
bloc_test: ^10.0.0
flutter_test:
sdk: flutter
leancode_lint: ">=5.0.0 <7.0.0"
leancode_lint: '>=5.0.0'

flutter:
uses-material-design: true
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,15 @@ class _BlocPresentationListenerBaseState<

void _subscribe() {
_streamSubscription = _bloc.presentation.listen(
(event) => widget.listener(context, event),
(event) {
if (!mounted) {
// This is to satisfy use_build_context_synchronously lint. We
// unsubscribe on dispose so the context should always be mounted here.
return;
}

widget.listener(context, event);
},
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/bloc_presentation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: bloc_presentation
description: >
Extends blocs with an additional stream which can serve as a way of indicating
single-time events (so-called "presentation events").
version: 1.0.1
version: 1.1.0
homepage: https://github.com/leancodepl/bloc_presentation/tree/master/packages/bloc_presentation

environment:
Expand Down

0 comments on commit 47dac21

Please sign in to comment.