r/FlutterDev • u/[deleted] • Jul 10 '20
Community StackOverflow: Add support for Flutter code snippets
https://meta.stackoverflow.com/questions/399252/add-support-for-flutter-dart-code-snippets13
3
Jul 10 '20
It would be great but there are many many other way more popular frameworks and languages that they haven't added support for - Python, React, Typescript, etc. So I wouldn't hold your breath.
2
Jul 10 '20 edited Jul 10 '20
React/JSX and TypeScript are both supported with the Babel option.
Python/C etc. can't run in the end user's browser (would require compute resources), which is why they haven't been implemented. Adding DartPad support just requires swapping out an iframe.
A StackExchange engineer on this exact topic:
There are a large number of languages for which runnable snippets would be nice to illustrate problems/solutions quickly, but would have to be run on the backend.
2
Jul 10 '20
1
Jul 10 '20
Like I said, you can already use Typescript with the Babel option. You could always go make your own thread on the Python issue? Agreed that they could support it if they really wanted to.
1
u/dragneelfps Jul 10 '20
not sure how is this even gonna help much. most code i have seen are incomplete as answers, only focusing on the main part.
1
Jul 10 '20
most code i have seen are incomplete
This is how it would help. Enabling users to copy-paste their code would mean more complete, reproducible examples included in more questions.
It's genuinely just repetitive to constantly ask users to get their example working on DartPad when it could be natively available as an option.
2
8
u/[deleted] Jul 10 '20 edited Jul 10 '20
One of the DartPad maintainers responded: