post_photo_widget 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 42

post_photo_widget #

A new Flutter plugin that can send photos similar to WeChat moments 发送微信朋友圈九宫格照片

Getting Started #

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

import 'package:flutter/services.dart';
import 'package:post_photo_widget/post_photo_widget.dart';

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

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

class _MyAppState extends State<MyApp> {

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('类微信朋友圈发送器'),
        ),
        body: PostPhotoView(
          addImgSrc: 'images/zhaopian_add_2x.png',
          widthPadding: 30,
        ),
      ),
    );
  }
}

0.0.1 #

  • TODO: Describe initial release.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:post_photo_widget/post_photo_widget.dart';

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

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

class _MyAppState extends State<MyApp> {

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('类微信朋友圈发送器'),
        ),
        body: PostPhotoView(
          addImgSrc: 'images/zhaopian_add_2x.png',
          widthPadding: 30,
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  post_photo_widget: ^0.0.1

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

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

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

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

Analysis of lib/post_photo_widget.dart reported 1 hint:

line 22 col 10: The value of the field '_error' isn't used.

Format lib/asset_provider.dart.

Run flutter format to format lib/asset_provider.dart.

Maintenance issues and suggestions

The description contains too many non-ASCII characters. (-20 points)

The site uses English as its primary language. The value of the description field in your package's pubspec.yaml field should primarily contain characters used in English.

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (permission_handler).

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
flutter 0.0.0
multi_image_picker ^4.6.1 4.6.5+rc.1
permission_handler ^4.1.0 4.4.0+hotfix.4 5.0.0+hotfix.3
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
permission_handler_platform_interface 1.0.0 2.0.0
plugin_platform_interface 1.0.2
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test