SafetySetting class final

Safety setting, affecting the safety-blocking behavior.

Passing a safety setting for a category changes the allowed probability that content is blocked.

Constructors

SafetySetting.new(HarmCategory category, HarmBlockThreshold threshold, HarmBlockMethod? method)

Properties

category HarmCategory
The category for this setting.
final
hashCode int
The hash code for this object.
no setterinherited
method HarmBlockMethod?
Specify if the threshold is used for probability or severity score, if not specified it will default to HarmBlockMethod.probability.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
threshold HarmBlockThreshold
Controls the probability threshold at which harm is blocked.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Object
Convert to json format.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited