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) {
|
||||
val messenger = flutterEngine!!.dartExecutor
|
||||
val engine = flutterEngine
|
||||
engine ?: throw Exception("Flutter engine is not initialized")
|
||||
|
||||
val messenger = engine.dartExecutor
|
||||
|
||||
// channels for analysis
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ class HomeWidgetProvider : AppWidgetProvider() {
|
|||
val messenger = flutterEngine!!.dartExecutor
|
||||
val channel = MethodChannel(messenger, WIDGET_DRAW_CHANNEL)
|
||||
try {
|
||||
val bytes = suspendCoroutine { cont ->
|
||||
val bytes = suspendCoroutine<Any?> { cont ->
|
||||
defaultScope.launch {
|
||||
FlutterUtils.runOnUiThread {
|
||||
channel.invokeMethod("drawWidget", hashMapOf(
|
||||
|
@ -194,7 +194,10 @@ class HomeWidgetProvider : AppWidgetProvider() {
|
|||
}
|
||||
|
||||
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
|
||||
// - 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 {
|
||||
setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
|
|
|
@ -235,9 +235,11 @@ class _BasicSectionState extends State<BasicSection> {
|
|||
|
||||
void _onScrollingChanged() {
|
||||
if (!widget.isScrollingNotifier.value) {
|
||||
// using `autofocus` while scrolling seems to fail for widget built offscreen
|
||||
// so we give focus to this page when the screen is no longer scrolling
|
||||
_chipFocusNode.children.firstOrNull?.requestFocus();
|
||||
if (settings.useTvLayout) {
|
||||
// using `autofocus` while scrolling seems to fail for widget built offscreen
|
||||
// so we give focus to this page when the screen is no longer scrolling
|
||||
_chipFocusNode.children.firstOrNull?.requestFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue