WitGeneratorConfig class
Constructors
WitGeneratorConfig.new ({required WitGeneratorInput inputs , required bool jsonSerialization , required bool copyWith_ , required bool equalityAndHashCode , required bool toString_ , required bool generateDocs , String ? objectComparator , required bool useNullForOption , required bool requiredOption , required Int64TypeConfig int64Type , required bool typedNumberLists , required bool asyncWorker , required bool sameClassUnion })
const
WitGeneratorConfig.fromJson (Object ? json_ )
Returns a new instance from a JSON value.
May throw if the value does not have the expected structure.
factory
Properties
asyncWorker
→ bool
Whether to the asyncronous functions to execute functions in workers.
final
copyWith_
→ bool
Whether to generate a copyWith
method for the types in the world.
final
equalityAndHashCode
→ bool
Whether to generate equality and the hashCode
getter for the types in the world.
final
Custom imports, ignore comments or code to be added at the top of the generated file.
final
generateDocs
→ bool
Whether to generate documentation for methods within the types in the world.
For example, for the toJson
, copyWith
and fromJson
methods.
final
hashCode
→ int
The hash code for this object.
no setter override
inputs
→ WitGeneratorInput
The file inputs to use for the code generation.
final
int64Type
→ Int64TypeConfig
The type to use for 64 bit integers.
final
jsonSerialization
→ bool
Whether to generate json serialization for the types in the world.
final
objectComparator
→ String ?
ObjectComparator used to implement the generated equality and hashCode overrides.
You will need to add a custom import in fileHeader to use this.
final
requiredOption
→ bool
Whether option
parameters are required.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
sameClassUnion
→ bool
Whether to use extends for union variants instead of crating a separate
wrapper class for each option.
final
toString_
→ bool
Whether to generate toString
methods for the types in the world.
final
typedNumberLists
→ bool
Whether to use dart:typed_data
's numeric lists.
For example, Uint8List
instead of List<int>
for list<u8>
.
This does not affect list<u64>
and list<s64>
, they will
use a List<[int64Type]>
.
final
useNullForOption
→ bool
Whether to use null
for option
types when possible.
For example when there is a single unnested option
type.
final
Methods
copyWith ({WitGeneratorInput ? inputs , bool ? jsonSerialization , bool ? copyWith_ , bool ? equalityAndHashCode , bool ? toString_ , bool ? generateDocs , Option <String > ? objectComparator , bool ? useNullForOption , bool ? requiredOption , Int64TypeConfig ? int64Type , bool ? typedNumberLists , bool ? asyncWorker , bool ? sameClassUnion })
→ WitGeneratorConfig
Returns a new instance by overriding the values passed as arguments
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson ()
→ Map <String , Object ? >
Returns a JSON representation of this.
override
toString ()
→ String
A string representation of this object.
override
toWasm ()
→ List <Object ? >
Returns this as a WASM canonical abi value.