Reputation: 5319
Which is faster? with or without the types.
Design 1
home: Builder(
builder: (BuildContext context) {
return Home();
}
)
Design 2
home: Builder(
builder: (context) {
return Home();
}
)
Upvotes: 0
Views: 54
Reputation: 101
It's exactly the same at run time.
Dart uses type inference for method arguments. So even if you don't specify it in your "Design 2", the compiler knows that the context
argument is of type BuildContext
, based one the declaration of the Builder
constructor.
Upvotes: 2