Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit a346783

Browse files
[wifi_info_flutter] [wifi_info_flutter_platform_interface] Initial commit for wifi_info_flutter plugin and platform interface (#3129)
1 parent 65f7260 commit a346783

File tree

84 files changed

+1754
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1754
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 4513e96a3022d70aa7686906c2e9bdfbbc448334
8+
channel: master
9+
10+
project_type: plugin
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.0.1
2+
3+
* TODO: Describe initial release.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2020 The Chromium Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# wifi_info_flutter
2+
3+
A new flutter plugin project.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter
8+
[plug-in package](https://flutter.dev/developing-packages/),
9+
a specialized package that includes platform-specific implementation code for
10+
Android and/or iOS.
11+
12+
For help getting started with Flutter, view our
13+
[online documentation](https://flutter.dev/docs), which offers tutorials,
14+
samples, guidance on mobile development, and a full API reference.
15+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
group 'io.flutter.plugins.wifi_info_flutter'
2+
version '1.0'
3+
4+
buildscript {
5+
repositories {
6+
google()
7+
jcenter()
8+
}
9+
10+
dependencies {
11+
classpath 'com.android.tools.build:gradle:3.5.0'
12+
}
13+
}
14+
15+
rootProject.allprojects {
16+
repositories {
17+
google()
18+
jcenter()
19+
}
20+
}
21+
22+
apply plugin: 'com.android.library'
23+
24+
android {
25+
compileSdkVersion 29
26+
27+
defaultConfig {
28+
minSdkVersion 16
29+
}
30+
lintOptions {
31+
disable 'InvalidPackage'
32+
}
33+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
org.gradle.jvmargs=-Xmx1536M
2+
android.useAndroidX=true
3+
android.enableJetifier=true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
zipStoreBase=GRADLE_USER_HOME
4+
zipStorePath=wrapper/dists
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'wifi_info_flutter'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="io.flutter.plugins.wifi_info_flutter">
3+
</manifest>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package io.flutter.plugins.wifi_info_flutter;
2+
3+
import androidx.annotation.NonNull;
4+
import io.flutter.embedding.engine.plugins.FlutterPlugin;
5+
import io.flutter.plugin.common.MethodCall;
6+
import io.flutter.plugin.common.MethodChannel;
7+
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
8+
import io.flutter.plugin.common.MethodChannel.Result;
9+
10+
/** WifiInfoFlutterPlugin */
11+
public class WifiInfoFlutterPlugin implements FlutterPlugin, MethodCallHandler {
12+
/// The MethodChannel that will the communication between Flutter and native Android
13+
///
14+
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
15+
/// when the Flutter Engine is detached from the Activity
16+
private MethodChannel channel;
17+
18+
@Override
19+
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
20+
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "wifi_info_flutter");
21+
channel.setMethodCallHandler(this);
22+
}
23+
24+
@Override
25+
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
26+
if (call.method.equals("getPlatformVersion")) {
27+
result.success("Android " + android.os.Build.VERSION.RELEASE);
28+
} else {
29+
result.notImplemented();
30+
}
31+
}
32+
33+
@Override
34+
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
35+
channel.setMethodCallHandler(null);
36+
}
37+
}

0 commit comments

Comments
 (0)