Fixed dart-1.0 breaking changes. Replaced deprecated calls.