The Flutter plugin for iOS and Android to decoding QR codes.
First, add qr_code_tools as a dependency in your pubspec.yaml file.
Add one rows to the ios/Runner/Info.plist:
- one with the key
Privacy - Photo Library Usage Descriptionand a usage description.
Or in text format add the key:
<key>NSPhotoLibraryUsageDescription</key> <string>Can I use the photo library please?</string>Nothing to do
import 'package:qr_code_tools/qr_code_tools.dart'; String _data; /// decode from local file Future decode(String file) async { String data = await QrCodeToolsPlugin.decodeFrom(file); setState(() { _data = data; }); }For a more elaborate usage example see here.