inline_assets 0.1.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

inline_assets.dart

Transformer that inlines asset files into Dart source files as strings.

Build Status

Usage

Add the inline_assets transformer to the transformer list in your pubspec.yaml:

transformers:
  - inline_assets

This transformer substitutes INLINE_ASSET("uri") placeholders with the contents of the asset they reference. The uri should be a valid Dart URI. It may be a relative URI or a package: URI:

// my_package|lib/my_lib.dart

// Import the INLINE_ASSET placeholder function
import 'package:inline_assets/inline_assets.dart';

// Will be set to the contents of my_package|lib/queries/my_query.sql
String query = INLINE_ASSET('queries/my_query.sql');

// Will be set to the contents of other|lib/shaders/some_shader.glsl
String shader = INLINE_ASSET('package:other/shaders/some_shader.glsl');

Absolute URIs are not allowed.

inline_assets.dart change log

0.1.0

  • Initial version

Use this package as a library

1. Depend on it

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


dependencies:
  inline_assets: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:inline_assets/inline_assets.dart';
  
Version Uploaded Documentation Archive
0.1.2 Sep 14, 2016 Go to the documentation of inline_assets 0.1.2 Download inline_assets 0.1.2 archive
0.1.1 Aug 30, 2016 Go to the documentation of inline_assets 0.1.1 Download inline_assets 0.1.1 archive
0.1.0 Aug 30, 2016 Go to the documentation of inline_assets 0.1.0 Download inline_assets 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0