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

outdated

A new flutter plugin project.

example/lib/main.dart

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

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: <Widget>[
            Expanded(
              child: Center(
                child: Text(_result),
              ),
            ),
            Expanded(
              child: Center(
                child: RaisedButton(
                  child: Text("scan"),
                  onPressed: () async {
                    String result;
                    try {
                      result = await ScanFlutterIos.scan();
                    } on PlatformException {
                      result = 'Failed to get platform version.';
                    }
                    setState(() {
                      _result = result;
                    });
                  },
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on scan_flutter_ios