location_and_image_picker 0.0.3

  • Readme
  • Changelog
  • Installing
  • 66

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:

<key>NSLocationWhenInUseUsageDescription</key>
<string>This App Need Your Current Location Permission </string>
<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>
<key>NSPhotoLibraryUsageDescription</key>
<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 {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
 Map<String, String> _getValue = new Map();
 
  @override
  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);

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

[0.0.3]

  • Disable landScape Mode

[0.0.2]

  • Update Screen Sort Image

[0.0.1]

  • Initial release

Use this package as a library

1. Depend on it

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


dependencies:
  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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
58
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
37
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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.

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

Analysis of lib/utils.dart reported 1 hint:

line 11 col 9: 'child' is deprecated and shouldn't be used.

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.

Dependencies

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.7.3
geolocator ^3.0.1 3.0.1 5.1.5
image_picker ^0.5.0+9 0.5.4+3 0.6.2+1
Transitive dependencies
ansicolor 1.0.2
async 2.4.0
cached_network_image 1.1.3 2.0.0-rc.1
charcode 1.1.2
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.1 3.0.0
google_api_availability 2.0.1
http 0.12.0+2
http_parser 3.1.3
intl 0.16.0
latlong 0.6.1
logging 0.11.3+2
matcher 0.12.6
meta 1.1.7 1.1.8
path 1.6.4
path_provider 1.5.0
pedantic 1.9.0
permission_handler 3.3.0 4.0.0
platform 2.2.1
positioned_tap_detector 1.0.3
quiver 2.1.2+1
sky_engine 0.0.99
source_span 1.5.5
sqflite 1.1.7+3
stack_trace 1.9.3
string_scanner 1.0.5
synchronized 2.1.1
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
flutter_test