addDataType static method

Future<DataType> addDataType(
  1. DataTypeAddOptions options
)

Creates and adds a customized data type.

The name of the created data type must be prefixed with the package name of the app Otherwise, the creation fails. The same data type can't be added more than once otherwise an exception will be thrown.

Implementation

static Future<DataType> addDataType(
  DataTypeAddOptions options,
) async {
  final Map<dynamic, dynamic>? result =
      await _channel.invokeMethod<Map<dynamic, dynamic>?>(
    'addDataType',
    options.toMap(),
  );
  return DataType.fromMap(result!);
}