flutter_image_media 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 47

flutter_image_media #

A new Flutter plugin for getting image list from the phone (only android).

Getting Started #

To use import

  import 'package:flutter_image_media/flutter_image_media.dart';

To get the list of ImageAlbum

  Liat<ImageAlbum> imageAlbums=FlutterImageMedia.getImages;

The ImageAlbum contains folder/album name and the list of path of the images. this can be assesed using

  ImageAlbum imageAlbum;
  String album=imageAlbum.folderName;
  List<String> imagePaths=imageAlbum.imagePaths;

To get the list of ImageAlbumWithThumbnailPath

 List<ImageAlbumWithThumbnail> images = FlutterImageMedia.getAllImagesWithMiniThumbnail;

The ImageAlbumWithThumbnail contains folder/album name, the list of path of the thumbnail and the list of path of the images. this can be assesed using

  ImageAlbumWithThumbnail imageAlbum;
  String album=imageAlbum.folderName;
  List<String> imagePaths=imageAlbum.imagePaths;
  List<String> thumbnailPaths=imageAlbum.thumbnailPaths;

To get the list of ImageAlbum

  Liat<ImageAlbum> imageAlbums=FlutterImageMedia.getImages;

The ImageAlbum contains folder/album name nad the list of path of the images. this can be assesed using

  ImageAlbum imageAlbum;
  String album=imageAlbum.folderName;
  List<String> imagePaths=imageAlbum._imagePaths;

0.0.1 #

Initial Upload

0.0.2 #

Image with Album/folder name, mini thumbnail path and micro thumbnail path

example/README.md

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter_image_media/image_album.dart';
import 'package:flutter_image_media/flutter_image_media.dart';
import 'package:flutter_image_media/image_album_with_thumbnail.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
  }

  Future<void> getAllImagesWithThumbnail() async {
    List<ImageAlbumWithThumbnail> images =
            await FlutterImageMedia.getAllImagesWithMiniThumbnail;
    
    for (ImageAlbumWithThumbnail imageAlbum in images) {
      print("${imageAlbum.folderName} ${imageAlbum.imagePaths.length} ${imageAlbum.thumbnailPaths.length}");
    }
  }

  Future<void> getAllImages() async {
    showAllImages();
  }

  Future<void> showAllImages() async {
    List<ImageAlbum> images = await FlutterImageMedia.getImages;
    for (ImageAlbum imageAlbum in images) {
      print(imageAlbum.folderName);
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_image_media: ^0.0.2

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

We analyzed this package on Dec 9, 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

Health issues and suggestions

Document public APIs. (-1 points)

19 out of 19 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance suggestions

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.

Package is getting outdated. (-3.29 points)

The package was last published 53 weeks ago.

The package description is too short. (-2 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
simple_permissions ^0.1.9 0.1.9
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8