flutter_ip_adapter_info 1.0.1 copy "flutter_ip_adapter_info: ^1.0.1" to clipboard
flutter_ip_adapter_info: ^1.0.1 copied to clipboard

PlatformWindows

Gets information like macAddress or ipAddress from `IP_ADAPTER_INFO`

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flutter_ip_adapter_info/flutter_ip_adapter_info.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  List<IpAdapterInfo> adapterInfoList = [];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('flutter_ip_adapter_info example app'),
        ),
        body: ListView.builder(
          itemBuilder: (context, i) {
            return Card(
              child: Text(adapterInfoList[i].toString()),
            );
          },
          itemCount: adapterInfoList.length,
        ),
        floatingActionButton: FloatingActionButton(
          child: const Icon(Icons.refresh),
          onPressed: () async {
            final List<IpAdapterInfo> newAdapterInfoList =
                await FlutterIpAdapterInfo.getIpAdapterInfo();
            setState(
              () {
                adapterInfoList = newAdapterInfoList;
              },
            );
          },
        ),
      ),
    );
  }
}
1
likes
160
points
189
downloads

Publisher

verified publisherprepola.dev

Weekly Downloads

Gets information like macAddress or ipAddress from `IP_ADAPTER_INFO`

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_ip_adapter_info