google_location_picker 0.0.5 google_location_picker: ^0.0.5 copied to clipboard
Package for easily picking location from map with autocomplete feature
import 'package:flutter/material.dart';
import 'package:google_location_picker/google_location_picker.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return const MaterialApp(
supportedLocales: [
Locale('ar'),
Locale('en'),
],
locale: Locale('en'),
home: App(),
);
}
}
class App extends StatefulWidget {
const App({super.key});
@override
State<App> createState() => _AppState();
}
class _AppState extends State<App> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: MaterialButton(
color: Colors.red,
onPressed: () {
showLocationPicker(
context,
"",
);
},
child: const Text("pick location"),
),
),
);
}
}