패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.0.1

wifi_configuration

Flutter Wifi 플러그인.

30일 다운로드
317
좋아요
25
Pub 점수
150

패키지 설치

flutter pub add wifi_configuration

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Android 장치에서 Wi-Fi 네트워크의 구성 및 관리를 가능하게 하는 플러터 플러그인입니다. 사용자는 프로그래밍 방식으로 Wi-Fi 네트워크에 연결하거나 해제하고, 사용 가능한 Wi-Fi 네트워크 목록을 확인할 수 있습니다. 네트워크 설정 유틸리티 또는 IoT 기기 구성 도구와 같이 디바이스의 Wi-Fi 설정과 직접 상호작용이 필요한 앱을 위해 설계되었습니다. 원격 Android API를 활용하여 신뢰할 수 있는 연결 제어를 제공합니다. 현재는 Android만 지원하며, iOS 구현은 없습니다.

사용 사례

  • IoT 장치용 Wi-Fi 구성
  • 네트워크 연결 자동화
  • 게스트 네트워크 설정
  • 키오스크에서 장치 연결 관리
  • 자기 서비스 네트워크 설정 활성화

주요 기능

  • Wi-Fi 네트워크에 연결
  • 사용 가능한 Wi-Fi 네트워크 목록 표시
  • Wi-Fi 연결 끊기
  • 안드로이드 전용 지원
  • 네트워크 관리를 위한 간단한 API

적합한 대상

  • 사물인터넷 장치 설정 앱
  • 키오스크 애플리케이션
  • 네트워크 자동화 도구
  • 엔터프라이즈 디바이스 관리
  • 모바일 구성 유틸리티

고려 사항

  • Android 플랫폼에 한정
  • 런타임 권한이 필요합니다
  • 연결을 위해 사용자 확인이 필요할 수 있습니다
  • iOS 지원 없음
  • 기기 제조업체의 구현에 따라 다릅니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

wifi_configuration

Connect a Flutter app to a Wi-Fi network, read the current SSID, and list available networks on Android and iOS.

This is a Dart 3 rewrite of wifi_configuration 1.2.1. The Dart API is the same (connectToWifi, getWifiList, isConnectedToWifi, connectedToWifi).

Install

dependencies:
  wifi_configuration: ^2.0.0

Usage

import 'package:wifi_configuration/wifi_configuration.dart';

final WifiConnectionStatus status = await WifiConfiguration.connectToWifi(
  'OfficeNet',
  'passphrase',
);

switch (status) {
  case WifiConnectionStatus.connected:
  case WifiConnectionStatus.alreadyConnected:
    break;
  case WifiConnectionStatus.locationNotAllowed:
    // Ask the user to enable location / grant permission.
    break;
  default:
    break;
}

final List<String> nearby = await WifiConfiguration.getWifiList();
final String current = await WifiConfiguration.connectedToWifi();
final bool matches = await WifiConfiguration.isConnectedToWifi('OfficeNet');

packageName from 1.x is still accepted as an optional third argument and is ignored on current Android/iOS.

Platform notes

Android

Add nothing extra in most apps — the plugin manifest already requests:

  • ACCESS_FINE_LOCATION / ACCESS_COARSE_LOCATION
  • NEARBY_WIFI_DEVICES (Android 13+)
  • Wi-Fi and network state permissions

Location must be on. On Android 10+ the OS shows a system dialog to join the network (WifiNetworkSpecifier). That join is app-scoped and may not appear as a saved system network.

iOS

In Xcode, enable:

  1. Hotspot Configuration
  2. Access Wi-Fi Information
  3. Link NetworkExtension.framework

And in Info.plist:

<key>NSLocationWhenInUseUsageDescription</key>
<string>Location is used to read the current Wi-Fi name and join a network.</string>

Apple does not allow scanning nearby Wi-Fi. getWifiList() returns SSIDs this app has configured, not every hotspot in range.

Status values

Value Meaning
connected Joined the requested SSID
alreadyConnected Already on that SSID
notConnected Join failed or was cancelled
platformNotSupported OS version cannot configure Wi-Fi
profileAlreadyInstalled iOS already has a profile for this SSID
locationNotAllowed Location permission or services denied

Example

See the example/ app for a small UI that lists networks, shows the current SSID, and connects with a passphrase.

카테고리

의존성

의존성 목록 1 개

  • plugin_platform_interface^2.0.2

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.