flutter_map paketini kullanarak bir harita eklemek istiyorum. internetten araştığım kodu denediğimde hatalar çıkıyor.
hata:
1-The named parameter 'children' is required, but there's no corresponding argument.
Try adding the required argument.
2-The argument type 'LatLng' can't be assigned to the parameter type 'LatLng?'.
3-The named parameter 'layers' isn't defined.
Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'layers'
4- The method 'TileLayerOptions' isn't defined for the type '_KonumState'.
Try correcting the name to the name of an existing method, or defining a method named 'TileLayerOptions'.
kod:
@override
Widget build(BuildContext context) {
return FlutterMap(
options: MapOptions(
center: LatLng(37.7749, -122.4194),
zoom: 13.0,
),
layers: [
TileLayerOptions(
urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
subdomains: ['a', 'b', 'c'],
),
],
);
}