Update library

update to match newer dart version
update usage of const