mirror of
https://github.com/simplezhli/flutter_barcode_reader.git
synced 2024-11-22 21:49:20 +08:00
Add MIT license
This commit is contained in:
parent
576c947f0a
commit
3056ac5c24
22
LICENSE
22
LICENSE
@ -1 +1,21 @@
|
|||||||
TODO: Add your license here.
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2018 AppTree Software http://www.apptreesoftware.com
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
@ -1,24 +1,3 @@
|
|||||||
/*
|
|
||||||
* ************************************************************************
|
|
||||||
* *
|
|
||||||
* * AppTree Software Inc CONFIDENTIAL
|
|
||||||
* * __________________
|
|
||||||
* *
|
|
||||||
* * [2012] - [2016] AppTree Software Inc
|
|
||||||
* * All Rights Reserved.
|
|
||||||
* *
|
|
||||||
* * NOTICE: All information contained herein is, and remains
|
|
||||||
* * the property of AppTree Software Inc and its suppliers,
|
|
||||||
* * if any. The intellectual and technical concepts contained
|
|
||||||
* * herein are proprietary to AppTree Software Inc
|
|
||||||
* * and its suppliers and may be covered by U.S. and Foreign Patents,
|
|
||||||
* * patents in process, and are protected by trade secret or copyright law.
|
|
||||||
* * Dissemination of this information or reproduction of this material
|
|
||||||
* * is strictly forbidden unless prior written permission is obtained
|
|
||||||
* * from AppTree Software Inc.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.apptreesoftware.barcodescan
|
package com.apptreesoftware.barcodescan
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.yourcompany.barcodescan
|
||||||
|
|
||||||
|
import io.flutter.plugin.common.MethodChannel
|
||||||
|
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
|
||||||
|
import io.flutter.plugin.common.MethodChannel.Result
|
||||||
|
import io.flutter.plugin.common.MethodCall
|
||||||
|
import io.flutter.plugin.common.PluginRegistry.Registrar
|
||||||
|
|
||||||
|
class BarcodeScanPlugin(): MethodCallHandler {
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun registerWith(registrar: Registrar): Unit {
|
||||||
|
val channel = MethodChannel(registrar.messenger(), "barcode_scan")
|
||||||
|
channel.setMethodCallHandler(BarcodeScanPlugin())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onMethodCall(call: MethodCall, result: Result): Unit {
|
||||||
|
if (call.method.equals("getPlatformVersion")) {
|
||||||
|
result.success("Android ${android.os.Build.VERSION.RELEASE}")
|
||||||
|
} else {
|
||||||
|
result.notImplemented()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.yourcompany.barcodescanexample
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
|
||||||
|
import io.flutter.app.FlutterActivity
|
||||||
|
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||||
|
|
||||||
|
class MainActivity(): FlutterActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
GeneratedPluginRegistrant.registerWith(this)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user