sunmiconditionalimports 0.0.12
sunmiconditionalimports: ^0.0.12 copied to clipboard
A wrapper for the sunmi_printer_plus package and the bitmap package to use them conditionally based on the platform.
This package is a wrapper for the sunmi_printer_plus package aswell as the bitmap package. It provides a way to import the sunmi_printer_plus package and the bitmap package conditionally based on the platform. This is useful for when you want to use the sunmi_printer_plus package and bitmap package on Android, while also deploying the same code to the web. Specifically made for usage with FlutterFlow, since FlutterFlow does not support conditional imports.
Features #
This package provides a way to import the sunmi_printer_plus package and the bitmap package conditionally based on the platform.
Getting started #
Add the following to your pubspec.yaml file:
dev_dependencies:
sunmiconditionalimports: ^0.0.12
Usage #
import 'package:sunmiconditionalimports/sunmiprinterimports_exports.dart';
DO NOT import the other files directly, as they are not intended to be used directly. #
Use the following classes from this package:
SunmiPrinter- example:SunmiPrinter.printText('Hello World')SunmiPrintAlign- example:SunmiPrintAlign.center()SunmiFontSize- example:SunmiFontSize.md()ColumnMaker- example:ColumnMaker(text: 'Hello World', width: 10, align: SunmiPrintAlign.center())Bitmap- example:Bitmap.fromProvider(NetworkImage('https://example.com/image.png'), 100)