flutter_wifi_info_plugin
Kirk-Patrick/flutter_wifi_info_plugin open-source repository details.
- Estrelas
- 10
- Forks
- 18
- Último push (UTC)
- 30 de mar. de 2022
- Status do projeto
- Ativo
README original
Texto original em inglês. Visite o GitHub para a versão atual.
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
LinguagensJavaDartSwiftRubyObjective-C
Dependências usadas
Lista de dependências 2 itens
- flutter
{"sdk":"flutter"} - flutter_testDesenvolvimento
{"sdk":"flutter"}
Como escolher um repositório para seu projeto?
Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.
- Busque por nome, autor ou descrição e filtre por tema.
- Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
- Confira o README, a licença e as issues no GitHub antes de usar o projeto.
Fontes e manutenção
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
