If I have a fraction double stored as a string i.e., "16/9", "16 / 9", "9/16", "9 / 16", etc., how can I convert it to a double? Or should I store those differently in order to convert them to doubles to be used as aspectRatio settings? Code example:
String aspectRatio = "16/9";
OR String aspectRatio = "16 / 9";
final aspectRatioDouble = double.parse(aspectRatio);
print(aspectRatioDouble);
/// Throws "Uncaught Error: FormatException: Invalid double 16/9"
final aspectRatioDoubleTry = double.tryParse(aspectRatio);
print(aspectRatioDoubleTry);
/// Prints null