mobiprint3
This is a simple unofficial plugin to enable basic printing functionality on the mobiwire mobiprint3 device
Feel free to make contributions to the package.
Getting Started
In your files
import 'package:mobiprint3/mobiprint3.dart';
The responses returned are in the format Map<String,dynamic>
sample response
{ "success" : true, "message" : "1" }
To print basic text
print(String txt);
e.g
Map<String,dynamic> printResponse = await Mobiprint3.print('Hello From flutter\n\n');
To print an image/bitmap
custom(String text, Integer size);
e.g
Map<String,dynamic> printResponse = await Mobiprint3.custom('Headers',2);
size 1 to 3
To print an image/bitmap
Not Yet functional
printImage(String image_src )
e.g
not functioning -- pending implementation
To check if paper is loaded (or if is in printer mode)
checkPaper(); e.g
Map<String,dynamic> printResponse = await Mobiprint3.checkPaper();
To print a space
space(); e.g
Map<String,dynamic> printResponse = await Mobiprint3.space();
End the printing session print two terminating lines
end(); e.g
Map<String,dynamic> printResponse = await Mobiprint3.end();
Libraries
Dart
- dart:ui
- Built-in types and core primitives for a Flutter application. [...]
- dart:async
- Support for asynchronous programming, with classes such as Future and Stream. [...]
- dart:collection
- Classes and utilities that supplement the collection support in dart:core. [...]
- dart:convert
- Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
- dart:core
- Built-in types, collections, and other core functionality for every Dart program. [...]
- dart:developer
- Interact with developer tools such as the debugger and inspector. [...]
- dart:math
- Mathematical constants and functions, plus a random number generator. [...]
- dart:typed_data
- Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]
- dart:io
- File, socket, HTTP, and other I/O support for non-web applications. [...]
- dart:isolate
- Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]