Closed TinhHuynh closed 1 year ago
Call FlPiP().enable()
to enable PiP,
class _State extends State<T> with WidgetsBindingObserver{
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state);
switch (state) {
case AppLifecycleState.inactive:
break;
case AppLifecycleState.paused:
/// app enters background
FlPiP().enable()
break;
case AppLifecycleState.resumed:
break;
case AppLifecycleState.detached:
break;
}
}
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
}
}
Thanks <3
Hi, thanks for the awesome library. I have a question: How to enable the PiP mode if the home button gets clicked?