map_native 0.0.7 map_native: ^0.0.7 copied to clipboard
Map widget for Flutter written in Dart. Supports Android and iOS.
import 'package:flutter/material.dart';
import 'package:map_native/map_native.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final inline0 = new Card(
child: new Stack(
children: [
new MapView(),
new Align(
alignment: Alignment.bottomRight,
child: new Padding(
padding: const EdgeInsets.all(16.0),
child: new FloatingActionButton(
backgroundColor: Colors.white,
onPressed: () {},
child: new Icon(Icons.my_location, color: Colors.purple))))
],
));
final inline1 = new Card(
child: new Stack(
children: [
new MapView(),
new Align(
alignment: Alignment.bottomRight,
child: new Padding(
padding: const EdgeInsets.all(16.0),
child: new FloatingActionButton(
backgroundColor: Colors.white,
onPressed: () {},
child: new Icon(Icons.my_location, color: Colors.purple))))
],
));
return new MaterialApp(
title: 'MapView Demo',
theme: new ThemeData(
primarySwatch: Colors.purple,
),
home: new Scaffold(
appBar: new AppBar(
title: const Text("MapView Demo"),
),
body: new Column(children: [
new Padding(
padding: const EdgeInsets.all(8.0),
child: new Expanded(child: inline0)),
new Padding(
padding: const EdgeInsets.all(8.0),
child: new Expanded(child: inline1)),
])));
}
}