toRealList2 function
PIComposer APIPIComposer API

toRealList2#

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

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

Accepts both int and double values within the nested lists, converting integers to doubles. Returns None if the conversion fails.

Example:

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