File(path). exists() returns a future bool. To implement this in a stateless widget, or to just check using if statement, use File(path). existsSync() which returns a bool data type.
File(path). exists() returns a future bool. To implement this in a stateless widget, or to just check using if statement, use File(path). existsSync() which returns a bool data type.