geodraw 0.1.0 copy "geodraw: ^0.1.0" to clipboard
geodraw: ^0.1.0 copied to clipboard

Draw geospatial information on a map. Marker, line and polygon pickers are available

example/lib/main.dart

import 'package:flutter/material.dart';
import 'marker.dart';
import 'line.dart';
import 'polygon.dart';

final routes = {
  '/marker': (BuildContext context) => MarkerPage(),
  '/line': (BuildContext context) => LinePage(),
  '/polygon': (BuildContext context) => PolygonPage(),
};

class GeoDrawPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            mainAxisSize: MainAxisSize.max,
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              RaisedButton(
                child: const Text("Draw marker"),
                onPressed: () => Navigator.of(context).pushNamed("/marker"),
              ),
              RaisedButton(
                child: const Text("Draw line"),
                onPressed: () => Navigator.of(context).pushNamed("/line"),
              ),
              RaisedButton(
                child: const Text("Draw polygon"),
                onPressed: () => Navigator.of(context).pushNamed("/polygon"),
              ),
            ]),
      ),
    );
  }
}

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'GeoDraw Demo',
      routes: routes,
      home: GeoDrawPage(),
    );
  }
}
7
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Draw geospatial information on a map. Marker, line and polygon pickers are available

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

cupertino_icons, flutter, geopoint, livemap, map_markers, pedantic

More

Packages that depend on geodraw