location_and_image_picker 0.0.3

location and image picker package for Flutter #

pub package

A Flutter package for iOS and Android for picking location and images.

Demo #

Installation #

First, add location_and_image_picker as a dependency in your pubspec.yaml file.

iOS #

Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

On iOS you'll need to add the NSLocationWhenInUseUsageDescription to your Info.plist file in order to access the device's location. Simply open your Info.plist file and add the following:

<string>This App Need Your Current Location Permission </string>
<string>Used to demonstrate image picker plugin</string>
<string>Used to capture audio for image picker plugin</string>
<string>Used to demonstrate image picker plugin</string>

Android #

On Android you'll need to add either the ACCESS_FINE_LOCATION permission to your Android Manifest. Todo so open the AndroidManifest.xml file and one of the following two lines as direct children of the <manifest> tag:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Code for the location and image picker widget #

import 'package:location_and_pic_picker/location_and_pic_picker.dart';

class MyHomePage extends StatefulWidget {
  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
 Map<String, String> _getValue = new Map();
  Widget build(BuildContext context) {
    return LocationAndPicPicker(
                           onChanged: getLocationAndPic,
  void getLocationAndPic(Map value) {
      _getValue = value;

Code for the Full page location and image picker widget #

import 'package:location_and_pic_picker/fullpage_location_and_pic_picker.dart';

class HomePage extends StatelessWidget {
  final Map mapData;
  const PageFive({Key key, this.mapData}) : super(key: key);

  Widget build(BuildContext context) {
    return FullPageLocationAndImagePicker(      
      mapData: mapData,
      title: "Where it happened?",
      route: "/secend",


  • Disable landScape Mode


  • Update Screen Sort Image


  • Initial release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  location_and_image_picker: ^0.0.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:location_and_image_picker/location_and_image_picker.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 18, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Fix lib/fullpage_location_and_pic_picker.dart. (-0.50 points)

Analysis of lib/fullpage_location_and_pic_picker.dart reported 1 hint:

line 8 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: FullPageLocationAndImagePicker._sixthPageMap

Fix lib/location_and_image_picker.dart. (-0.50 points)

Analysis of lib/location_and_image_picker.dart reported 1 hint:

line 69 col 13: This function has a return type of 'Widget', but doesn't end with a return statement.

Format lib/map_box.dart.

Run flutter format to format lib/map_box.dart.

Maintenance issues and suggestions

Support latest dependencies. (-30 points)

The version constraint in pubspec.yaml does not support the latest published versions for 3 dependencies (flutter_map, geolocator, image_picker).

The package description is too short. (-11 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and location_and_image_picker.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Update README.md. (-2 points)

1 image link is insecure (e.g. http://sheikhsoft.com/screensort/location_and_image_picker.png), use https URLs instead.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_map ^0.5.0 0.5.6 0.8.2
geolocator ^3.0.1 3.0.1 5.2.1
image_picker ^0.5.0+9 0.5.4+3 0.6.3+1
Transitive dependencies
ansicolor 1.0.2
async 2.4.0
cached_network_image 1.1.3 2.0.0
charcode 1.1.3
collection 1.14.11 1.14.12
console_log_handler 1.1.6
convert 2.1.1
crypto 2.1.4
flutter_cache_manager 1.1.3
flutter_image 2.0.0 3.0.0
google_api_availability 2.0.2
http 0.12.0+4
http_parser 3.1.3
intl 0.16.1
latlong 0.6.1
logging 0.11.4
matcher 0.12.6
meta 1.1.8
path 1.6.4
path_provider 1.6.0
pedantic 1.9.0
permission_handler 3.3.0 4.2.0+hotfix.3
platform 2.2.1
positioned_tap_detector 1.0.3
quiver 2.1.2+1
sky_engine 0.0.99
source_span 1.6.0
sqflite 1.2.1
stack_trace 1.9.3
string_scanner 1.0.5
synchronized 2.2.0
term_glyph 1.1.0
transparent_image 1.0.0
tuple 1.0.3
typed_data 1.1.6
uuid 2.0.4
validate 1.7.0
vector_math 2.0.8
Dev dependencies