Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LateInitializationError: Field 'alphaAnimation' has not been initialized. #17

Closed
AlexanderShirokih opened this issue Mar 8, 2021 · 10 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@AlexanderShirokih
Copy link

AlexanderShirokih commented Mar 8, 2021

I got the next error after updating to version 2.0.0:

The following LateError was thrown building AvatarGlow(dirty, state: _AvatarGlowState#4a8d4):
LateInitializationError: Field 'alphaAnimation' has not been initialized.

The relevant error-causing widget was: 
  AvatarGlow 
When the exception was thrown, this was the stack: 
#0      _AvatarGlowState.alphaAnimation (package:avatar_glow/avatar_glow.dart)
#1      _AvatarGlowState.build (package:avatar_glow/avatar_glow.dart:140:18)
#2      StatefulElement.build (package:flutter/src/widgets/framework.dart:4704:27)
#3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4587:15)
#4      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4759:11)

The error occurs when I start with animate: false

@assylman
Copy link

I also have this issue...

@apgapg
Copy link
Owner

apgapg commented Mar 12, 2021

I tried running the example and it works fine.
Can you let me the output of flutter doctor -v?
I guess this something to null safety on older flutter sdks

@apgapg apgapg added the good first issue Good for newcomers label Mar 12, 2021
@assylman
Copy link

Screen Shot 2021-03-13 at 15 16 05

Here you go. I think everything is ok...

@apgapg
Copy link
Owner

apgapg commented Mar 13, 2021

@nurassylive Thanks for sharing this info. I do not what is going wrong over here.
Can you share a sample reproducing the same error?

@assylman
Copy link

My Source Code:
Screen Shot 2021-03-13 at 15 56 23

Error on device:
WhatsApp Image 2021-03-13 at 5 26 13 PM

Issue on console:
Screen Shot 2021-03-13 at 17 35 49

@apgapg
Copy link
Owner

apgapg commented Mar 13, 2021

Hi @nurassylive Thanks for sharing information.
I tried revamping the whole code and its likely the error is resolved.
Can you please check on the latest once?

  avatar_glow:
    git:
      url: https://github.com/apgapg/avatar_glow
      ref: master

So that i can release the new version then.

Thanks in advance.

@apgapg apgapg self-assigned this Mar 13, 2021
@apgapg apgapg pinned this issue Mar 13, 2021
@AlexanderShirokih
Copy link
Author

New version works fine for my case. Thanks.

@apgapg
Copy link
Owner

apgapg commented Mar 13, 2021

Nice i will now publish new version 2.0.1

@apgapg
Copy link
Owner

apgapg commented Mar 13, 2021

v2.0.1 released 🎉

@apgapg
Copy link
Owner

apgapg commented Mar 13, 2021

Please reopen the issue if error persists.
Thanks @nurassylive @AlexanderShirokih

@apgapg apgapg closed this as completed Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants