diff --git a/example/lib/main.dart b/example/lib/main.dart index 044810b..de748a8 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:barcode_scan/barcode_scan.dart'; +import 'package:barcode_scan/barcode_scanner.dart'; import 'package:flutter/material.dart'; void main() { @@ -43,7 +43,7 @@ class _MyAppState extends State { } Future scan() async { - String barcode = await BarcodeScan.scan(); + String barcode = await BarcodeScanner.scan(); setState(() => this.barcode = barcode); } } diff --git a/lib/barcode_scan.dart b/lib/barcode_scanner.dart similarity index 91% rename from lib/barcode_scan.dart rename to lib/barcode_scanner.dart index 58463be..f375363 100644 --- a/lib/barcode_scan.dart +++ b/lib/barcode_scanner.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/services.dart'; -class BarcodeScan { +class BarcodeScanner { static const MethodChannel _channel = const MethodChannel('com.apptreesoftware.barcode_scan'); static Future scan() async => await _channel.invokeMethod('scan');