Flag constructor

Flag(
  1. String name, {
  2. String? abbr,
  3. String? help,
  4. bool? defaultsTo = false,
  5. bool negatable = true,
  6. void callback(
    1. bool?
    )?,
  7. bool hide = false,
  8. List<String> aliases = const [],
})

Implementation

Flag(
  String name, {
  String? abbr,
  String? help,
  bool? defaultsTo = false,
  bool negatable = true,
  void Function(bool?)? callback,
  bool hide = false,
  List<String> aliases = const [],
}) : super(
        name,
        abbr,
        help,
        null,
        null,
        null,
        defaultsTo,
        callback == null ? null : (value) => callback(value),
        OptionType.flag,
        negatable: negatable,
        hide: hide,
        aliases: aliases,
      );