ehsurescanner 0.0.1 copy "ehsurescanner: ^0.0.1" to clipboard
ehsurescanner: ^0.0.1 copied to clipboard

discontinued

Ehsure scanner Flutter plugin.

example/lib/main.dart

import 'package:ehsurescanner/ehsurescanner.dart';
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _codeValue = 'Unknown';

  @override
  void initState() {
    super.initState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String codeValue;
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      codeValue = await EhsureScanner.scanErCode;
    } on PlatformException {
      codeValue = 'Failed to get platform version.';
    }
    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
//    if (!mounted) return;

    setState(() {
      _codeValue = codeValue;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text(_codeValue),
        ),
        body: Center(
          child: RaisedButton(
            child: Text(_codeValue),
              onPressed: (){
                initPlatformState();
              })
        ),
      ),
    );
  }
}
1
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Ehsure scanner Flutter plugin.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on ehsurescanner