infrared_scanner 0.1.1 copy "infrared_scanner: ^0.1.1" to clipboard
infrared_scanner: ^0.1.1 copied to clipboard

A new flutter plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

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

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

class _MyAppState extends State<MyApp> {
  static const EventChannel _eventChannel = EventChannel('neo.com/app');

  String scanValue;

  @override
  void initState() {
    super.initState();
    _eventChannel.receiveBroadcastStream().listen((value) {
      setState(() {
        scanValue = value;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Scanner Received: $scanValue\n'),
        ),
      ),
    );
  }
}
4
likes
25
pub points
41%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on infrared_scanner