mapbox_maps_flutter 3.0.0-alpha.29 copy "mapbox_maps_flutter: ^3.0.0-alpha.29" to clipboard
mapbox_maps_flutter: ^3.0.0-alpha.29 copied to clipboard

Official Mapbox Maps SDK for Flutter. Add an interactive map widget that renders Mapbox Vector Tile (MVT) maps. Customize it for Android, iOS, and Web.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart';
import 'examples.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  MapboxOptions.setAccessToken(const String.fromEnvironment('ACCESS_TOKEN'));
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Examples',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home: Scaffold(
        appBar: AppBar(title: const Text('MapboxMaps examples')),
        body: Center(
          child: ConstrainedBox(
            constraints: const BoxConstraints(maxWidth: 600),
            child: ListView.separated(
          itemCount: examples.length,
          separatorBuilder: (_, __) => const Divider(height: 1),
          itemBuilder: (context, index) {
            final example = examples[index];
            return ListTile(
              leading: example.leading,
              title: Text(example.title),
              subtitle: (example.subtitle?.isNotEmpty == true)
                  ? Text(
                      example.subtitle!,
                      maxLines: 2,
                      overflow: TextOverflow.ellipsis,
                    )
                  : null,
              onTap: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (_) => Scaffold(
                      appBar: AppBar(title: Text(example.title)),
                      body: example.builder(context),
                    ),
                  ),
                );
              },
            );
          },
            ),
          ),
        ),
      ),
    );
  }
}
378
likes
150
points
115k
downloads
screenshot

Documentation

API reference

Publisher

verified publishermapbox.com

Weekly Downloads

Official Mapbox Maps SDK for Flutter. Add an interactive map widget that renders Mapbox Vector Tile (MVT) maps. Customize it for Android, iOS, and Web.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#mapbox #map #maps #vector-tiles #mvt

License

unknown (license)

Dependencies

flutter, mapbox_maps_flutter_mobile, mapbox_maps_flutter_platform_interface, mapbox_maps_flutter_web, meta, turf

More

Packages that depend on mapbox_maps_flutter

Packages that implement mapbox_maps_flutter