This repository stores all flutter/dart code samples to be used within Omega365 documentation site.
It's recommended to clone af.widgets.sampletemplate folder to use as a starting base for you sample.
- Create a folder for your sample and name it appropriately.
- Add at least a main.dart file to your newly created folder. Below are all the files you can add:
- main.dart : The code to display — for example, a working or nonworking method.
- dartpad_metadata.yaml : a yaml metadata file with name, mode and files attributes described.
- test.dart (optional) : A main() function that tests the above code. Also contains any classes, functions, constants, etc. to be used by main.dart but not displayed.
- solution.dart (optional) : The ideal final state of main.dart, once the user has made all the changes you've asked them to make. The solution code is hidden until the user asks to see it.
- hint.txt (optional) : A text hint that the user can request to see, to help them complete the exercise. Examples: "Try X or Y," "Have you considered Z."
Use the snippet below, replace [YOUR_SAMPLE_PATH] with your sample directory path in the repository.
<iframe style="width:100%;height:800px;" src="https://dartpad.dev/embed-flutter.html?gh_owner=Omega365&gh_repo=appframe-flutter-samples-public&gh_path=[YOUR_SAMPLE_PATH]&split=60"></iframe>
- Optionally, you can append &run=true if you want your sample to be automatically ran when the web-page loads.