[code maintenance] Add missing types in spark.dart.

Add missing types in spark.dart. The only untyped datatypes are `context` and `object`. Given we add type information to everything, adding `dynamic` everywhere for these may be just noise.

#1615 

@ussuri PTAL
This may not be necessary. Since the name is short, no harm in adding the type.