image_b 0.1.9

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

image_b #

A new flutter plugin project.

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.

0.1.9 #

  • TODO: Describe initial release.
  • TODO: Modify android plugin

example/lib/main.dart

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

import 'package:image_b/image_b.dart';

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

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

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

  String _res2 = '';

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String platformVersion;
    // Platform messages may fail, so we use a try/catch PlatformException.
    /*try {
      platformVersion = await ImageBlur.platformVersion;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }*/
    platformVersion = 'Cargando..';
    setState(() {
      _platformVersion = platformVersion;
    });
    try {
      if (await ImageB.isImageBlurry(
          "https://www.allaboutvision.com/static/dca7ac0b2b77f938717971d612fe658d/18f60/visually-impaired-1200x630.png") == 1) {
        _res2 = 'Borrosa';
      } else {
        _res2 = 'Buena';
      }
    } on Exception catch (e) {
      print(e);
    }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;
    platformVersion = 'Carga completada';

    setState(() {
      _platformVersion = platformVersion;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Detector de imagenes borrosas'),
        ),
        body: Center(
          child: new ListView(
            children: [
              Text('Estado: $_platformVersion\n'),
              new Image.network(
                "https://www.allaboutvision.com/static/dca7ac0b2b77f938717971d612fe658d/18f60/visually-impaired-1200x630.png",
                width: 400.0,
                height: 200.0,
                fit: BoxFit.cover,
              ),
              Text('Estado de la imagen: $_res2\n'),
              new RaisedButton(
                  onPressed: initPlatformState,
                  textColor: Colors.white,
                  color: Colors.red,
                  padding: const EdgeInsets.all(8.0),
                  child: new Text(
                    "Refresh",
                  )),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  image_b: ^0.1.9

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_b/image_b.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]
100
Overall:
Weighted score of the above. [more]
50
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.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:image_b/image_b.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:image_b/image_b.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:image_b/image_b.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:image_b/image_b.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [image_b] that is in a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

5 out of 5 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.

Format lib/image_b.dart.

Run flutter format to format lib/image_b.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test