I am having problems when I add an item to a CardList and try to display it using a Carousel. The item is added to the list but when I try to see it through the Carousel the error is shown :
I/flutter (12255): Another exception was thrown: NoSuchMethodError: The method '*' was called on null.
I have tried to not leave anything uninitialized as I have read in similar cases regarding this issue, but it doesn't help.
you can check my code here on my Github profile: https://github.com/varamsky/notes
And this is an image of the emulator screen.
Solution 1: Matias de Andrea
kumar
I see your code and find the problem.
In file todoCard.dart
in line 93 have this:
child: Text('${(percent*100).toInt()}%'),
This operation in the string (percent*100) not is valid because, for some reason, the percent
is null.
You need to verify if percent
is null.
PS: In next time, please place the code in answer, to facilitate a response.
PS2: I make a pull request to add a complete gitignore in your repository. This makes the repository easier to clone and work with him :D
A hug
Solution 2: Raj Kushwaha
I solved this problem while when I added:
textDirection: TextDirection.ltr, below the Row check ----