mapit 0.0.10 mapit: ^0.0.10 copied to clipboard
MapIt allow you to use map in your app,It will help user to search any place on map and can place marker on map and also can move the user to current location on map.
import 'package:mapit/mapit.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Mapit Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomeScreen(),
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: GoogleMapScreen(
onPressBack: (){
Navigator.pop(context);
},
address: (val){
}, mapApiKey: 'YOUR_MAP_API_KEY',
)),
);
}
}