I can add the following script:flutter format to my CI yml file, and in the pipeline output I can see it finds files to format and does the formatting:
script:flutter format