ErrorDescription('${debugRequiredFor.runtimeType} widgets require an Overlay widget ancestor for correct operation.'),
ErrorHint('The most common way to add an Overlay to an application is to include a MaterialApp or Navigator widget in the runApp() call.'),
DiagnosticsProperty<Widget>('The specific widget that failed to find an overlay was',debugRequiredFor,style:DiagnosticsTreeStyle.errorProperty),
ErrorDescription('${debugRequiredFor?.runtimeType ?? 'Some'} widgets require an Overlay widget ancestor for correct operation.'),
ErrorHint('The most common way to add an Overlay to an application is to include a MaterialApp, CupertinoApp or Navigator widget in the runApp() call.'),
if(debugRequiredFor!=null)DiagnosticsProperty<Widget>('The specific widget that failed to find an overlay was',debugRequiredFor,style:DiagnosticsTreeStyle.errorProperty),
if(context.widget!=debugRequiredFor)
context.describeElement('The context from which that widget was searching for an overlay was'),
];
...
...
@@ -376,7 +385,36 @@ class Overlay extends StatefulWidget {
}
returntrue;
}());
returnresult;
returnresult!;
}
/// The [OverlayState] from the closest instance of [Overlay] that encloses