File tree 1 file changed +18
-7
lines changed
packages/flutter/lib/src/material
1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -380,18 +380,26 @@ class _LicensePageState extends State<LicensePage> {
380
380
bool _loaded = false ;
381
381
382
382
Future <void > _initLicenses () async {
383
- final Flow flow = Flow .begin ();
384
- Timeline .timeSync ('_initLicenses()' , () { }, flow: flow);
383
+ int debugFlowId = - 1 ;
384
+ assert (() {
385
+ final Flow flow = Flow .begin ();
386
+ Timeline .timeSync ('_initLicenses()' , () { }, flow: flow);
387
+ debugFlowId = flow.id;
388
+ return true ;
389
+ }());
385
390
await for (LicenseEntry license in LicenseRegistry .licenses) {
386
- if (! mounted)
391
+ if (! mounted) {
387
392
return ;
388
- Timeline .timeSync ('_initLicenses()' , () { }, flow: Flow .step (flow.id));
393
+ }
394
+ assert (() {
395
+ Timeline .timeSync ('_initLicenses()' , () { }, flow: Flow .step (debugFlowId));
396
+ return true ;
397
+ }());
389
398
final List <LicenseParagraph > paragraphs =
390
399
await SchedulerBinding .instance.scheduleTask <List <LicenseParagraph >>(
391
- () => license.paragraphs.toList () ,
400
+ license.paragraphs.toList,
392
401
Priority .animation,
393
402
debugLabel: 'License' ,
394
- flow: flow,
395
403
);
396
404
setState (() {
397
405
_licenses.add (const Padding (
@@ -434,7 +442,10 @@ class _LicensePageState extends State<LicensePage> {
434
442
setState (() {
435
443
_loaded = true ;
436
444
});
437
- Timeline .timeSync ('Build scheduled' , () { }, flow: Flow .end (flow.id));
445
+ assert (() {
446
+ Timeline .timeSync ('Build scheduled' , () { }, flow: Flow .end (debugFlowId));
447
+ return true ;
448
+ }());
438
449
}
439
450
440
451
@override
You can’t perform that action at this time.
0 commit comments