dart_desk_widgets 0.1.2 copy "dart_desk_widgets: ^0.1.2" to clipboard
dart_desk_widgets: ^0.1.2 copied to clipboard

Runtime Flutter widgets for rendering Dart Desk content — hotspot/crop-aware image framing and related primitives.

dart_desk_widgets #

Runtime Flutter widgets for rendering content authored in the dart_desk studio.

What's here #

  • DeskFrame — a layout wrapper that frames its child according to the crop and hotspot metadata on an ImageReference. The child is any widget that fills its parent box.
  • DeskImageView — convenience: DeskFrame around Image.network(ref.url).

This package is intentionally minimal and depends only on dart_desk_annotation and Flutter — consumer apps can use it without pulling in the heavier studio package.

Usage #

import 'package:dart_desk_widgets/dart_desk_widgets.dart';

// Simple case
DeskImageView(myImageRef, fit: BoxFit.cover);

// Custom child
DeskFrame(
  ref: myImageRef,
  fit: BoxFit.cover,
  child: CachedNetworkImage(
    imageUrl: myImageRef.publicUrl!,
    fit: BoxFit.fill, // child must fill its allocated box
  ),
);
0
likes
150
points
145
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Runtime Flutter widgets for rendering Dart Desk content — hotspot/crop-aware image framing and related primitives.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

dart_desk_annotation, flutter

More

Packages that depend on dart_desk_widgets