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

A new Flutter plugin.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();

}

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

  @override
  void initState() {
    super.initState();
    //FlutterInfraredScan().listen();
  }

  Future<void> getModel() async{
    String model;
    model=await FlutterInfraredScan().getDeviceModel??'no model';
    
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $modelStr'),
        ),
      ),
    );
  }

}
0
likes
100
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin.

Homepage

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_infrared_scan