When I run the code below I'm getting errors in that nature **A problem occurred evaluating project ':mapbox_gl'.
SDK Registry token is null. See README.md for more information.**
I believe setting mapbox access token as global or environment variable could solve the problem. If anyone can assist with respect to which files I need to create to store the key and how do I access the tokenenter image description here
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: FutureBuilder(
future: loadConfigFile(),
builder: (BuildContext buildContext,
AsyncSnapshot<Map<String, dynamic>> snapshot) {
if (snapshot.hasData) {
return MapboxMap(
accessToken: snapshot.data['mapbox_api_token'],
initialCameraPosition: CameraPosition(
target: LatLng(-17.8075325, 30.9532117)));
}
else {
return Center(
child: CircularProgressIndicator(),
)
}
},
),
);
}
}
An image illustrating the actual error if this can help make this question clear