How to implement sms retrieve api in flutter - flutter

I want my app to take OTP automatically, In android, we have the SMS retrieval API for that, so how to implement the same thing for IOS and android using flutter

Currently, there is no official Flutter plugin developed by the Flutter team for this. You have two options for this:
Use plugins created by the developer community. Try sms_retriever.
Write your own platform-specific code (e.g. your Android code in Java), and invoke it from Flutter. Read more about this here.

Related

How can I access device information without using packages in Flutter?

How can I access device information without using packages in Flutter? How can I get the information of the device where the app is installed in my Flutter app?
First, you'd be better off using packages. But if you really want/need to do it, you'd have to write platform-specific code code in the native language of the targeted platform (ie. Swift or Objective-C for iOS/Mac, Kotlin or Java for Android, etc), then use so-called platform channels to pass messages between your app and the platform-specific code.
If you'd like to get details about the device, on iOS you'd use UIDevice, on Android you'd typically want Build.
This can only be done through Method Channel

how work with contact ,camera, gps in flutter without using plugins

I'm trying to do CRUD on contacts and SMS using flutter, but after so much searching I feel flutter does not have any core options about contacts or SMS. there is nothing in the official documentation.
how work with contacts, camera, GPS in flutter without using plugins?
because the contact has a different implementation in android and IOS you need to have a code for each platform. in flutter its called Plugin or platform-specific code. and as I said there is no way to work with a contact without plugins cause its platform-specific code. if you don't want to use plugin You should write your own plugins for contact. and I think this is the hard way.
if you want to have your own plugin check Writing custom platform-specific code link

How to flutter web with phone auth using firebase plugin please define complete step for flutter web

I am using firebase plugin to authentication with email and password in flutter web. I am done with this one.
Now I want to authenticate flutter web with phone_auth. I am using the same plugin and in this plugin, a future method which is called signInWithPhoneNumber(String phoneNumer, ApplicationVarifier verifier). I follow the rule on the firebase for application verifier. There, I learn about ReCaptchaVarifier which verifies the user with reCaptcha technique. But there is no way to integrate reCaptcha in flutter web.
If you solved my problem then it will be great opportunity for me to getting my job. Thanks I am waiting for your response
Flutter for Web is currently in development, therefore firebase support isn't yet ready... It may come in the near future. Good luck with your project!
As at now Flutter Web is not yet ready for Production and it does not support these yet.
You should consider using other dart frameworks.
And No, you can not write HTML code for flutter web.

Setting Flutter project: iOS and Android languages

When I create a new Flutter project, it asks me to choose between Java/Kotlin for Android and Objective-c/Swift for iOS. But, what does this mean? Is it in case I want to write something for Android or iOS specifically?
Yes that is correct. In Flutter you have the option to call into platform-specific APIs. This is especially useful if you need to access functionality that is not available in Flutter directly (e.g. accessing the keychain on iOS or the keystore on Android).
To do so you can open up a message channel which bridges the Dart world with the platform-specific world. You can use this message channel to send a message from Dart to you platform-specific code. This platform-specific code is either Java/Kotlin for Android or Objective-C/Swift for iOS, depending on your selections during the creation of the project.
More detailed information can be found in the Flutter documentation here: https://flutter.dev/docs/development/platform-integration/platform-channels
Just a heads up, the Flutter team and the Flutter community already wrote a lot of OSS packages and plugins that will take care of the platform-specific stuff and offer you an easy Dart API. You can search for these packages in the Pub: https://pub.dev

Flutter - Android Native Platform Integration

When an external component such as a Camera or File picker is needed, the Flutter for Android Developers documentation (currently in the works) states that we would have to build a native platform integration.
I currently have a device that has a built-in barcode reader with a manufacturer-provided Android API. So, for that I would need to pursue this native platform integration method - or even for playing videos or using the camera for that matter I would think.
Is there an example repo that demonstrates how a well-integrated app should be? ..a project that integrated ExoPlayer for example?
You can use platform channels to call native APIs that aren't exposed by the Flutter platform.
There is an example in the Writing custom platform-specific code docs:
The full, runnable source-code for this example is available in /examples/platform_channel/ for Android with Java and iOS with Objective-C.
If you want to make your code reusable by others, you can publish it as a package, but this is optional. There is a repo of plugins maintained by the Flutter team that you can use for inspiration.