getChild method Null safety

  1. @override
Future<FruitCategory?> getChild(
  1. Fruit childValue
)

Implementation

@override
Future<FruitCategory?> getChild(Fruit childValue) async {
  return await super.getChild(childValue) as FruitCategory?;
}