-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyiOS applications specifically
Description
In #38464 we changed it to require a call to WidgetsFlutterBinding.ensureInitialized before your runApp if you want to access method channels. Unfortunately, this means that the native splash screen gets taken down too early and a black screen is shown. Repro-case:
import 'package:flutter/material.dart';
import 'dart:async';
void main() {
WidgetsFlutterBinding.ensureInitialized();
Timer(Duration(seconds: 10), () {
runApp(Placeholder());
});
}(Instead of running a timer, a real app may wait for data from the native side before calling runApp).
basketball-ico, BuusMuus, jcsena, tomgilder, sprymak and 25 more
Metadata
Metadata
Assignees
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyiOS applications specifically