length method

  1. @override
Future<int> length()

Implementation

@override
Future<int> length() async {
  final value = await Command(_connection).send_object(['SCAN', 0]);
  return switch (value) {
    List() => value.length,
    String() => int.parse(value),
    _ => value,
  };
}