Is there a way in flutter to switch the screen off when i click a button? - flutter

I am trying to create an app launcher with flutter but failing to implement the functionality of turning screen of on double tap.
is there any package that can help me

You could use the flutter_app_lock package but what I'd recommend using platform specific methods to send your request from your flutter app to the system platform.
And if you want there's a package for sending requests too. The package is called Pigeon and you can find more about sending requests to android or swift in this link: https://docs.flutter.dev/development/platform-integration/platform-channels?tab=type-mappings-swift-tab

Related

Is it possible to create a custom share sheet in Flutter?

I want to build this custom share sheet shown in the screenshot depending on the apps that are on the mobile, could anyone tell me if it's possible? screenshot
i am currently using flutter's share_plus package, but the share method summons the platform's share sheet, is it possible to customize my own share sheet and use it for both platforms android and ios?
Using the Flutter Availability package you can customize this by styling BottomSheet from scratch. Still, this package is only for Android devices. Unfortunately, iOS does not provide any API to get the installed APPs information.
I guess You'll have to work with a modalBottomSheet and https://pub.dev/packages/url_launcher
You can check if an application is installed, but this would work only for android Is there any way to identify that a particular application is installed in my android/ios device through flutter and dart?

How to make app in background like chat head of messenger in flutter

How to make app in background like chat head of messenger when user but it in background and click on this bubble to open the app again .
I'm trying to use floaty_head package but it doesn't work .
I am assuming that you are referring to the Android Bubbles API documented here. If that's the case, at the time of this writing I don't believe there are ready to use 3rd party packages on pub.dev that allow you to achieve this. Your best option at the moment is to write that code natively yourself and integrate it with your Flutter application using channels.

Flutter Detect Notification Tray Pulldown

I'm trying to implement a feature based on the background/foreground status of a Flutter app.
Does anyone know of a way to detect if the notification/system try on a device is pulled down over the app?
Thanks.
Welcome to SOF
You can detect this using special permission in Android (https://developer.android.com/reference/android/Manifest.permission#EXPAND_STATUS_BAR).
But you need native code to run in Flutter.
There is a similar (almost) package out there, you may fork it:
https://pub.dev/packages/notification_shade

Flutter: Launch my other application from flutter application and get some data back

Using flutter to launch other applications on both the platform (Android/iOS). I know we can use url_laucher to launch applications like Gmail or Google map.
Can it also be used for launching my own application?
If "YES", is it possible to get some data back from my other application to flutter application?
If "NO" then is there any other way to do this. My goal is to get the data (like a simple string) back from my other app.
NOTE: Constraint is that I have to use flutter Widgets or packages and not touch the native directories.
Yes, you can use url_launcher to launch your own application provided your application has appropriate url schemes defined.
No, you cannot get back any data by launching an application with url_launcher
Is there a way to achieve this only using flutter widgets and existing plugins?
Yes, only on android. There seems to be a flutter_share plugin that allows you to share data to other apps and receive data shared by other apps.
Hope that helps!

Is it possible to launch a third party app from my flutter app?

I am trying to launch a third-party app from my flutter but I’m not getting anywhere. In this case, I am trying to open the app “Amazon Alexa” by clicking on a raised button in Flutter. Can anyone help me out?
I tried to use url_launcher but it didn’t work out with third-party apps.
yes, some packages are available but the issue is, these are still in the early stages.
so for that, you need to move to the native side.