Use Copilot to draft a hard Flutter function

A developer had GitHub Copilot write a tricky Flutter function, then checked it with their own tests and harness.

Done with GitHub Copilot· Intermediate

What they did
The poster was stuck on a difficult Flutter app function and asked GitHub Copilot to draft it, with comments included. In the discussion, another developer described a repeatable process: they spell out the requirements, paste full code samples, and let Copilot, ChatGPT, or Claude produce the function. They then create the test case or harness themselves and use that to check the output.
How it went
The commenter said this workflow makes them roughly twice as productive and helps them finish features in about half the time. They also noted that the human still has to inspect the code, since the model can miss glue code or produce something that does not fit.
Tips
Treat the generated code as a draft, not a final answer. Always pause before you use it in anything irreversible, and verify it against your own tests or harness before shipping.

Try it yourself with GitHub Copilot

I’m working on a [Flutter/Dart] feature that should [describe the behavior clearly]. Use the requirements and code samples below to write the function and any helpful comments. Then draft a test harness that checks the main cases and edge cases, but stop and ask me before making any irreversible change such as submitting code, deleting files, or sending anything out.

Requirements:
[bullet list of requirements]

Code samples / surrounding code:
[paste relevant code]

Expected behavior for examples:
[describe inputs and outputs]

Before you proceed with anything irreversible, summarize the implementation plan and wait for my approval.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.