flutter_wifi_info_plugin
Kirk-Patrick/flutter_wifi_info_plugin open-source repository details.
- スター
- 10
- フォーク
- 18
- 最終プッシュ(UTC)
- 2022/03/30
- プロジェクト状態
- 公開中
元の README
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
wifi_info_plugin
Wifi info wrapper android plugin
Getting Started
This Plugin currently only supports android. IOS implementation to be release soon. Listed are all the supported getter methods to retrieve Network Information on your android device.
Below code exhibits usage of the plugin in a flutter application to retrieve Network info.
import 'package:flutter/services.dart';
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:wifi_info_plugin/wifi_info_plugin.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
WifiInfoWrapper _wifiObject;
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
WifiInfoWrapper wifiObject;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
wifiObject = await WifiInfoPlugin.wifiDetails;
}
on PlatformException{
}
if (!mounted) return;
setState(() {
_wifiObject = wifiObject;
});
}
@override
Widget build(BuildContext context) {
String ipAddress = _wifiObject!=null?_wifiObject.ipAddress.toString():"ip";
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on:'+ ipAddress),
),
),
);
}
}
Below are valid getters on the WifiWrapper Class at instantiation
- ipAddress
- routerIp
- dns1
- dns2
- bssId
- ssid
- macAddress
- linkSpeed
- signalStrength
- frequency
- networkId
- connectionType
- isHiddenSSid
To help support this package donations are welcome here
言語JavaDartSwiftRubyObjective-C
使用している依存関係
依存関係一覧 2 件
- flutter
{"sdk":"flutter"} - flutter_test開発用
{"sdk":"flutter"}
プロジェクトに合うリポジトリを選ぶには?
用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
- 名前・作者・説明で検索し、技術トピックで絞り込みます。
- スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
- 利用前に GitHub で README、ライセンス、Issues を確認します。
情報源と管理
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
