drawable 0.1.0 copy "drawable: ^0.1.0" to clipboard
drawable: ^0.1.0 copied to clipboard

discontinued

Flutter plugin to load Android drawables. This helps to share graphics between Flutter and Android

DRAWABLE #

pub.dev GitHub Workflow Status code coverage Sponsoring likes popularity pub points


A Flutter plugin to share images between Flutter and Android. For iOS please use ios_platform_images.

Usage #

import 'package:drawable/drawable.dart';

Widget build(BuildContext context) {
  return MaterialApp(
    home: Scaffold(
      body: Center(
        child: Image(image: DrawableImage("flutter")),
      ),
    ),
  );
}

If you want to do something different with the drawables you receive them directly like this:

import 'package:drawable/drawable.dart';

Future<void> main() async {
    const androidDrawable = AndroidDrawable();
    final drawable = await androidDrawable.loadBitmap('drawable_id');
} 

Supported drawables #

Drawable type Supported Additional notes
AdaptiveIconDrawable
BitmapDrawable
ColorDrawable
VectorDrawable Because of limitations of Android, this is not a vector on the Flutter side.

The following drawable are supported as Bitmap Drawables. Please note, that all of these drawable are currently converted to a bitmap. More sophisticated support is planned, but currently not available.

Drawable type
ColorStateListDrawable
GradientDrawable
LayerDrawable
LevelListDrawable
PictureDrawable
ShapeDrawable
StateListDrawable
TransitionDrawable

List of currently unsupported drawables:

📣 Author #

Sponsoring #

I'm working on my packages on my spare time, but I don't have as much time as I would like. If this package or any other package I maintain is helping you, please consider to sponsor me. By doing so, I will prioritize your issues or your pull-requests before the others.

13
likes
90
pub points
63%
popularity

Publisher

verified publisheruekoetter.dev

Flutter plugin to load Android drawables. This helps to share graphics between Flutter and Android

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on drawable