Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

This repository stores all flutter/dart code samples to be used within Omega365 documentation site.

Notifications You must be signed in to change notification settings

Omega365/flutter-appframe-samples-public

Repository files navigation

FlutterSamples

This repository stores all flutter/dart code samples to be used within Omega365 documentation site.

Adding new samples

It's recommended to clone af.widgets.sampletemplate folder to use as a starting base for you sample.

  1. Create a folder for your sample and name it appropriately.
  2. 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."

Displaying your sample using DartPad

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.

About

This repository stores all flutter/dart code samples to be used within Omega365 documentation site.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages