Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Correction to example and README
Browse files Browse the repository at this point in the history
  • Loading branch information
markvideon committed Jan 6, 2023
1 parent d907980 commit c76f93d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.0+2

* Another correction to README and example code. onMount should not call super.onLoad.

## 1.1.0+1

* Correction to README to reflect API change.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class RiverpodAwareTextComponent extends PositionComponent with RiverpodComponen
/// [onMount] should be used over [onLoad], as subscriptions are cancelled
/// inside [onRemove], which is only called if the [Component] was mounted.
@override
Future<void> onMount() async {
await super.onLoad();
void onMount() {
super.onMount();
add(textComponent = TextComponent(position: position + Vector2(0, 27)));
listen(countingStreamProvider, (p0, p1) {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class RiverpodAwareTextComponent extends PositionComponent
/// [onMount] should be used over [onLoad], as subscriptions are cancelled
/// inside [onRemove], which is only called if the [Component] was mounted.
@override
Future<void> onMount() async {
await super.onLoad();
void onMount() {
super.onMount();
add(textComponent = TextComponent(position: position + Vector2(0, 27)));

listen(countingStreamProvider, (p0, p1) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flame_riverpod
description: Widgets, providers, and an example project for using Riverpod in conjunction with Flame.
version: 1.1.0+1
version: 1.1.0+2
homepage: https://markvideon.dev

environment:
Expand Down

0 comments on commit c76f93d

Please sign in to comment.