mobile_no_hint 0.0.1 copy "mobile_no_hint: ^0.0.1" to clipboard
mobile_no_hint: ^0.0.1 copied to clipboard

PlatformAndroid

The Phone Number Hint API by Google Play services shows user SIM-based phone numbers as hints seamlessly.

mobile_no_hint #

The mobile_no_hint Flutter package offers an easy method to retrieve phone number hints from a user's device using the Phone Number Hint API.

Please check the original doc as well https://developers.google.com/identity/phone-number-hint/android

Getting Started #

Import package #

import 'package:mobile_no_hint/mobile_no_hint.dart';

Call function in initState

@override  
void initState() {  
	super.initState(); 
	if (Platform.isAndroid) {  
	  MobileNoHint mobileNumber = MobileNoHint();  
	  WidgetsBinding.instance  
	  .addPostFrameCallback((timeStamp) => mobileNumber.mobileNumber());  
	  mobileNumber.getMobileNumberStream.listen((event) {  
	    if (event?.states == PhoneNumberStates.PhoneNumberSelected) {  
	      _mobileController.text = event!.phoneNumber!;  
	  }  
	  });  
	}
}  
2
likes
140
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

The Phone Number Hint API by Google Play services shows user SIM-based phone numbers as hints seamlessly.

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on mobile_no_hint

Packages that implement mobile_no_hint