carillon_map_box 0.0.7+4 copy "carillon_map_box: ^0.0.7+4" to clipboard
carillon_map_box: ^0.0.7+4 copied to clipboard

outdated

A new Flutter plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:carillon_map_box/carillon_map_box.dart';
import 'package:carillon_map_box/models.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

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

  @override
  Widget build(BuildContext context) {

    Map<String, dynamic> options = {
      "mapStyle": "dark",
      "simulateRoute": false,
      "points": [
        CarillonLocation(id: 0, address: "plaisir", latitude: 48.82, longitude: 1.96).toJson(),
        CarillonLocation(id: 1, address: "clamart", latitude: 48.8, longitude: 2.25).toJson()
      ]
    };

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('CarillonMapBox Example (convenient)'),
        ),
        body: Center(
          child: CarillonMapBox(onCarillonMapBoxCreated: _onCarillonMapBoxCreated),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            CarillonMapBox.startNavigation(options,
                () {
                  print("Start CALLBACK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                }, () {
                  print("End CALLBACK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                });
            Future.delayed(const Duration(seconds: 10), () {
              CarillonMapBox.sendAlert();
            });
          },
        ),
      ),
    );
  }

  void _onCarillonMapBoxCreated(CarillonMapBoxController controller) {
  }
}
2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin.

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on carillon_map_box