Comments (7)
can you tell me one more thing:
i have to register port before i start my foreground service, so I'm initializing my foreground service in my main app, to send data to overlay i had to register the receiver port in overlay class (am i right?)
i have one more question that is when i kill my app from the app list and then do anything which causes the condition to show overlay from foreground service the overlay is shown but the code inside the overlay class never runs which means the old overlay is shown so it doesn't matter if i send the data through port to the overlay.
for example :
depending upon the data shared to overlay through FlutterOverlayWindow.sharedata() function, different screen is shown and if no data is shared an error screen is shown . so if i run the app and show the overlay after sharing data the overlay is shown with specified screen but now if i kill the app and show overlay the previous overlay is shown instead of error overlay as no data is shared.
which conclude that if the app is killed and overlay is invoked through the foreground service it displays the old overlay , and the overlay class code is not executed.
@pragma("vm:entry-point ")
void overlayMain() {
runApp(ChangeNotifierProvider(
create: (BuildContext context) {
return TimerOverlayNotifier();
},
child: MaterialApp(
color: Colors.transparent,
theme:
ThemeData.from(colorScheme: lightColorScheme, useMaterial3: true),
darkTheme: ThemeData.from(
colorScheme: darkColorScheme,
useMaterial3: true,
),
themeMode: ThemeMode.system,
debugShowCheckedModeBanner: false,
home: const MyOverlayWindow()),//the code inside this never executed if the app is killed
));
}
is there any workaround to this.
from flutter_overlay_window.
check the example on how i share the data between two isolates
from flutter_overlay_window.
@X-SLAYER where????? : ( 😢
from flutter_overlay_window.
from flutter_overlay_window.
Thanks : )
but
@X-SLAYER If you go to the background, shareData returns null
HELP ME ㅠ^ㅠ
from flutter_overlay_window.
@X-SLAYER help me please ㅠ^ㅠ
ㅠ^ㅠ
ㅠ^ㅠ
from flutter_overlay_window.
yes use the ReceivePort instead of shareData like the example
from flutter_overlay_window.
Related Issues (20)
- Does it use Google Play services? HOT 1
- You can use the resize overlay and pass the enableDrag params HOT 2
- Could not run the example
- FlutterOverlayWindow.showOverlay(height: WindowSize.fullcover) wont work
- Listview scroll event conflicts with FlutterOverlayWindow drag, HOT 1
- Save overlay position
- Open the main app from floating window? HOT 5
- MissingPluginException HOT 1
- Open Overlay from background when app is kill state HOT 3
- Android 14 requirese foregroundServiceType HOT 1
- Crash in production HOT 4
- Does not display all objects
- I can't display my data on the overlay window. HOT 3
- warning red
- Back button not working! HOT 1
- Height doesn't account for status bar
- Use of `FlutterEngineGroup` instead of simply using `FlutterEngine` HOT 1
- Overlay stops sending messages to UI when it's turned on after previously being closed after app termination
- Unable to create multiple overlay window. HOT 4
- Please add more flags to show when phone is looked HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_overlay_window.