DebugFlagProperty constructor

DebugFlagProperty(
  1. String name, {
  2. required bool? value,
  3. String? ifTrue,
  4. String? ifFalse,
  5. String? tooltip,
  6. bool showName = false,
  7. Object? defaultValue,
})

Constructs a FlagProperty with the given descriptions with the specified descriptions.

showName defaults to false as typically ifTrue and ifFalse should be descriptions that make the property name redundant.

Implementation

DebugFlagProperty(
  String name, {
  required bool? value,
  this.ifTrue,
  this.ifFalse,
  super.tooltip,
  bool showName = false,
  Object? defaultValue,
})  : assert(ifTrue != null || ifFalse != null),
      super(
        name,
        value,
        showName: showName,
        defaultValue: defaultValue,
      );