Search packages, repositories and app categories

Package detailsv1.7.1

embed

Code generation for embedding arbitrary file content into Dart code.

AndroidiOSmacOSWindowsLinux
30-day downloads
17.4K
Likes
34
Pub points
160

Install package

flutter pub add embed

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The embed package enables developers to embed arbitrary file content directly into Dart code through code generation. This is particularly useful for including assets like images, JSON files, or configuration data without relying on the standard asset bundle system. By generating Dart constants from file contents at compile time, it improves performance and simplifies access to embedded resources. The package supports multiple platforms, including Android, iOS, macOS, Windows, and Linux, making it ideal for cross-platform applications that require efficient, static resource handling.

Use cases

  • Embedding configuration files
  • Including static assets in app binaries
  • Reducing runtime asset loading
  • Simplifying local file access in Flutter apps
  • Optimizing startup performance

Key features

  • Code generation for file embedding
  • Supports multiple file types
  • Cross-platform compatibility
  • Compile-time resource inclusion
  • Minimal runtime overhead

Suitable for

  • Flutter apps needing embedded assets
  • Performance-critical applications
  • Apps with static configuration data
  • Developers avoiding asset bundles
  • Projects requiring zero-runtime file I/O

Considerations

  • Requires code generation step
  • Not suitable for dynamic or frequently changing files
  • May increase build time
  • Limited to compile-time file content
  • File paths must be known at build time

Categories

Dependencies

Dependency list 10 items

Projects using this package

No data available yet.