how to upgrade to new api flutter code example Example 1: update flutter flutter upgrade Example 2: flutter update $ flutter channel