Skip to content

Commit 3d59ab1

Browse files
Add diagnostics property (#183)
1 parent 391a8c3 commit 3d59ab1

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

funvas/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.6+3
2+
3+
* Added diagnostics property for `paused`.
4+
15
## 0.1.6+2
26

37
* Fixed `paused` value not being respected on init.

funvas/lib/src/widget.dart

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:flutter/foundation.dart';
12
import 'package:flutter/material.dart';
23
import 'package:flutter/scheduler.dart';
34
import 'package:funvas/src/painter.dart';
@@ -41,6 +42,17 @@ class FunvasContainer extends StatefulWidget {
4142

4243
@override
4344
_FunvasContainerState createState() => _FunvasContainerState();
45+
46+
@override
47+
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
48+
super.debugFillProperties(properties);
49+
50+
properties.add(DiagnosticsProperty(
51+
'paused',
52+
paused,
53+
description: 'Whether the animation ticker is muted or not.',
54+
));
55+
}
4456
}
4557

4658
class _FunvasContainerState extends State<FunvasContainer>
@@ -54,8 +66,8 @@ class _FunvasContainerState extends State<FunvasContainer>
5466

5567
_time = ValueNotifier(0);
5668
_ticker = createTicker(_update)
57-
..muted = widget.paused
58-
..start();
69+
..start()
70+
..muted = widget.paused;
5971
}
6072

6173
@override

funvas/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >2-
33
Package for creating canvas animations based on time and math functions.
44
55
Fun + canvas -> funvas :)
6-
version: 0.1.6+2
6+
version: 0.1.6+3
77
homepage: https://github.com/creativecreatorormaybenot/funvas/tree/main/funvas
88

99
environment:

0 commit comments

Comments
 (0)