Skip to content

efpub/ef_qrcode

Repository files navigation

ef_qrcode

pub package

A flutter plugin can be used to generate QRCode.

Example

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use

  1. Dependency

In your pubspec.yaml, add the following config:

dependencies:
   ef_qrcode: 0.3.3
  1. Generate

The method statement is as follows:

static Future<File> generate(String content, String backgroundColor, String foregroundColor)

You can call this method liek this:

void generateImage() async {
   try {
      var imageFile = await EfQrcode.generate("content", "#ffffff", "#000000");
      setState(() {
         _imageFile = imageFile;
      });
   }
   catch (e) {
      print(e);
   }
}

For more information, you can see the example project.

Author

EyreFree, eyrefree@eyrefree.org