Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mym0404 committed Oct 22, 2022
1 parent f94dab0 commit 4a75ddc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.1

Date: `2022-10-23`

* Delay controller initialization

## 1.0.0

Date: `2022-10-23`
Expand Down
6 changes: 3 additions & 3 deletions lib/src/pencil_kit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class PencilKit extends StatefulWidget {
}

class _PencilKitState extends State<PencilKit> {
late final PencilKitController _controller;
PencilKitController? _controller;

bool _isAvailableChecked = false;
bool _isAvailable = false;
Expand All @@ -108,12 +108,12 @@ class _PencilKitState extends State<PencilKit> {
@override
void didUpdateWidget(covariant PencilKit oldWidget) {
super.didUpdateWidget(oldWidget);
_controller._updateWidget(widget);
_controller?._updateWidget(widget);
}

void _onPencilKitPlatformViewCreated(int viewId) {
_controller = PencilKitController._(widget: widget, viewId: viewId);
widget.onPencilKitViewCreated?.call(_controller);
widget.onPencilKitViewCreated?.call(_controller!);
}

Widget _buildUnAvailable() =>
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pencil_kit
description: A Flutter plugin that provides a iOS PencilKit widget on iOS.
repository: https://github.com/mj-studio-library/flutter-pencilkit
homepage: https://github.com/mj-studio-library/flutter-pencilkit
version: 1.0.0
version: 1.0.1

environment:
sdk: '>=2.18.2 <3.0.0'
Expand Down

0 comments on commit 4a75ddc

Please sign in to comment.