toRealList function
PIComposer APIPIComposer API

toRealList#

Option<List<double>> toRealList(dynamic value)

Converts a dynamic value to a list of doubles, if possible.

Accepts both int and double values, converting integers to doubles. Returns None if the value is not a list or contains non-numeric elements.

Example:

final result = toRealList([1, 2.5, 3]); // Some([1.0, 2.5, 3.0])