Coder Social home page Coder Social logo

flutter-assets-gen's Introduction

Profile Views

Hey there


Hi, I'm Weekit Mo, a passionate Full Stack web developer and a freelance software engineer from China.

GIF

  • 👨 I’m currently working on ghzs.com.

  • 🌱 I’m currently learning Unity in-depth.

  • 😜 I’m interesting in Zig and Rust now.

  • 🤔 I’m going to improve Algorithms.

  • 💬 Ask me about anything, I am happy to help.

I learned a lot from the open-source community and I love how collaboration and knowledge sharing happened through open-source. Gmail Badge

Languages and Tools:


Git GitHub GitLab Docker Redis MongoDB

📈  Weekit's GitHub Stats

Expand👆
  🤷‍♂️  In my spare time, I also like to watch anime and like to visit Bilibili's website
  

Dino


flutter-assets-gen's People

Contributors

codersangam avatar sanjay-rb avatar weekitmo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flutter-assets-gen's Issues

Prefer single quotes for paths

According to dart linter-rules, we should prefer using single quotes instead of double quotes for strings.

Can we please either follow this, or write // ignore_for_file: prefer_single_quotes as the first line of the generated file to ignore this lint and stop the IDE from showing warnings?

Remove Comments

Is there any way to not generate the comments?

/// Assets for imagesAbout
/// assets/images/about.png

生成的Key没有完全按照驼峰命名规则

当assets有多级子目录时,生成的资源Key,没有完全按照驼峰命名规则,如:
static const String imagesuserVip = "assets/images/user/vip.png";

images目录下,新建了子目录user, 生成的key为:imagesuserXxx
希望有时间的时候能优化一下,谢谢

[Feature] Add package_name field to be able to use assets inside packages without assigning package name to every image widget.

Feature: Add package_name Field to flutter_assets configs for Asset Management

Explanation:

In Flutter, when using assets from a package, developers currently need to specify the package name for each asset individually in the Image widget or similar widgets. This can be repetitive and inefficient, especially when using multiple assets from the same package.

The proposed feature introduces a package_name field that can be added to the pubspec.yaml file under the flutter_assets: section. This field would allow developers to define the package name globally. As a result, assets could be used without repeatedly specifying the package name, improving code cleanliness and reducing redundancy.

For example, instead of writing:

Image.asset('assets/images/icon.png', package: 'my_package')

each time an asset is used, the package_name could be set once in the pubspec.yaml:

flutter_assets:
  package_name: my_package

Then, this would resolve to:

String icon = 'packages/my_package/assets/images/icon.png';

asset not found

i used this extension but i get message error say "unable to load assets"
exception: asset not found

dynamic class names

flutter_assets:
  assets_path: assets/icons/social/
  output_path: lib/core/constants/my_assets/icons/
  filename: social_icons.dart
  field_prefix:

By default ClassName is Assets

Expected ClassName: SocialIcons
classname can be filename.

Same images different extension errors

The name 'imagesPlaces' is already defined. Try renaming one of the declarations.

 /// Assets for imagesPlaces
/// assets/images/places.svg
static const String imagesPlaces = "assets/images/places.svg";

/// Assets for imagesPlaces
/// assets/images/places.jpeg
static const String imagesPlaces = "assets/images/places.jpeg";

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.