Skip to content
Advertisement

Flutter SQLlite the argument type ‘Future’ can’t be assigned to the parameter type ‘String’ error

I have copied and modified a bit the code from this official tutorial: https://flutter.dev/docs/cookbook/persistence/sqlite
My version of the insertion looks like this:

But it shows an error for the await getDatabasesPath() part: for the await it says: Unexpected text ‘await’, and for the getDatabasesPath(): The argument type ‘Future’ can’t be assigned to the parameter type ‘String’.

Advertisement

Answer

try this approach

or

hope it helps

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement