flutter_scankit 2.0.3 copy "flutter_scankit: ^2.0.3" to clipboard
flutter_scankit: ^2.0.3 copied to clipboard

A scan code Flutter plugin, which is a Flutter package for huawei scanning SDK.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_scankit_example/bitmap_mode.dart';
import 'package:flutter_scankit_example/build_bitmap.dart';
import 'package:flutter_scankit_example/default_mode.dart';

import 'customized_mode.dart';
import 'load_image.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('ScanKit Example'),
          ),
          body: Home()
      ),
    );
  }
}

class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          ElevatedButton(
            child: Text("Default Mode"),
            onPressed: () {
              Navigator.of(context).push(MaterialPageRoute(
                  builder: (BuildContext context) {
                    return DefaultMode();
                  }
              ));
            },
          ),
          ElevatedButton(
            child: Text("Customized Mode"),
            onPressed: () {
              Navigator.of(context).push(MaterialPageRoute(
                  builder: (BuildContext context) {
                    return CustomizedMode();
                  }
              ));
            },
          ),
          ElevatedButton(
            child: Text("Bitmap Mode"),
            onPressed: () async {
              Navigator.of(context).push(MaterialPageRoute(
                  builder: (BuildContext context) {
                    return BitmapMode();
                  }
              ));
            },
          ),
          ElevatedButton(
            child: Text("Load Image"),
            onPressed: () async {
              Navigator.of(context).push(MaterialPageRoute(
                  builder: (BuildContext context) {
                    return LoadImage();
                  }
              ));
            },
          ),
          ElevatedButton(
            child: Text("Generate Bitmap"),
            onPressed: () async {
              Navigator.of(context).push(MaterialPageRoute(
                  builder: (BuildContext context) {
                    return BuildBitmap();
                  }
              ));
            },
          ),
        ],
      ),
    );
  }
}
48
likes
120
pub points
90%
popularity

Publisher

unverified uploader

A scan code Flutter plugin, which is a Flutter package for huawei scanning SDK.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_scankit