Browse Source

Add MIT license

master
Matthew Smith 4 years ago
parent
commit
3056ac5c24
  1. 22
      LICENSE
  2. 21
      android/src/main/kotlin/com/apptreesoftware/barcodescan/BarcodeScannerActivity.kt
  3. 25
      android/src/main/kotlin/com/yourcompany/barcodescan/BarcodeScanPlugin.kt
  4. 13
      example/android/app/src/main/kotlin/com/yourcompany/barcodescanexample/MainActivity.kt

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.

21
android/src/main/kotlin/com/apptreesoftware/barcodescan/BarcodeScannerActivity.kt

@ -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
import android.Manifest

25
android/src/main/kotlin/com/yourcompany/barcodescan/BarcodeScanPlugin.kt

@ -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()
}
}
}

13
example/android/app/src/main/kotlin/com/yourcompany/barcodescanexample/MainActivity.kt

@ -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…
Cancel
Save