mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
Fix visibility not set if initial opacity == 0
This commit is contained in:
parent
df45b23705
commit
1f4b43459c
1 changed files with 7 additions and 1 deletions
|
@ -27,6 +27,12 @@ class AnimatedVisibility extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AnimatedVisibilityState extends State<AnimatedVisibility> {
|
class _AnimatedVisibilityState extends State<AnimatedVisibility> {
|
||||||
|
@override
|
||||||
|
initState() {
|
||||||
|
super.initState();
|
||||||
|
_isActive = widget.opacity > 0;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
if (!_isActive && widget.opacity > 0) {
|
if (!_isActive && widget.opacity > 0) {
|
||||||
|
@ -54,5 +60,5 @@ class _AnimatedVisibilityState extends State<AnimatedVisibility> {
|
||||||
widget.onEnd?.call();
|
widget.onEnd?.call();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isActive = true;
|
late bool _isActive;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue