maybeFindMessenger static method

DrawerLayerData? maybeFindMessenger(
  1. BuildContext context, [
  2. bool root = false
])

Implementation

static DrawerLayerData? maybeFindMessenger(BuildContext context,
    [bool root = false]) {
  var data = Data.maybeFindMessenger<DrawerLayerData>(context);
  if (root) {
    while (data?.parent != null) {
      data = data!.parent;
    }
  }
  return data;
}