of static method
Implementation
static RoadsdataWrapperState of(BuildContext context) {
RoadsdataService? rdService =
context.dependOnInheritedWidgetOfExactType<RoadsdataService>();
if (rdService == null) {
debugPrint(
'Tried to access RoadsdataWrapperState from the outside of its context scope.');
throw Exception(
'Roadsdata service not found.\nMake sure that you have initialized correctly the Roadsdata sdk.');
}
return rdService.data;
}