flunama 0.0.3 copy "flunama: ^0.0.3" to clipboard
flunama: ^0.0.3 copied to clipboard

A new flutter plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flunama/flunama.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  MapBoxController controller;

  @override
  void initState() {
    super.initState();
  }

  void _onMapCreated(MapBoxController controller) {
    this.controller = controller;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("flunama example"),
          actions: <Widget>[
            FlatButton(
              child: Icon(Icons.gps_fixed),
              onPressed: () {
                controller.setCenterCoordinate(Coordinate(47.5, 19.05), true);
                controller.getStyleURL().then((url) {
                  debugPrint(url);
                });
                controller.setStyleURL(Style.satelliteStreets);
              },
            )
          ],
        ),
        body: MapBox(
          onMapCreated: _onMapCreated,
          options: MapboxOptions(
            "pk.eyJ1IjoiZm9udGluYWxpcyIsImEiOiJjamo3N3QxZzkwcGZkM3Jzd3R0OHd3eG9jIn0.MDmSPZyfbQ7NP0toOzSnyg",
            styleURL: Style.satellite,
            centerCoordinate: Coordinate(42, 47),
            zoomLevel: 3.0,
          ),
        ),
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flunama