Flutter plugin released

Insert picture description here

Flutter plugin released

New plugin package

Application

  • Native Flutter project

plugin

  • Differentiation between iOS and Android

package

  • dart universal

module

  • Mixed engineering

Science online

Check plugins and release plugins need to be in the current project path

Check plugin

  • flutter packages pub publish --dry-run

Publish plugin

  • flutter packages pub publish

    • Must climb the wall
    • Prepare a Google account

Post crawl

First release (requires verification)

  • Looks great! Are you ready to upload your package (y/n)? y
    Pub needs your authorization to upload packages on your behalf.
    In a web browser, go to https://accounts.google.com/o/oauth2/auth?*******userinfo.email
    Then click “Allow access”.

    • Copy the link to the browser. Click Authorize

Not the first release

  • Pit one (the agent did not overturn the wall)

    • Waiting for your authorization…
      Authorization received, processing…
      It looks like accounts.google.com is having some trouble.
      Pub will wait for a while before trying to connect again.
      OS Error: Operation timed out, errno = 60, address = accounts.google.com, port = 53481
      pub finished with exit code 69

      • Different circumvention tools have different solutions [port number is the port number of the agent]

        • export https_proxy=http://127.0.0.1:51837
          export http_proxy=http://127.0.0.1:51837
      • 127.0.0.1 fixed writing

      • Check the port number in the proxy settings over the wall

  • Pit two (no server specified)

    • pub finished with exit code 69

      • flutter packages pub publish --server=https://pub.dartlang.org

      • sudo flutter packages pub publish -v

        Can view details

  • Pit three (without LICENSE)

Uploading…
LICENSE file LICENSE contains generic TODO.

	- 解决方案:在github到处一份LICENSE

		- BSD 3-Clause License

Copyright © 2020, 宋斌
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this
    list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  • Pit four (the project name is close to or conflicts with the published one)

    • Package name is too similar to another active or moderated package

      • Solution: add a prefix when creating a project
  • Pit five (pubspec.yaml configuration)

    • name: bean_flutter_toast
      description: A mark toast Flutter package. Welcome to communicate! wechat -song-bin-
      version: 0.0.1
      author: -song-bin-
      homepage: https://blog.csdn.net/song_bin

      • name: need to be consistent with the project
      • author: has been abolished and replaced by Google Mail
      • description: The description text cannot be too little or exceed a certain length
      • version: It is recommended to release version 1.0.0 and above [need to be consistent with CHANGELOG.md]
      • homepage: Need to configure an accessible link
  • Pit six (packages get stuck)

    • Running “flutter packages get” in project_name…

      • zsh[New system recommendation]
      • bash
  • Pit seven (the port number is not set)

    • bean@beansongs-mbp flutter_toast % flutter doctor
      Doctor summary (to see all details, run flutter doctor -v):
      [✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.6 19G2021, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
[✓] Android Studio (version 4.0)
[!] Proxy Configuration
! NO_PROXY is not set
[!] Connected device
! No devices available

	- zsh
	- bash
  • Maybe there are other pits I haven't encountered. . . . .

  • success

    • Uploading…
      Successfully uploaded package.

XMind - Trial Version

Guess you like

Origin blog.csdn.net/u010436133/article/details/108989526