image_color_picker 1.0.7

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

Image color picker #

Add a heading

Pick color from image (assets/network/file) and get color hexcodes

Installation #

First, add image_color_picker: ^1.0.0 as a dependency in your pubspec.yaml file.

Import

import 'import 'package:image_color_picker/image_color_picker.dart';';

Just provide Image either by assets/network/file and get colorCodes

Network #

onPressed: () {
            Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (context) => NetworkImageBG(
                          networkpath:
                              'https://media-exp1.licdn.com/dms/image/C5122AQEtG7CO0rFCRg/feedshare-shrink_800/0?e=1588809600&v=beta&t=kc8G2jGTOzxm0ehLchKh0SlTSyUl62Vtb5K59P00BLY',
                        )));
          },

Asset #

onPressed: () {
            Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (context) => AssetImageBG(
                          assetPath: 
                              'https://media-exp1.licdn.com/dms/image/C5122AQEtG7CO0rFCRg/feedshare-shrink_800/0?e=1588809600&v=beta&t=kc8G2jGTOzxm0ehLchKh0SlTSyUl62Vtb5K59P00BLY',
                        )));
          },

File #

onPressed: () {
            Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (context) => FileImageBG(
                          filePath: 
                              File('./path')),
                        ));
          },

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

MIT License

Copyright (c) 2020 Zeeshux7860

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.0.1 #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:image_color_picker/image_color_picker.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Plugin example app'),
      ),
      body: Center(
        child: RaisedButton(
          child: Text('View Image'),
          onPressed: () {
            Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (context) => NetworkImageBG(
                          networkpath:
                              'https://media-exp1.licdn.com/dms/image/C5122AQEZISWpS2kJLg/feedshare-shrink_800/0?e=1588809600&v=beta&t=udluuJuG3m5_Gv94Gxt9ftp51oMa4Dh2mspBAMO2_nA',
                        )));
          },
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  image_color_picker: ^1.0.7

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

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because:

  • package:image_color_picker/image_color_picker.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:image_color_picker/image_color_picker.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:image_color_picker/image_color_picker.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:image_color_picker/image_color_picker.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • image_color_picker that is a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
image ^2.1.4 2.1.14
Transitive dependencies
archive 2.0.13
args 1.6.0
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
meta 1.1.8 1.2.1
path 1.7.0
petitparser 3.0.4
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
xml 4.2.0
Dev dependencies
flutter_test