Hi guys,
I'm starting with dart and have some questions about an application I'm trying to translate to dart:
- I'm trying to read JSON file that can be located on local drive or on the net. Should I use File in dart:io or dart:html (because it's a web app finally)? can I use dart:io and dart:html in the same class?
- I can't simply replace backslashes with slashes like in other languages. The API states that I must use a pattern (even if it's just a string that I'm replacing). It's maybe more a regexp question, but does anyone knows what's wrong with this :
String pathToFile = "C:\Users\Talel\Desktop\facturation.json".replaceAll(new RegExp("\Q\\E"), "/");
All I get is a string with no slashes
Uncaught Error: FileSystemException: Cannot open file, path = 'C:UsersTalelDesktopacturation.json'
thanks in advance