getGreatGrandchild method

  1. @useResult
dynamic getGreatGrandchild({
  1. required String childKey,
  2. required String grandChildKey,
  3. required String greatGrandChildKey,
})

Returns the nested value at childKeygrandChildKeygreatGrandChildKey, or null if any key is missing.

Implementation

@useResult
dynamic getGreatGrandchild({
  required String childKey,
  required String grandChildKey,
  required String greatGrandChildKey,
}) {
  final dynamic grandChild = getGrandchild(childKey, grandChildKey);
  if (grandChild is Map<dynamic, dynamic>) {
    return grandChild[greatGrandChildKey];
  }

  return null;
}