Another exception was thrown: NoSuchMethodError: The method '*' was called on null - flutter

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.
enter image description here

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

I solved this problem while when I added:
textDirection: TextDirection.ltr, below the Row
check ----

Related

Flutter showing error which was already resolved. I'm using getter "map" instead of "values" but it still showing previous error

Flutter is showing previous error which I already resolved and i don't even using "values" getter now but it still showing the same previous error. I have already tried "flutter clean" but it didn't helped.
enter image description here
i don't even using "values" getter now
Yes you do. it's in this line:
Map map = snapshot.data.snapshot.values;
I believe it needs to be
Map map = snapshot.data.snapshot.value;

I want to use check box in my project but facing this error

enter image description hereenter image description here
1: I want to use check box but facing this error again and again.. I'm new in flutter what do I do now. https://i.stack.imgur.com/m9PdK.jpg
It seems that to believe the error message that is showing you have mutliple causes:
First the "error getter 'sortFilter' isn't defined means that you either didn't pass the argument or that simply the sortFilter isn't defined in your widget meaning that when you do widget.sortFilter, here sortFilter will be undefined.
Secondly, it appear that for the last error message selectedValue is just not initialized, you certainly put before, the keyword late to that variable and didn't put a value afterward. So try by default giving him true or false and at least you should have this solved.
Anyways, if those solution doesn't not work, please give a better overview or your code especially the widget CarInfoScreen.

update firestore field with special character using flutter(dart)

I have a firestore document which has a field name 'return/replace'. I want to update this field, but on update it throws the following error
java.lang.IllegalArgumentException: Use FieldPath.of() for field names containing '~*/[]'.
I have tried the following update queries.
Firestore.instance
.collection('collection')
.document('someDocID')
.updateData({
'return\/replace': 1
});
Also
Firestore.instance
.collection('collection')
.document('someDocID')
.updateData({
'return/replace': 1
});
But both gives same error. Also according to the error I tried using FieldPath.of() but flutter has nothing like that.. If anyone could suggest a code snippet would be helpful.
The error message is telling you to call FieldPath.of(), which creates a field path that can refer to your field.
But from a quick look at the [FlutterFire documentation for FieldPath it seems that of is currently not wrapped there. This means you currently can't update/query the field from Flutter.. You might want to file a feature request, or submit a PR for adding a wrapper for FieldPah.of.
You might also want to give the workaround that is mentioned here a try: https://github.com/FirebaseExtended/flutterfire/issues/626

AEM: How to find location of Exception on Sightly/HTL page?

I'm working on a fairly large HTL page, which is throwing a:
java.lang.IllegalArgumentException: Invalid property name
How can I find the location in the HTL that's causing this?
UPDATE
The full trace is too big for SO. I saved it here: http://pastebin.com/xajiY5MD
Here's the first few lines:
Invalid property name
Cannot serve request to /content/XXXX/en-us/cart.html in /apps/XXXXcommerce/components/content/cart/cart.html
Exception:
java.lang.IllegalArgumentException: Invalid property name
at org.apache.sling.scripting.sightly.impl.utils.RenderUtils.getProperty(RenderUtils.java:151)
at org.apache.sling.scripting.sightly.impl.utils.RenderUtils.resolveProperty(RenderUtils.java:143)
at org.apache.sling.scripting.sightly.apps.XXXXcommerce.components.content.cart.SightlyJava_cart.render(SightlyJava_cart.java:512)
at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderUnit.render(RenderUnit.java:54)
This comes when you are using a property which is:
1. not defined in dialog
2. You are using it in a wrong manner(Check for double quotes vs single quotes)
3. If you are using java, that property is not present in the java class and you are trying to access it.
Pls check and respond if thats no the case and the resolution too to help others.
java.lang.IllegalArgumentException: Invalid property name without a property name apparently occurs when indexing an array using an empty value (in my case the object containing the index had gone out of scope)

Extbase, Uncaught TYPO3 Exception. Flush system cache solves is for a while

Site works fine. Suddenly it will through an error. When clicking "flush system cahce" the error will go away for a some time. Anything from minuttes to severaƦ hours.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1247602160:
Unknown column 'tx_my_domain_model_formular.rel_formular' in 'where
clause' |
TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\SqlErrorException
thrown in file
/webserver/typo3/src/6.2.15/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
in line 862.
It is correct that the columns does not exist. But how to preceed in finding the error after this? Where is the sql generated that causes the site to crash?
UPDATE
A check "myParentObj->getChildObj instanceof myChildObjClass" used to work just fine. After changing myParent model to lazy load the ChildObj, then the class of childObj changed from childObjClass to a lazyLoadClass... I am not sure but I guess that is in turns somewhere somehow caused the core error seen in the log.
How to investigate further I simply cannot work out. Eg. store all DB calls in a file og DB to analyze after the error occours.
First
Please take time to write a good question. For a good question you'll get a good answer. It doesn't have to be perfect (not everyone is a native english speaker) but please reread your question.
Answer
If all fields are defined correctly, just run a DB compare from within the installtool.
If not, you need to define the DB-fields in your extension correctly.
Is this your own extension? When doing the query that triggers the error you could call execute(true) to generate the actual SQL statement and debug from there.