Created
January 7, 2022 09:41
-
-
Save HugoHeneault/49e08930c99d9300d85a412ebd052bf5 to your computer and use it in GitHub Desktop.
Future.forEach Object?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() async { | |
final List<String> alwaysRequiredFiles = ['some_path', 'other_path']; | |
await Future.forEach(alwaysRequiredFiles, (filepath) async { | |
// this fails: error: The argument type 'Object?' can't be assigned to the parameter type 'String'. (argument_type_not_assignable | |
final String file = filepath; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment