type '() => Null' is not a subtype of type '(() => Widget)?' of 'orElse' code example Example: type '_Type' is not a subtype of type 'Widget' wrong: return Foo; right: return Foo();