minor
This commit is contained in:
parent
f07244c144
commit
f62c31a46b
4 changed files with 18 additions and 7 deletions
|
@ -79,7 +79,10 @@ class AnalysisService : Service() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initChannels(context: Context) {
|
private fun initChannels(context: Context) {
|
||||||
val messenger = flutterEngine!!.dartExecutor
|
val engine = flutterEngine
|
||||||
|
engine ?: throw Exception("Flutter engine is not initialized")
|
||||||
|
|
||||||
|
val messenger = engine.dartExecutor
|
||||||
|
|
||||||
// channels for analysis
|
// channels for analysis
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ class HomeWidgetProvider : AppWidgetProvider() {
|
||||||
val messenger = flutterEngine!!.dartExecutor
|
val messenger = flutterEngine!!.dartExecutor
|
||||||
val channel = MethodChannel(messenger, WIDGET_DRAW_CHANNEL)
|
val channel = MethodChannel(messenger, WIDGET_DRAW_CHANNEL)
|
||||||
try {
|
try {
|
||||||
val bytes = suspendCoroutine { cont ->
|
val bytes = suspendCoroutine<Any?> { cont ->
|
||||||
defaultScope.launch {
|
defaultScope.launch {
|
||||||
FlutterUtils.runOnUiThread {
|
FlutterUtils.runOnUiThread {
|
||||||
channel.invokeMethod("drawWidget", hashMapOf(
|
channel.invokeMethod("drawWidget", hashMapOf(
|
||||||
|
@ -194,7 +194,10 @@ class HomeWidgetProvider : AppWidgetProvider() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initChannels(context: Context) {
|
private fun initChannels(context: Context) {
|
||||||
val messenger = flutterEngine!!.dartExecutor
|
val engine = flutterEngine
|
||||||
|
engine ?: throw Exception("Flutter engine is not initialized")
|
||||||
|
|
||||||
|
val messenger = engine.dartExecutor
|
||||||
|
|
||||||
// dart -> platform -> dart
|
// dart -> platform -> dart
|
||||||
// - need Context
|
// - need Context
|
||||||
|
|
|
@ -72,7 +72,10 @@ class SearchSuggestionsProvider : ContentProvider() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val messenger = flutterEngine!!.dartExecutor
|
val engine = flutterEngine
|
||||||
|
engine ?: throw Exception("Flutter engine is not initialized")
|
||||||
|
|
||||||
|
val messenger = engine.dartExecutor
|
||||||
val backgroundChannel = MethodChannel(messenger, BACKGROUND_CHANNEL).apply {
|
val backgroundChannel = MethodChannel(messenger, BACKGROUND_CHANNEL).apply {
|
||||||
setMethodCallHandler { call, result ->
|
setMethodCallHandler { call, result ->
|
||||||
when (call.method) {
|
when (call.method) {
|
||||||
|
|
|
@ -235,9 +235,11 @@ class _BasicSectionState extends State<BasicSection> {
|
||||||
|
|
||||||
void _onScrollingChanged() {
|
void _onScrollingChanged() {
|
||||||
if (!widget.isScrollingNotifier.value) {
|
if (!widget.isScrollingNotifier.value) {
|
||||||
// using `autofocus` while scrolling seems to fail for widget built offscreen
|
if (settings.useTvLayout) {
|
||||||
// so we give focus to this page when the screen is no longer scrolling
|
// using `autofocus` while scrolling seems to fail for widget built offscreen
|
||||||
_chipFocusNode.children.firstOrNull?.requestFocus();
|
// so we give focus to this page when the screen is no longer scrolling
|
||||||
|
_chipFocusNode.children.firstOrNull?.requestFocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue