Giter Club home page Giter Club logo

flutter-img-sync's Introduction

flutter-img-sync

a plugin for flutter images synchronization

声明:插件灵感来自于asset_generator,致谢作者

Android Studio及IDEA可在插件商店中搜索并安装: flutter-img-sync 使用说明

vs code编辑器在扩展商店中搜索并安装: flutter-img-sync 使用说明

功能:将资产目录下的图片自动添加到pubspec.yaml的assets配置下面,并生成R文件,代码中直接引用R文件下的定义即可

如有疑问,加群讨论【AndroidRunner】

效果演示(Android Studio or IDEA)

Android Studio or IDEA

效果演示(vs code)

vs code

How To Use

step1.创建资产图片存放目录

创建资产图片存放目录 如: ./assets/img

step2.修改pubspec.yaml

定义资产图片存放目录,如:

assets:
# assets-generator-begin
# assets/img/*
# assets-generator-end

step3.执行 FlutterImgSync (flutter-img-sync),AS和IDEA需要输入自定义图片预览的端口再点击确定执行插件

  • 命令执行后,图片将会被自动放置到pubspec.yaml文件的assets变量中
  • ./lib/r.dart 将会被创建
  • 在代码中导入r.dart文件,然后引用R类的变量

step4.pub get 刷新一下

插件商店地址

IDEA/AS: https://plugins.jetbrains.com/plugin/12585-flutter-img-sync/

vscode: https://marketplace.visualstudio.com/items?itemName=Lihaha.flutter-img-sync&ssr=false#overview

flutter-img-sync's People

Contributors

leo0618 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.