Fix two problems: propagate hasPrefix in toDartType and make handlers non-static.