mapbox / mapbox/mapbox-maps-flutter
Could see map box on emulator
Open
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Here is the screen shot of emulator which show the performance bar of map box but the map is not visible. But works on real device.
import 'package:flutter/material.dart';
import 'package:map_box_test/next.dart';
import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
),
useMaterial3: true,
),
home: const FullMap(),
);
}
}
class FullMap extends StatefulWidget {
const FullMap({super.key});
@override
State createState() => FullMapState();
}
class FullMapState extends State<FullMap> {
MapboxMap? mapboxMap;
_onMapCreated(MapboxMap mapboxMap) {
this.mapboxMap = mapboxMap;
}
@override
Widget build(BuildContext context) {
return Scaffold(
bottomSheet: DraggableScrollableSheet(
expand: false,
builder: (context, scrollController) => Container(
color: Colors.amber,
child: SingleChildScrollView(
controller: scrollController,
child: const Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
SizedBox(
height: 100,
child: Card(
color: Colors.grey,
),
)
],
),
),
),
),
appBar: AppBar(
title: const Text("MapBox"),
actions: [
GestureDetector(
onTap: () {
Navigator.push(
context,
CupertinoPageRoute(
builder: (context) => const MyWidget(),
));
},
child: const Icon(Icons.arrow_forward))
],
),
body: MapWidget(
key: const ValueKey("mapWidget"),
resourceOptions: ResourceOptions(
accessToken:
"MY_SECRET_KEY"),
onMapCreated: _onMapCreated,
));
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided MapWidget example on an emulator and comparing it with a real-device run. Check the emulator configuration and the map rendering setup shown in the issue; done means identifying why the performance bar appears while the map does not and documenting or fixing the reproducible cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100