@@ -78,6 +78,21 @@ A comprehensive Flutter package providing core utilities, base classes, and shar
7878 - Check current tracking status without prompting
7979 - Platform-safe: automatically returns ` true ` on non-iOS platforms
8080 - Integrated into ` MasterApp.runBefore() ` for easy initialization
81+ - ** NetworkInfoHelper** : Comprehensive network information helper
82+ - WiFi details: SSID, BSSID, IP, IPv6, submask, broadcast, gateway via ` network_info_plus `
83+ - Connectivity: connection type, connected status, WiFi/mobile checks via ` connectivity_plus `
84+ - Cloudflare Trace: public IP, country location, datacenter, TLS, HTTP, WARP via ` cloudflare.com/cdn-cgi/trace `
85+ - Public IP lookup via ipify API
86+ - DNS resolution via ` dart:io `
87+ - Host reachability check via TCP socket
88+ - Download speed estimation
89+ - Network interface listing
90+ - Platform-safe: all methods return safe defaults on web
91+ - ** NetworkInitFeature** : Enum-based network initialization for ` MasterApp.runBefore() `
92+ - ` cloudflareTrace ` - IP, location, datacenter persisted to local storage
93+ - ` publicIP ` - External IP persisted to local storage
94+ - ` connectivity ` - Connection type and status persisted to local storage
95+ - ` wifiInfo ` - WiFi details persisted to local storage
8196
8297### 📐 Layout System
8398- ** Grid** : Responsive grid layout system
@@ -99,7 +114,7 @@ Add this to your package's `pubspec.yaml` file:
99114
100115``` yaml
101116dependencies :
102- masterfabric_core : ^0.0.14
117+ masterfabric_core : ^0.0.15
103118` ` `
104119
105120Then run:
@@ -143,6 +158,10 @@ void main() async {
143158 assetConfigPath: 'assets/app_config.json',
144159 hydrated: true, // Enable state persistence
145160 requestTrackingTransparency: true, // Request iOS ATT authorization (iOS 14+)
161+ networkFeatures: {
162+ NetworkInitFeature.cloudflareTrace, // IP, location, datacenter
163+ NetworkInitFeature.connectivity, // WiFi/mobile/none status
164+ },
146165 );
147166
148167 // Create your router
@@ -277,7 +296,35 @@ The authorization result is automatically stored in `LocalStorageHelper` as `osm
277296
278297** Note** : The ATT dialog only appears on real iOS devices (iOS 14+). On simulators, it will return ` false ` by default. On Android and other platforms, the helper automatically returns ` true ` since ATT is iOS-only.
279298
280- ### 4c. Configure Force Update
299+ ### 4c. Network Features at Startup
300+
301+ Use ` NetworkInitFeature ` enum to pre-fetch and persist network data during initialization:
302+
303+ ``` dart
304+ await MasterApp.runBefore(
305+ assetConfigPath: 'assets/app_config.json',
306+ hydrated: true,
307+ networkFeatures: {
308+ NetworkInitFeature.cloudflareTrace, // IP, location, datacenter via Cloudflare
309+ NetworkInitFeature.publicIP, // External IP via ipify
310+ NetworkInitFeature.connectivity, // WiFi/mobile/none status
311+ NetworkInitFeature.wifiInfo, // WiFi SSID, IP, gateway
312+ },
313+ );
314+ ```
315+
316+ Each feature stores its result in ` LocalStorageHelper ` with ` osmea_ ` prefix keys:
317+
318+ | Feature | Storage Keys |
319+ | ---------| -------------|
320+ | ` cloudflareTrace ` | ` osmea_cf_ip ` , ` osmea_cf_location ` , ` osmea_cf_colo ` , ` osmea_cf_tls ` , ` osmea_cf_http ` , ` osmea_cf_warp ` |
321+ | ` publicIP ` | ` osmea_public_ip ` |
322+ | ` connectivity ` | ` osmea_connection_type ` , ` osmea_is_connected ` |
323+ | ` wifiInfo ` | ` osmea_wifi_name ` , ` osmea_wifi_ip ` , ` osmea_wifi_gateway ` |
324+
325+ ** Note** : Network features are platform-safe. On web, methods return safe defaults. WiFi details require platform permissions on some devices.
326+
327+ ### 4d. Configure Force Update
281328
282329Force update configuration in ` app_config.json ` :
283330
@@ -403,6 +450,40 @@ final TrackingStatus status = await AppTrackingTransparencyHelper.instance
403450
404451// Result is automatically stored in LocalStorageHelper when used via MasterApp.runBefore()
405452final storedResult = await LocalStorageHelper.getItem('osmea_tracking_authorized');
453+
454+ // Network Info Helper
455+ // Cloudflare Trace (IP, location, datacenter, TLS)
456+ final trace = await NetworkInfoHelper.instance.getCloudflareTrace();
457+ print('IP: ${trace?.ip}, Country: ${trace?.loc}, DC: ${trace?.colo}');
458+
459+ // WiFi information
460+ final wifi = await NetworkInfoHelper.instance.getAllWifiInfo();
461+ print('WiFi: ${wifi.wifiName}, IP: ${wifi.wifiIP}');
462+
463+ // Connectivity
464+ final connected = await NetworkInfoHelper.instance.isConnected();
465+ final type = await NetworkInfoHelper.instance.getConnectionType();
466+
467+ // Public IP
468+ final publicIP = await NetworkInfoHelper.instance.getPublicIP();
469+
470+ // DNS Lookup
471+ final ips = await NetworkInfoHelper.instance.dnsLookup('google.com');
472+
473+ // Host Reachability
474+ final result = await NetworkInfoHelper.instance.isHostReachable('google.com');
475+ print('Reachable: ${result.isReachable}, Latency: ${result.latencyMs}ms');
476+
477+ // Download Speed Estimation
478+ final speed = await NetworkInfoHelper.instance.estimateDownloadSpeed();
479+ print('Speed: ${speed.downloadSpeedMbps.toStringAsFixed(2)} Mbps');
480+
481+ // Network Interfaces
482+ final interfaces = await NetworkInfoHelper.instance.getNetworkInterfaces();
483+
484+ // Network features are persisted to local storage when using MasterApp.runBefore()
485+ final cfIP = await LocalStorageHelper.getItem('osmea_cf_ip');
486+ final cfLocation = await LocalStorageHelper.getItem('osmea_cf_location');
406487```
407488
408489## Package Structure
415496 │ ├── base_view_*.dart # Base view classes
416497 │ ├── master_view/ # Master view system
417498 │ └── widgets/ # Base widgets
418- ├── helper/ # Utility helpers
499+ ├── helper/ # Utility helpers (incl. NetworkInfoHelper, NetworkInitFeature)
419500 ├── views/ # Pre-built views
420501 ├── models/ # Data models
421502 ├── layout/ # Layout utilities
442523- ` slang: ^4.11.1 ` - Localization
443524- ` hive_ce: ^2.16.0 ` - High-performance NoSQL database (optional storage backend)
444525- ` flutter_svg: ^2.2.3 ` - SVG rendering support
526+ - ` network_info_plus: ^7.0.0 ` - WiFi network information
527+ - ` connectivity_plus: ^6.1.4 ` - Network connectivity status
445528
446529### See ` pubspec.yaml ` for complete dependency list
447530
@@ -455,7 +538,7 @@ For detailed documentation, see:
455538
456539- ** Pub.dev** : [ https://pub.dev/packages/masterfabric_core ] ( https://pub.dev/packages/masterfabric_core )
457540- ** GitHub** : [ https://github.com/gurkanfikretgunak/masterfabric_core ] ( https://github.com/gurkanfikretgunak/masterfabric_core )
458- - ** Version** : 0.0.14
541+ - ** Version** : 0.0.15
459542- ** License** : AGPL-3.0
460543
461544## Contributing
@@ -486,7 +569,7 @@ Or add it manually to your `pubspec.yaml`:
486569
487570``` yaml
488571dependencies :
489- masterfabric_core : ^0.0.14
572+ masterfabric_core : ^0.0.15
490573` ` `
491574
492575---
0 commit comments