drukkio_preview 0.1.0
drukkio_preview: ^0.1.0 copied to clipboard
Flutter WebView wrappers for DRUKKIO product embeds (preview, buy, link, info, and QR).
drukkio_preview #
Flutter WebView wrappers for DRUKKIO product embeds. The same preview, buy row, link, info card, and QR widgets as the web components — loaded from embed.js inside a WebView.
Install #
flutter pub add drukkio_preview
Usage #
import 'package:drukkio_preview/drukkio_preview.dart';
import 'package:flutter/widgets.dart';
class Shirt extends StatelessWidget {
const Shirt({super.key});
@override
Widget build(BuildContext context) {
return const DrukkioPreview(
product: '0123456789abcdef',
canvasColor: '#111111',
sockets: {'headline': 'Ada'},
showName: true,
showPrice: true,
showBuy: true,
checkout: true,
options: true,
);
}
}
Also available: DrukkioBuy, DrukkioLink, DrukkioInfo, DrukkioQr.
Shop and checkout links open in the system browser by default so the cart cookie works. Pass onOpenUrl if the app should handle the URL first.
Docs #
License #
MIT