├── example
├── hive
│ ├── app.lock
│ ├── data.lock
│ ├── form.hive
│ ├── form.lock
│ ├── log.lock
│ ├── post.hive
│ ├── post.lock
│ ├── stash.lock
│ ├── app.hive
│ ├── data.hive
│ ├── log.hive
│ └── stash.hive
├── assets
│ ├── audio
│ │ ├── beep.wav
│ │ ├── beep.mp3
│ │ └── weo.mp3
│ ├── applications
│ │ ├── example
│ │ │ ├── global.xml
│ │ │ ├── images
│ │ │ │ ├── fml-logo.png
│ │ │ │ ├── youtube.svg
│ │ │ │ ├── medium.svg
│ │ │ │ └── github.svg
│ │ │ ├── config.xml
│ │ │ └── templates
│ │ │ │ ├── counter_app.xml
│ │ │ │ └── main.xml
│ │ └── fmlpad
│ │ │ ├── images
│ │ │ ├── fml.png
│ │ │ └── fmlpad.png
│ │ │ └── config.xml
│ ├── images
│ │ ├── icon.png
│ │ ├── logo.png
│ │ ├── splash.gif
│ │ ├── icon-192.png
│ │ └── loading.gif
│ └── fonts
│ │ ├── custom_icons.ttf
│ │ └── custom_icons_readme.md
├── web
│ ├── local.js
│ ├── config.js
│ ├── config.xml
│ └── manifest.json
├── linux
│ ├── .gitignore
│ ├── main.cc
│ ├── flutter
│ │ ├── generated_plugin_registrant.h
│ │ ├── generated_plugins.cmake
│ │ └── generated_plugin_registrant.cc
│ └── my_application.h
├── ios
│ ├── Runner
│ │ ├── Runner-Bridging-Header.h
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── appstore.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── AppDelegate.swift
│ │ ├── AppDelegate.m
│ │ ├── GoogleService-Info.plist
│ │ ├── Runner.entitlements
│ │ └── Base.lproj
│ │ │ └── Main.storyboard
│ ├── Flutter
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── AppFrameworkInfo.plist
│ ├── Runner-Bridging-Header.h
│ ├── File.swift
│ ├── Runner.xcodeproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── RunnerTests
│ │ └── RunnerTests.swift
│ ├── .gitignore
│ └── Podfile
├── analysis_options.yaml
├── android
│ ├── gradle.properties
│ ├── RFIDAPI3Library
│ │ ├── build.gradle
│ │ └── API3_LIB-release-2.0.2.116.aar
│ ├── app
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── appdaddy.png
│ │ │ │ │ ├── goodyear.png
│ │ │ │ │ ├── ic_logo.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── rocketfunds.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── appdaddy.png
│ │ │ │ │ ├── goodyear.png
│ │ │ │ │ ├── ic_logo.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── rocketfunds.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_logo.png
│ │ │ │ │ ├── appdaddy.png
│ │ │ │ │ ├── goodyear.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── rocketfunds.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── appdaddy.png
│ │ │ │ │ ├── goodyear.png
│ │ │ │ │ ├── ic_logo.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── rocketfunds.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── appdaddy.png
│ │ │ │ │ ├── goodyear.png
│ │ │ │ │ ├── ic_logo.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── rocketfunds.png
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── java
│ │ │ │ └── dev
│ │ │ │ └── fml
│ │ │ │ └── MainActivity.java
│ │ └── google-services.json
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── .gitignore
│ ├── settings.gradle
│ └── build.gradle
├── applications
│ ├── example
│ │ ├── global.xml
│ │ ├── images
│ │ │ ├── fml-logo.png
│ │ │ ├── youtube.svg
│ │ │ ├── medium.svg
│ │ │ └── github.svg
│ │ ├── config.xml
│ │ └── templates
│ │ │ ├── counter_app.xml
│ │ │ └── main.xml
│ └── fmlpad
│ │ ├── images
│ │ ├── fml.png
│ │ └── fmlpad.png
│ │ └── config.xml
├── macos
│ ├── Runner
│ │ ├── Configs
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ ├── Warnings.xcconfig
│ │ │ └── AppInfo.xcconfig
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ ├── app_icon_64.png
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.swift
│ │ ├── Release.entitlements
│ │ ├── DebugProfile.entitlements
│ │ ├── MainFlutterWindow.swift
│ │ └── Info.plist
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner.xcodeproj
│ │ └── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── RunnerTests
│ │ └── RunnerTests.swift
│ └── Podfile
├── windows
│ ├── runner
│ │ ├── resources
│ │ │ └── app_icon.ico
│ │ ├── resource.h
│ │ ├── utils.h
│ │ ├── runner.exe.manifest
│ │ ├── flutter_window.h
│ │ ├── main.cpp
│ │ └── CMakeLists.txt
│ ├── .gitignore
│ └── flutter
│ │ ├── generated_plugin_registrant.h
│ │ ├── generated_plugins.cmake
│ │ └── generated_plugin_registrant.cc
├── .gitignore
├── pubspec.yaml
├── lib
│ └── main.dart
└── .metadata
├── scripts
├── convert.sh
└── readme.md
├── analysis_options.yaml
├── assets
└── fonts
│ ├── custom_icons.ttf
│ └── custom_icons_readme.md
├── lib
├── datasources
│ ├── transforms
│ │ ├── transform_interface.dart
│ │ ├── image
│ │ │ ├── grayscale.dart
│ │ │ └── flip.dart
│ │ ├── data
│ │ │ ├── format.dart
│ │ │ └── eval.dart
│ │ └── transform_model.dart
│ ├── nfc
│ │ ├── nfc_listener_interface.dart
│ │ └── payload.dart
│ ├── gps
│ │ └── gps_listener_interface.dart
│ ├── mqtt
│ │ ├── payload.dart
│ │ ├── mqtt_listener_interface.dart
│ │ └── mqtt_interface.dart
│ ├── socket
│ │ └── socket_listener_interface.dart
│ ├── sse
│ │ └── lib
│ │ │ └── src
│ │ │ ├── connect.dart
│ │ │ ├── connect.web.dart
│ │ │ ├── connect.mobile.dart
│ │ │ └── channel.dart
│ ├── datasource_listener_interface.dart
│ ├── detectors
│ │ ├── barcode
│ │ │ ├── barcode_detector.web.dart
│ │ │ └── barcode_detector.vm.dart
│ │ ├── detector_interface.dart
│ │ ├── text
│ │ │ ├── text_detector.stub.dart
│ │ │ ├── text_detector.web.dart
│ │ │ └── text_detector.dart
│ │ ├── biometrics
│ │ │ ├── biometrics_detector.stub.dart
│ │ │ ├── biometrics_detector.web.dart
│ │ │ ├── biometrics_detector.dart
│ │ │ ├── biometrics_detector.mobile.dart
│ │ │ └── biometrics_detector_model.dart
│ │ ├── rfid
│ │ │ └── rfid_detector.dart
│ │ └── image
│ │ │ └── detectable_image.web.dart
│ ├── file
│ │ ├── file.dart
│ │ ├── file.base.dart
│ │ └── file.mobile.dart
│ ├── data
│ │ └── model.dart
│ ├── camera
│ │ └── model.dart
│ ├── icons
│ │ └── icons_data_model.dart
│ ├── datasource_interface.dart
│ └── http
│ │ ├── post
│ │ └── model.dart
│ │ ├── patch
│ │ └── model.dart
│ │ ├── delete
│ │ └── model.dart
│ │ ├── get
│ │ └── model.dart
│ │ └── put
│ │ └── model.dart
├── widgets
│ ├── widget
│ │ └── model_interface.dart
│ ├── video
│ │ └── ivideo_player.dart
│ ├── plugin
│ │ ├── plugin_interface.dart
│ │ ├── plugin_view.dart
│ │ └── plugin_model.dart
│ ├── camera
│ │ └── stream
│ │ │ ├── stream.mobile.dart
│ │ │ └── stream.dart
│ ├── iframe
│ │ ├── inline_frame_view.dart
│ │ └── inline_frame_model.dart
│ ├── form
│ │ └── form_interface.dart
│ ├── scroller
│ │ ├── scroller_interface.dart
│ │ └── scroller_behavior.dart
│ ├── filepicker
│ │ └── filepicker_view.dart
│ ├── dragdrop
│ │ ├── drag_drop_interface.dart
│ │ └── droppable_view.dart
│ ├── box
│ │ ├── box_constraints.dart
│ │ ├── decoration
│ │ │ └── decoration_clipper.dart
│ │ ├── box_data.dart
│ │ └── box_layout.dart
│ ├── grid
│ │ └── item
│ │ │ └── grid_item_view.dart
│ ├── table
│ │ └── nodata_model.dart
│ ├── list
│ │ └── item
│ │ │ └── list_item_view.dart
│ ├── header
│ │ └── header_model.dart
│ ├── footer
│ │ └── footer_model.dart
│ ├── tabview
│ │ └── tab_view.dart
│ ├── theme
│ │ └── theme_view.dart
│ ├── measure
│ │ └── measure_view.dart
│ ├── center
│ │ └── center_model.dart
│ ├── tooltip
│ │ └── v2
│ │ │ └── src
│ │ │ ├── element_box.dart
│ │ │ └── tooltip_elements_display.dart
│ ├── row
│ │ └── row_model.dart
│ ├── padding
│ │ └── padding_view.dart
│ ├── window
│ │ └── window_manager_model.dart
│ ├── column
│ │ └── column_model.dart
│ ├── colorpicker
│ │ └── colorpicker_view.dart
│ ├── stack
│ │ └── stack_model.dart
│ ├── trigger
│ │ └── condition
│ │ │ └── trigger_condition_model.dart
│ ├── link
│ │ └── link_view.dart
│ ├── icon
│ │ └── icon_view.dart
│ └── drawer
│ │ └── item
│ │ └── drawer_item_model.dart
├── helpers
│ ├── helpers.dart
│ ├── bit.dart
│ └── mime.dart
├── connection
│ ├── connection.web.dart
│ └── connection.mobile.dart
├── observable
│ ├── observable_barrel.dart
│ └── observables
│ │ ├── string.dart
│ │ ├── color.dart
│ │ ├── integer.dart
│ │ ├── double.dart
│ │ ├── boolean.dart
│ │ └── icon.dart
├── navigation
│ └── parser.dart
├── application
│ └── application_view.dart
├── hive
│ ├── settings.dart
│ ├── stash.dart
│ └── data.dart
├── test
│ └── view.dart
├── store
│ └── store_model.dart
├── event
│ └── event.dart
├── token
│ └── token.dart
└── mirror
│ └── asset.dart
├── devtools_options.yaml
├── .metadata
├── ios
├── Runner
│ └── GeneratedPluginRegistrant.h
└── Flutter
│ ├── Generated.xcconfig
│ └── flutter_export_environment.sh
├── .gitignore
└── CHANGELOG.md
/example/hive/app.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/hive/data.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/hive/form.hive:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/hive/form.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/hive/log.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/hive/post.hive:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/hive/post.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/hive/stash.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/assets/audio/beep.wav:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/web/local.js:
--------------------------------------------------------------------------------
1 | // js local to a server
--------------------------------------------------------------------------------
/example/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/scripts/convert.sh:
--------------------------------------------------------------------------------
1 | pandoc -s -o Home.html wiki/Home.txt
2 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include:
2 | # Flutter linter
3 | package:flutter_lints/flutter.yaml
4 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include:
2 | # Flutter linter
3 | package:flutter_lints/flutter.yaml
4 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/applications/example/global.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/assets/applications/example/global.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/hive/app.hive:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/hive/app.hive
--------------------------------------------------------------------------------
/example/hive/data.hive:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/hive/data.hive
--------------------------------------------------------------------------------
/example/hive/log.hive:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/hive/log.hive
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/example/hive/stash.hive:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/hive/stash.hive
--------------------------------------------------------------------------------
/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/assets/fonts/custom_icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/assets/fonts/custom_icons.ttf
--------------------------------------------------------------------------------
/example/android/RFIDAPI3Library/build.gradle:
--------------------------------------------------------------------------------
1 | configurations.maybeCreate("default")
2 | artifacts.add("default", file('API3_LIB-release-2.0.2.116.aar'))
--------------------------------------------------------------------------------
/example/assets/audio/beep.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/audio/beep.mp3
--------------------------------------------------------------------------------
/example/assets/audio/weo.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/audio/weo.mp3
--------------------------------------------------------------------------------
/example/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/images/icon.png
--------------------------------------------------------------------------------
/example/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/images/logo.png
--------------------------------------------------------------------------------
/example/assets/images/splash.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/images/splash.gif
--------------------------------------------------------------------------------
/example/ios/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 |
--------------------------------------------------------------------------------
/example/assets/images/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/images/icon-192.png
--------------------------------------------------------------------------------
/example/assets/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/images/loading.gif
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/assets/fonts/custom_icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/fonts/custom_icons.ttf
--------------------------------------------------------------------------------
/example/applications/fmlpad/images/fml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/applications/fmlpad/images/fml.png
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/applications/fmlpad/images/fmlpad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/applications/fmlpad/images/fmlpad.png
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/example/applications/example/images/fml-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/applications/example/images/fml-logo.png
--------------------------------------------------------------------------------
/example/assets/applications/fmlpad/images/fml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/applications/fmlpad/images/fml.png
--------------------------------------------------------------------------------
/lib/datasources/transforms/transform_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:fml/data/data.dart';
2 |
3 | abstract class ITransform {
4 | bool? get enabled;
5 | Future apply(Data? data);
6 | }
--------------------------------------------------------------------------------
/example/assets/applications/fmlpad/images/fmlpad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/applications/fmlpad/images/fmlpad.png
--------------------------------------------------------------------------------
/example/assets/applications/example/images/fml-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/assets/applications/example/images/fml-logo.png
--------------------------------------------------------------------------------
/example/ios/File.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | // Runner
4 | //
5 | // Created by Brayden Flexman on 2020-07-23.
6 | // Needed to adopt Swift / Obj C hyrbid framework
7 |
8 | import Foundation
9 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/appdaddy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-hdpi/appdaddy.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/goodyear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-hdpi/goodyear.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_logo.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/appdaddy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-mdpi/appdaddy.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/goodyear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-mdpi/goodyear.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_logo.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_logo.png
--------------------------------------------------------------------------------
/lib/widgets/widget/model_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:fml/widgets/widget/model.dart';
2 |
3 | abstract class IModelListener {
4 | onModelChange(Model model, {String? property, dynamic value});
5 | }
6 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/dev/fml/MainActivity.java:
--------------------------------------------------------------------------------
1 | package co.appdaddy.fml;
2 |
3 | import io.flutter.embedding.android.FlutterActivity;
4 |
5 | public class MainActivity extends FlutterActivity {
6 | }
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/rocketfunds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-hdpi/rocketfunds.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/rocketfunds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-mdpi/rocketfunds.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/appdaddy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xhdpi/appdaddy.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/goodyear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xhdpi/goodyear.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/appdaddy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/appdaddy.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/goodyear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/goodyear.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_logo.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/appdaddy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/appdaddy.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/goodyear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/goodyear.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_logo.png
--------------------------------------------------------------------------------
/devtools_options.yaml:
--------------------------------------------------------------------------------
1 | description: This file stores settings for Dart & Flutter DevTools.
2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
3 | extensions:
4 |
--------------------------------------------------------------------------------
/example/android/RFIDAPI3Library/API3_LIB-release-2.0.2.116.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/RFIDAPI3Library/API3_LIB-release-2.0.2.116.aar
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/rocketfunds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xhdpi/rocketfunds.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/rocketfunds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/rocketfunds.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/rocketfunds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/rocketfunds.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/appstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/appstore.png
--------------------------------------------------------------------------------
/example/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/lib/datasources/nfc/nfc_listener_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'payload.dart';
3 |
4 | abstract class INfcListener {
5 | onMessage(Payload payload);
6 | }
7 |
--------------------------------------------------------------------------------
/lib/datasources/nfc/payload.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | class Payload {
3 | final String? id;
4 | final String? message;
5 | Payload({this.id, this.message});
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
3 | #include "Generated.xcconfig"
4 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/lib/datasources/gps/gps_listener_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'payload.dart';
3 |
4 | abstract class IGpsListener {
5 | onGpsData({Payload? payload});
6 | }
7 |
--------------------------------------------------------------------------------
/lib/datasources/mqtt/payload.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | class Payload {
3 | final String? topic;
4 | final String? message;
5 | Payload({this.topic, this.message});
6 | }
7 |
--------------------------------------------------------------------------------
/lib/widgets/video/ivideo_player.dart:
--------------------------------------------------------------------------------
1 | abstract class IVideoPlayer {
2 | Future start();
3 | Future stop();
4 | Future pause();
5 | Future seek(int seconds);
6 | Future play(String url);
7 | }
8 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AppDaddy-Software-Solutions-Inc/framework-markup-language/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/lib/widgets/plugin/plugin_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:fml/widgets/package/package_model.dart';
3 | abstract class IPlugin {
4 | PackageModel? get package;
5 | String? get plugin;
6 | Widget? build();
7 | }
8 |
--------------------------------------------------------------------------------
/lib/widgets/camera/stream/stream.mobile.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/widgets/camera/stream/stream.dart';
3 |
4 | View? getView(model) => null;
5 |
6 | class View implements StreamView {}
7 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
6 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/helpers/helpers.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | export 'image.dart';
3 | export 'string.dart';
4 | export 'uri.dart';
5 | export 'xml.dart';
6 | export 'json.dart';
7 | export 'map.dart';
8 | export 'color.dart';
9 | export 'template.dart';
--------------------------------------------------------------------------------
/lib/datasources/socket/socket_listener_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | abstract class ISocketListener {
3 | onMessage(String message);
4 | onConnected();
5 | onDisconnected(int? code, String? message);
6 | onError(String error);
7 | }
8 |
--------------------------------------------------------------------------------
/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/widgets/camera/stream/stream.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'stream.mobile.dart'
3 | if (dart.library.io) 'stream.mobile.dart'
4 | if (dart.library.html) 'stream.web.dart';
5 |
6 | abstract class StreamView {
7 | factory StreamView(model) => getView(model)!;
8 | }
9 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/web/config.js:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | let useHtmlRenderer = false;
3 | if (useHtmlRenderer) {
4 | console.log("Rendering with HTML");
5 | window.flutterWebRenderer = "html";
6 | } else {
7 | console.log("Rendering with CanvasKit");
8 | window.flutterWebRenderer = "canvaskit";
9 | }
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "appstore.png",
5 | "idiom" : "universal",
6 | "platform" : "ios",
7 | "size" : "1024x1024"
8 | }
9 | ],
10 | "info" : {
11 | "author" : "xcode",
12 | "version" : 1
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/scripts/readme.md:
--------------------------------------------------------------------------------
1 | Pandoc conversion:
2 |
3 | `pandoc -s -o home.html -t html https://github.com/AppDaddy-Software-Solutions-Inc/core-wiki/wiki`
4 |
5 | or
6 |
7 | `pandoc -s -o home.html home.md`
8 |
9 | or for all files in the current folder:
10 |
11 | `for /r "./" %i in (*.md) do pandoc -f markdown -t html "%~fi" -o "%~dpni.html"`
12 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/widgets/iframe/inline_frame_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'inline_frame_mobile_view.dart'
3 | if (dart.library.io) 'inline_frame_mobile_view.dart'
4 | if (dart.library.html) 'inline_frame_web_view.dart';
5 |
6 | abstract class View {
7 | factory View(model) => getView(model);
8 | }
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "ba393198430278b6595976de84fe170f553cc728"
8 | channel: "stable"
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/lib/datasources/sse/lib/src/connect.dart:
--------------------------------------------------------------------------------
1 | import 'channel.dart';
2 |
3 | /// Creates a new Server Sent Events connection.
4 | SseChannel connect(Uri url,
5 | {String? method,
6 | String? body,
7 | Map? headers,
8 | List? events}) {
9 | throw UnsupportedError('No implementation of the connect api provided');
10 | }
11 |
--------------------------------------------------------------------------------
/example/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example/macos/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import FlutterMacOS
2 | import Cocoa
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/lib/datasources/sse/lib/src/connect.web.dart:
--------------------------------------------------------------------------------
1 | import 'package:fml/datasources/sse/sse.web.dart';
2 | import 'channel.dart';
3 |
4 | SseChannel connect(Uri url,
5 | {String? method,
6 | String? body,
7 | Map? headers,
8 | List? events}) =>
9 | HtmlSseChannel.connect(url,
10 | method: method, body: body, headers: headers, events: events);
11 |
--------------------------------------------------------------------------------
/lib/datasources/sse/lib/src/connect.mobile.dart:
--------------------------------------------------------------------------------
1 | import 'package:fml/datasources/sse/sse.mobile.dart';
2 | import 'channel.dart';
3 |
4 | SseChannel connect(Uri url,
5 | {String? method,
6 | String? body,
7 | Map? headers,
8 | List? events}) =>
9 | IOSseChannel.connect(url,
10 | method: method, body: body, headers: headers, events: events);
11 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/lib/datasources/mqtt/mqtt_listener_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'payload.dart';
3 |
4 | abstract class IMqttListener {
5 | onMessage(Payload payload);
6 | onConnected();
7 | onDisconnected(String origin);
8 | onPublished(String topic, String message);
9 | onSubscribed(String topic);
10 | onUnsubscribed(String topic);
11 | onError(String error);
12 | }
13 |
--------------------------------------------------------------------------------
/lib/widgets/form/form_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:fml/observable/observables/boolean.dart';
2 |
3 | abstract class IForm {
4 | bool? get dirty;
5 | set dirty(bool? b);
6 | BooleanObservable? get dirtyObservable;
7 |
8 | // Default Post
9 | bool? get post;
10 |
11 | // Routines
12 | Future save();
13 | Future complete();
14 | Future validate();
15 | bool clean();
16 | bool clear();
17 | }
18 |
--------------------------------------------------------------------------------
/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/connection/connection.web.dart:
--------------------------------------------------------------------------------
1 | import 'package:universal_html/html.dart';
2 | import 'package:fml/log/manager.dart';
3 |
4 | class Internet {
5 | static Future isConnected() async {
6 | try {
7 | bool online = (window.navigator.onLine == true);
8 | return online;
9 | } catch (e) {
10 | Log().info("Error checking navigator online status. Error is $e");
11 | return false;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/datasources/datasource_listener_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import '../data/data.dart';
3 | import 'datasource_interface.dart';
4 |
5 | abstract class IDataSourceListener {
6 | Future onDataSourceSuccess(IDataSource source, Data? map);
7 | onDataSourceException(IDataSource source, Exception exception);
8 | onDataSourceBusy(IDataSource source, bool busy);
9 | }
10 |
--------------------------------------------------------------------------------
/lib/observable/observable_barrel.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | export 'observables/string.dart';
3 | export 'observables/color.dart';
4 | export 'observables/double.dart';
5 | export 'observables/integer.dart';
6 | export 'observables/boolean.dart';
7 | export 'observables/icon.dart';
8 | export 'observables/list.dart';
9 | export 'scope.dart';
10 | export 'binding.dart';
11 | export 'observable.dart';
12 |
--------------------------------------------------------------------------------
/lib/widgets/scroller/scroller_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | abstract class IScrollable {
3 |
4 | void scrollTo(String? id, String? value, {bool animate = true});
5 | void scroll(double? pixels, {bool animate = true});
6 |
7 | Offset? positionOf();
8 | Size? sizeOf();
9 | Axis directionOf();
10 |
11 | bool moreUp = false;
12 | bool moreDown = false;
13 | bool moreLeft = false;
14 | bool moreRight = false;
15 | }
16 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/barcode/barcode_detector.web.dart:
--------------------------------------------------------------------------------
1 | import 'package:fml/datasources/detectors/barcode/barcode_detector.dart';
2 | import 'package:fml/datasources/detectors/barcode/barcode_detector_zxing.dart' deferred as zxing;
3 |
4 | class BarcodeDetector {
5 | Future getDetector() async {
6 |
7 | // load library
8 | await zxing.loadLibrary();
9 |
10 | // return zebra crossing detector
11 | return zxing.BarcodeDetector();
12 | }
13 | }
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/ios/Runner/GeneratedPluginRegistrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GeneratedPluginRegistrant_h
8 | #define GeneratedPluginRegistrant_h
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface GeneratedPluginRegistrant : NSObject
15 | + (void)registerWithRegistry:(NSObject*)registry;
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 | #endif /* GeneratedPluginRegistrant_h */
20 |
--------------------------------------------------------------------------------
/lib/connection/connection.mobile.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'package:fml/log/manager.dart';
3 |
4 | class Internet {
5 | static Future isConnected() async {
6 | try {
7 | final address = await InternetAddress.lookup('google.com');
8 | if (address.isNotEmpty && address.first.rawAddress.isNotEmpty) {
9 | return true;
10 | }
11 | } catch (e) {
12 | Log().info("Error performing Internet lookup. Error is $e");
13 | }
14 | return false;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/assets/fonts/custom_icons_readme.md:
--------------------------------------------------------------------------------
1 | # Adding a Custom Icon
2 | 1. drag the config.json onto https://www.fluttericon.com/
3 | 2. then drag your new icon
4 | 3. when it appears click download
5 | 4. extract file
6 | 5. copy the config.json from the extracted file to here
7 | 6. copy the font inside the extracted fonts folder to this location and name it icons.ttf
8 | 7. Open the extracted my_flutter_app.dart file
9 | 8. Open graphics.dart and scroll to the bottom
10 | 9. Merge new icons from my_flutter_app.dart into graphics.dart
11 |
--------------------------------------------------------------------------------
/example/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/example/assets/fonts/custom_icons_readme.md:
--------------------------------------------------------------------------------
1 | # Adding a Custom Icon
2 | 1. drag the config.json onto https://www.fluttericon.com/
3 | 2. then drag your new icon
4 | 3. when it appears click download
5 | 4. extract file
6 | 5. copy the config.json from the extracted file to here
7 | 6. copy the font inside the extracted fonts folder to this location and name it icons.ttf
8 | 7. Open the extracted my_flutter_app.dart file
9 | 8. Open graphics.dart and scroll to the bottom
10 | 9. Merge new icons from my_flutter_app.dart into graphics.dart
11 |
--------------------------------------------------------------------------------
/lib/widgets/filepicker/filepicker_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/datasources/detectors/detector_interface.dart';
3 |
4 | import 'filepicker_view.vm.dart'
5 | if (dart.library.io) 'filepicker_view.vm.dart'
6 | if (dart.library.html) 'filepicker_view.web.dart';
7 |
8 | import 'package:fml/datasources/file/file.dart';
9 |
10 | abstract class FilePicker {
11 | factory FilePicker(String? accept) => create(accept: accept);
12 | Future launchPicker(List? detectors);
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 | #import "GeneratedPluginRegistrant.h"
3 | #import "GoogleMaps/GoogleMaps.h"
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application
8 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
9 | [GMSServices provideAPIKey:@"YOUR_KEY_HERE"];
10 | [GeneratedPluginRegistrant registerWithRegistry:self];
11 | // Override point for customization after application launch.
12 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
13 | }
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ios/Flutter/Generated.xcconfig:
--------------------------------------------------------------------------------
1 | // This is a generated file; do not edit or check into version control.
2 | FLUTTER_ROOT=C:\flutter
3 | FLUTTER_APPLICATION_PATH=C:\Users\jeff\Documents\Development\AppDaddy\framework-markup-language
4 | COCOAPODS_PARALLEL_CODE_SIGN=true
5 | FLUTTER_TARGET=lib\main.dart
6 | FLUTTER_BUILD_DIR=build
7 | FLUTTER_BUILD_NAME=3.3.4
8 | FLUTTER_BUILD_NUMBER=29
9 | EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
10 | EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
11 | DART_OBFUSCATION=false
12 | TRACK_WIDGET_CREATION=true
13 | TREE_SHAKE_ICONS=false
14 | PACKAGE_CONFIG=.dart_tool/package_config.json
15 |
--------------------------------------------------------------------------------
/lib/datasources/sse/lib/src/channel.dart:
--------------------------------------------------------------------------------
1 | import 'package:stream_channel/stream_channel.dart';
2 | import 'connect.dart'
3 | if (dart.library.html) 'connect.web.dart'
4 | if (dart.library.io) 'connect.mobile.dart' as platform;
5 |
6 | abstract class SseChannel extends StreamChannelMixin {
7 | factory SseChannel.connect(Uri url,
8 | {String? method,
9 | String? body,
10 | Map? headers,
11 | List? events}) =>
12 | platform.connect(url,
13 | method: method, body: body, headers: headers, events: events);
14 | close();
15 | }
16 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/detector_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'detector_model.dart';
3 |
4 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
5 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
6 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
7 |
8 | abstract class IDetectable {
9 | DetectorSources? get source;
10 | bool? get enabled;
11 | bool get busy;
12 | void detect(DetectableImage image, bool streamed);
13 | }
14 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | -
9 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/example/applications/example/images/youtube.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/assets/applications/example/images/youtube.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/applications/fmlpad/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/example/assets/applications/fmlpad/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=C:\flutter"
4 | export "FLUTTER_APPLICATION_PATH=C:\Users\jeff\Documents\Development\AppDaddy\framework-markup-language"
5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true"
6 | export "FLUTTER_TARGET=lib\main.dart"
7 | export "FLUTTER_BUILD_DIR=build"
8 | export "FLUTTER_BUILD_NAME=3.3.4"
9 | export "FLUTTER_BUILD_NUMBER=29"
10 | export "DART_OBFUSCATION=false"
11 | export "TRACK_WIDGET_CREATION=true"
12 | export "TREE_SHAKE_ICONS=false"
13 | export "PACKAGE_CONFIG=.dart_tool/package_config.json"
14 |
--------------------------------------------------------------------------------
/lib/datasources/file/file.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:typed_data';
3 |
4 | import 'file.mobile.dart'
5 | if (dart.library.io) 'file.mobile.dart'
6 | if (dart.library.html) 'file.web.dart';
7 |
8 | abstract class File {
9 | String? get url;
10 | String? get uri;
11 | String? get name;
12 | int? get size;
13 | String? get mimeType;
14 | Uint8List? get bytes;
15 |
16 | factory File(
17 | dynamic file, String url, String name, String mimeType, int size) =>
18 | create(file, url, name, mimeType, size);
19 | Future read({int? start, int? end});
20 | }
21 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/example/applications/example/images/medium.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = fml
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = dev.fml.fml
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2024 dev.fml. All rights reserved.
15 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/barcode/barcode_detector.vm.dart:
--------------------------------------------------------------------------------
1 | import 'package:fml/datasources/detectors/barcode/barcode_detector.dart';
2 | import 'package:fml/datasources/detectors/barcode/barcode_detector_mlkit.dart' as mlkit;
3 | import 'package:fml/datasources/detectors/barcode/barcode_detector_zxing.dart' as zxing;
4 |
5 | // platform
6 | import 'package:fml/platform/platform.vm.dart'
7 | if (dart.library.io) 'package:fml/platform/platform.vm.dart'
8 | if (dart.library.html) 'package:fml/platform/platform.web.dart';
9 |
10 |
11 | class BarcodeDetector {
12 | Future getDetector() async => isDesktop ? zxing.BarcodeDetector() : mlkit.BarcodeDetector();
13 | }
14 |
--------------------------------------------------------------------------------
/example/assets/applications/example/images/medium.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/widgets/dragdrop/drag_drop_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/rendering.dart';
2 | import 'package:fml/observable/observables/boolean.dart';
3 | import 'package:fml/observable/observables/string.dart';
4 |
5 | abstract class IDragDrop {
6 | String get id;
7 |
8 | set data(dynamic v);
9 | dynamic get data;
10 |
11 | set drop(dynamic v);
12 | dynamic get drop;
13 |
14 | StringObservable? onDropObservable;
15 | StringObservable? onDroppedObservable;
16 | StringObservable? onDragObservable;
17 | BooleanObservable? canDropObservable;
18 |
19 | bool willAccept(IDragDrop draggable);
20 | void onDrop(IDragDrop draggable, {Offset? dropSpot});
21 | void onDrag();
22 | }
23 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/lib/widgets/box/box_constraints.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class LocalBoxConstraints extends BoxConstraints {
4 | const LocalBoxConstraints({
5 | super.minWidth = 0.0,
6 | super.maxWidth = double.infinity,
7 | super.minHeight = 0.0,
8 | super.maxHeight = double.infinity,
9 | });
10 |
11 | static LocalBoxConstraints from(BoxConstraints constraints) =>
12 | LocalBoxConstraints(
13 | minWidth: constraints.minWidth,
14 | maxWidth: constraints.maxWidth,
15 | minHeight: constraints.minHeight,
16 | maxHeight: constraints.maxHeight);
17 |
18 | @override
19 | bool get isTight {
20 | return false;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/helpers/bit.dart:
--------------------------------------------------------------------------------
1 | // TODO
2 | import 'dart:math';
3 |
4 | int _setBit({required int bit, int? value, required bool on}) {
5 | int myValue = pow(2, bit - 1) as int;
6 | return on ? (value! | myValue) : (value! - (value & myValue));
7 | }
8 |
9 | // TODO
10 | bool isBitSet({int? bit, int? value}) {
11 | if (bit == null) return false;
12 | if (value == null) return false;
13 |
14 | int myValue = pow(2, bit - 1) as int;
15 | return ((value & myValue) == myValue);
16 | }
17 |
18 | // TODO
19 | int setBit({required int bit, int? value}) =>
20 | _setBit(bit: bit, value: value, on: true);
21 |
22 | // TODO
23 | int clearBit({required int bit, int? value}) =>
24 | _setBit(bit: bit, value: value, on: false);
25 |
--------------------------------------------------------------------------------
/lib/datasources/mqtt/mqtt_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'mqtt_listener_interface.dart';
3 | import 'mqtt.mobile.dart'
4 | if (dart.library.io) 'mqtt.mobile.dart'
5 | if (dart.library.html) 'mqtt.web.dart';
6 |
7 | abstract class IMqtt {
8 | static IMqtt? create(String url, IMqttListener listener,
9 | {String? username, String? password}) =>
10 | getMqtt(url, listener, username: username, password: password);
11 | Future connect();
12 | Future disconnect();
13 | Future publish(String topic, String msg);
14 | Future subscribe(String topic);
15 | Future unsubscribe(String topic);
16 | dispose();
17 | }
18 |
--------------------------------------------------------------------------------
/lib/widgets/grid/item/grid_item_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/viewable/viewable_view.dart';
4 | import 'package:fml/widgets/grid/item/grid_item_model.dart';
5 |
6 | class GridItemView extends StatefulWidget implements ViewableWidgetView {
7 | @override
8 | final GridItemModel model;
9 | GridItemView(this.model) : super(key: ObjectKey(model));
10 |
11 | @override
12 | State createState() => _GridItemViewState();
13 | }
14 |
15 | class _GridItemViewState extends ViewableWidgetState {
16 | @override
17 | Widget build(BuildContext context) => widget.model.getView();
18 | }
19 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/lib/widgets/table/nodata_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/box/box_model.dart';
4 | import 'package:fml/widgets/widget/model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/helpers/helpers.dart';
7 |
8 | class NoDataModel extends BoxModel {
9 | NoDataModel(Model super.parent, super.id);
10 |
11 | static NoDataModel? fromXml(Model parent, XmlElement xml) {
12 | NoDataModel? model;
13 | try {
14 | model = NoDataModel(parent, Xml.get(node: xml, tag: 'id'));
15 | model.deserialize(xml);
16 | } catch (e) {
17 | Log().exception(e, caller: 'NODATA');
18 | model = null;
19 | }
20 | return model;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/widgets/box/decoration/decoration_clipper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// A clipper that uses [Decoration.getClipPath] to clip.
4 | class DecorationClipper extends CustomClipper {
5 | DecorationClipper({
6 | TextDirection? textDirection,
7 | required this.decoration,
8 | }) : textDirection = textDirection ?? TextDirection.ltr;
9 |
10 | final TextDirection textDirection;
11 | final Decoration decoration;
12 |
13 | @override
14 | Path getClip(Size size) {
15 | return decoration.getClipPath(Offset.zero & size, textDirection);
16 | }
17 |
18 | @override
19 | bool shouldReclip(DecorationClipper oldClipper) {
20 | return oldClipper.decoration != decoration ||
21 | oldClipper.textDirection != textDirection;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/navigation/parser.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/navigation/page.dart';
4 |
5 | class RouteParser extends RouteInformationParser {
6 | const RouteParser() : super();
7 |
8 | @override
9 | Future parseRouteInformation(
10 | RouteInformation routeInformation) {
11 | PageConfiguration configuration =
12 | PageConfiguration(uri: Uri.tryParse(routeInformation.uri.toString()));
13 | return Future.value(configuration);
14 | }
15 |
16 | @override
17 | RouteInformation restoreRouteInformation(PageConfiguration configuration) {
18 | return RouteInformation(uri: Uri.tryParse(configuration.uri.toString()));
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/example/applications/example/images/github.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/observable/observables/string.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import '../observable.dart';
3 |
4 | class StringObservable extends Observable {
5 | StringObservable(super.name, super.value,
6 | {super.scope,
7 | super.listener,
8 | super.getter,
9 | super.setter,
10 | super.formatter,
11 | super.readonly,
12 | super.lazyEvaluation});
13 |
14 | @override
15 | String? get() {
16 | dynamic value = super.get();
17 | return (value is String) ? value : null;
18 | }
19 |
20 | @override
21 | dynamic to(dynamic value) {
22 | try {
23 | if (value == null) return null;
24 | if (value is String) return value;
25 | return value.toString();
26 | } catch (e) {
27 | return e;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/widgets/list/item/list_item_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/box/box_view.dart';
4 | import 'package:fml/widgets/viewable/viewable_view.dart';
5 | import 'package:fml/widgets/list/item/list_item_model.dart';
6 |
7 | class ListItemView extends StatefulWidget implements ViewableWidgetView {
8 | @override
9 | final ListItemModel model;
10 |
11 | ListItemView(this.model) : super(key: ObjectKey(model));
12 |
13 | @override
14 | State createState() => _ListItemViewState();
15 | }
16 |
17 | class _ListItemViewState extends ViewableWidgetState {
18 |
19 | @override
20 | Widget build(BuildContext context) => BoxView(widget.model, (_,__) => widget.model.inflate());
21 | }
22 |
--------------------------------------------------------------------------------
/example/assets/applications/example/images/github.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/text/text_detector.stub.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'text_detector.dart';
3 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
4 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
5 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
6 |
7 | TextDetector getDetector() => TextDetector();
8 |
9 | class TextDetector implements ITextDetector {
10 | static final TextDetector _singleton = TextDetector._initialize();
11 |
12 | factory TextDetector() {
13 | return _singleton;
14 | }
15 |
16 | TextDetector._initialize();
17 |
18 | @override
19 | Future detect(DetectableImage image) async {
20 | // not implemented
21 | return null;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/text/text_detector.web.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'text_detector.dart';
3 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
4 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
5 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
6 |
7 | TextDetector getDetector() => TextDetector();
8 |
9 | class TextDetector implements ITextDetector {
10 | static final TextDetector _singleton = TextDetector._initialize();
11 |
12 | factory TextDetector() {
13 | return _singleton;
14 | }
15 |
16 | TextDetector._initialize();
17 |
18 | @override
19 | Future detect(DetectableImage image) async {
20 | // not implemented
21 | return null;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/web/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/example/applications/example/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/example/applications/example/templates/counter_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/example/assets/applications/example/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/example/assets/applications/example/templates/counter_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/lib/observable/observables/color.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/helpers/string.dart';
4 | import 'package:fml/observable/observable.dart';
5 |
6 | class ColorObservable extends Observable {
7 | ColorObservable(super.name, super.value, {
8 | super.scope,
9 | super.listener,
10 | super.getter,
11 | super.setter,
12 | super.readonly});
13 |
14 | @override
15 | Color? get() => toColor(super.get());
16 |
17 | @override
18 | dynamic to(dynamic value) {
19 | try {
20 | if (value == null) return null;
21 | if (value is Color) return value;
22 | if (value is MaterialColor) return value;
23 | if (value is String) return toColor(value);
24 | return Exception();
25 | } catch (e) {
26 | return e;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | /pubspec.lock
27 | **/doc/api/
28 | .dart_tool/
29 | .flutter-plugins
30 | .flutter-plugins-dependencies
31 | build/
32 | example/android/keystore.properties
33 | /.flutter-plugins
34 | example/pubspec.lock
35 | /.flutter-plugins-dependencies
36 | pubspec.lock
37 | example/android/app/google-services.json
38 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/biometrics/biometrics_detector.stub.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'biometrics_detector.dart';
3 |
4 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
5 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
6 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
7 |
8 | BiometricsDetector getDetector() => BiometricsDetector();
9 |
10 | class BiometricsDetector implements IBiometricsDetector {
11 | static final BiometricsDetector _singleton = BiometricsDetector._initialize();
12 | BiometricsDetector._initialize();
13 |
14 | factory BiometricsDetector() => _singleton;
15 | @override
16 | Future detect(DetectableImage image) async {
17 | // not implemented
18 | return null;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleVersion
6 | 6.0
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleExecutable
10 | App
11 | CFBundleIdentifier
12 | io.flutter.flutter.app
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | App
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | MinimumOSVersion
24 | 13.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | audioplayers_linux
7 | printing
8 | url_launcher_linux
9 | )
10 |
11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
12 | )
13 |
14 | set(PLUGIN_BUNDLED_LIBRARIES)
15 |
16 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
21 | endforeach(plugin)
22 |
23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
26 | endforeach(ffi_plugin)
27 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/biometrics/biometrics_detector.web.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'biometrics_detector.dart';
3 |
4 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
5 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
6 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
7 |
8 | BiometricsDetector getDetector() => BiometricsDetector();
9 |
10 | class BiometricsDetector implements IBiometricsDetector {
11 | static final BiometricsDetector _singleton = BiometricsDetector._initialize();
12 |
13 | BiometricsDetector._initialize();
14 |
15 | factory BiometricsDetector() {
16 | return _singleton;
17 | }
18 |
19 | @override
20 | Future detect(DetectableImage image) async {
21 | // not implemented
22 | return null;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/widgets/header/header_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/box/box_model.dart';
4 | import 'package:fml/widgets/widget/model.dart';
5 | import 'package:xml/xml.dart';
6 |
7 | enum Animations { fade, none }
8 |
9 | class HeaderModel extends BoxModel {
10 | @override
11 | String? get layout => super.layout ?? "stack";
12 |
13 | @override
14 | double get height => super.height ?? maxHeight ?? minHeight ?? 100;
15 |
16 | HeaderModel(Model super.parent, super.id);
17 |
18 | static HeaderModel? fromXml(Model parent, XmlElement xml) {
19 | HeaderModel? model;
20 | try {
21 | model = HeaderModel(parent, null);
22 | model.deserialize(xml);
23 | } catch (e) {
24 | Log().exception(e, caller: 'header.Model');
25 | model = null;
26 | }
27 | return model;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/datasources/transforms/image/grayscale.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 | import 'package:fml/datasources/transforms/transform_interface.dart';
4 | import 'package:fml/datasources/transforms/image/image_transform_model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/widgets/widget/model.dart';
7 | import 'package:fml/helpers/helpers.dart';
8 |
9 | class Grayscale extends ImageTransformModel implements ITransform {
10 |
11 | Grayscale(Model parent, {String? id}) : super(parent, id);
12 |
13 | static Grayscale? fromXml(Model parent, XmlElement xml) {
14 | Grayscale model = Grayscale(parent, id: Xml.get(node: xml, tag: 'id'));
15 | model.deserialize(xml);
16 | return model;
17 | }
18 |
19 | @override
20 | apply(Data? data) async {
21 | if (enabled == false) return;
22 | if (data != null) await grayImage(data);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/example/ios/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | API_KEY
6 |
7 | GCM_SENDER_ID
8 | 1070564786024
9 | PLIST_VERSION
10 | 1
11 | BUNDLE_ID
12 | dev.fml
13 | PROJECT_ID
14 | flutter-markup-language
15 | STORAGE_BUCKET
16 | flutter-markup-language.appspot.com
17 | IS_ADS_ENABLED
18 |
19 | IS_ANALYTICS_ENABLED
20 |
21 | IS_APPINVITE_ENABLED
22 |
23 | IS_GCM_ENABLED
24 |
25 | IS_SIGNIN_ENABLED
26 |
27 | GOOGLE_APP_ID
28 | 1:1070564786024:ios:df820e7e85ad4c30fce0dd
29 |
30 |
31 |
--------------------------------------------------------------------------------
/lib/application/application_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:fml/application/application_manager.dart';
3 | import 'package:fml/navigation/navigation_manager.dart';
4 | import 'package:fml/navigation/parser.dart';
5 | import 'package:fml/system.dart';
6 | import 'package:fml/theme/theme.dart';
7 | import 'package:provider/provider.dart';
8 |
9 | class Application extends StatelessWidget {
10 | const Application({super.key});
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return MaterialApp.router(
15 | title: System.title,
16 | debugShowCheckedModeBanner: false,
17 | routerDelegate: NavigationManager(),
18 | routeInformationParser: const RouteParser(),
19 | backButtonDispatcher: RootBackButtonDispatcher(),
20 | theme: Provider.of(context).getTheme(),
21 | builder: (context, widget) => ApplicationManager(child: widget));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/datasources/data/model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/datasources/datasource_interface.dart';
3 | import 'package:fml/log/manager.dart';
4 | import 'package:fml/widgets/widget/model.dart';
5 | import 'package:fml/datasources/base/model.dart';
6 | import 'package:xml/xml.dart';
7 | import 'package:fml/helpers/helpers.dart';
8 |
9 | class DataModel extends DataSourceModel implements IDataSource {
10 | @override
11 | bool get autoexecute => super.autoexecute ?? true;
12 |
13 | DataModel(super.parent, super.id, {dynamic datastring});
14 |
15 | static DataModel? fromXml(Model parent, XmlElement xml) {
16 | DataModel? model;
17 | try {
18 | model = DataModel(parent, Xml.get(node: xml, tag: 'id'));
19 | model.deserialize(xml);
20 | } catch (e) {
21 | Log().exception(e, caller: 'data.Model');
22 | model = null;
23 | }
24 | return model;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/example/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/lib/observable/observables/integer.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import '../observable.dart';
3 |
4 | class IntegerObservable extends Observable {
5 | IntegerObservable(super.name, super.value,
6 | {super.scope,
7 | super.listener,
8 | super.getter,
9 | super.setter,
10 | super.readonly});
11 |
12 | @override
13 | int? get() {
14 | dynamic value = super.get();
15 | return (value is int) ? value : null;
16 | }
17 |
18 | @override
19 | dynamic to(dynamic value) {
20 | try {
21 | if (value == null) return null;
22 | if (value is int) return value;
23 | if (value is double) return value.toInt();
24 | if (value is num) return value.toInt();
25 | if (value is String) {
26 | if (value == '') return null;
27 | return int.parse(value);
28 | }
29 | return Exception();
30 | } catch (e) {
31 | return e;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/observable/observables/double.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import '../observable.dart';
3 |
4 | class DoubleObservable extends Observable {
5 | DoubleObservable(super.name, super.value, {
6 | super.scope,
7 | super.listener,
8 | super.getter,
9 | super.setter,
10 | super.readonly});
11 |
12 | @override
13 | double? get() {
14 | dynamic value = super.get();
15 | return (value is double) ? value : null;
16 | }
17 |
18 | @override
19 | dynamic to(dynamic value) {
20 | try {
21 | if (value == null) return null;
22 | if (value is double) return value;
23 | if (value is int) return value.toDouble();
24 | if (value is num) return value.toDouble();
25 | if (value is String) {
26 | if (value == '') return null;
27 | return double.parse(value);
28 | }
29 | return Exception();
30 | } catch (e) {
31 | return e;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/widgets/box/box_data.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/rendering.dart';
2 | import 'package:fml/widgets/positioned/positioned_model.dart';
3 | import 'package:fml/widgets/viewable/viewable_model.dart';
4 |
5 | enum FlexType { shrinking, fixed, expanding }
6 |
7 | /// Parent data for use with [BoxRenderer].
8 | class BoxData extends ContainerBoxParentData {
9 |
10 | ViewableMixin? model;
11 |
12 | Size? parentSize;
13 |
14 | int? flex;
15 | FlexFit? fit;
16 |
17 | int runIndex = 0;
18 |
19 | bool get isPositioned => model is PositionedModel;
20 |
21 | Position get position {
22 | PositionedModel? model = isPositioned ? this.model as PositionedModel : null;
23 | return Position(left: model?.left, right: model?.right, top: model?.top, bottom: model?.bottom);
24 | }
25 | }
26 |
27 | class Position {
28 |
29 | double? left;
30 | double? right;
31 | double? top;
32 | double? bottom;
33 |
34 | Position ({this.left, this.right, this.top, this.bottom});
35 | }
--------------------------------------------------------------------------------
/lib/widgets/footer/footer_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/box/box_model.dart';
4 | import 'package:fml/widgets/widget/model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/helpers/helpers.dart';
7 |
8 | class FooterModel extends BoxModel {
9 | @override
10 | String? get layout => super.layout ?? "stack";
11 |
12 | @override
13 | double get height => super.height ?? maxHeight ?? minHeight ?? 50;
14 |
15 | FooterModel(Model super.parent, super.id);
16 |
17 | static FooterModel? fromXml(Model parent, XmlElement xml) {
18 | FooterModel? model;
19 | try {
20 | // Build Model
21 | model = FooterModel(parent, Xml.get(node: xml, tag: 'id'));
22 | model.deserialize(xml);
23 | } catch (e) {
24 | Log().exception(e, caller: 'footer.Model');
25 | model = null;
26 | }
27 | return model;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/observable/observables/boolean.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import '../observable.dart';
3 |
4 | class BooleanObservable extends Observable {
5 | BooleanObservable(super.name, super.value, {
6 | super.scope,
7 | super.listener,
8 | super.getter,
9 | super.setter,
10 | super.readonly});
11 |
12 | @override
13 | bool? get() {
14 | dynamic value = super.get();
15 | return (value is bool) ? value : null;
16 | }
17 |
18 | @override
19 | dynamic to(dynamic value) {
20 | try {
21 | if (value == null) return null;
22 | if (value is bool) return value;
23 |
24 | var b = value.toString();
25 | b = b.trim().toLowerCase();
26 | if ((b == 'false') || (b == '0') || (b == 'no')) return false;
27 | if ((b == 'true') || (b == '1') || (b == 'yes')) return true;
28 | if (b == '') return null;
29 | return Exception();
30 | } catch (e) {
31 | return e;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/hive/settings.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/hive/database.dart';
3 |
4 | class Settings {
5 | static const String tableName = "SETTINGS";
6 |
7 | static final Settings _singleton = Settings._initialize();
8 | Settings._initialize();
9 |
10 | factory Settings() => _singleton;
11 |
12 | Future set(String key, dynamic value) async {
13 | Map map = {};
14 | map["value"] = value;
15 | return (await Database.insert(tableName, key, map) == null);
16 | }
17 |
18 | Future get(String key, {dynamic defaultValue}) async {
19 | Map? setting = await Database.find(tableName, key);
20 | if (setting != null && setting.containsKey("value")) {
21 | return setting["value"];
22 | } else {
23 | return defaultValue;
24 | }
25 | }
26 |
27 | Future delete(String key) async =>
28 | (await Database.delete(tableName, key) == null);
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | aps-environment
6 | development
7 | com.apple.developer.nfc.readersession.formats
8 |
9 | TAG
10 |
11 | com.apple.security.app-sandbox
12 |
13 | com.apple.security.device.audio-input
14 |
15 | com.apple.security.device.bluetooth
16 |
17 | com.apple.security.device.camera
18 |
19 | com.apple.security.network.client
20 |
21 | com.apple.security.personal-information.addressbook
22 |
23 | com.apple.security.personal-information.calendars
24 |
25 | com.apple.security.personal-information.location
26 |
27 | com.apple.security.personal-information.photos-library
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | audioplayers_windows
7 | camera_windows
8 | connectivity_plus
9 | firebase_auth
10 | firebase_core
11 | geolocator_windows
12 | printing
13 | url_launcher_windows
14 | video_player_win
15 | )
16 |
17 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
18 | )
19 |
20 | set(PLUGIN_BUNDLED_LIBRARIES)
21 |
22 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
24 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
26 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
27 | endforeach(plugin)
28 |
29 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
30 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
31 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
32 | endforeach(ffi_plugin)
33 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | void fl_register_plugins(FlPluginRegistry* registry) {
14 | g_autoptr(FlPluginRegistrar) audioplayers_linux_registrar =
15 | fl_plugin_registry_get_registrar_for_plugin(registry, "AudioplayersLinuxPlugin");
16 | audioplayers_linux_plugin_register_with_registrar(audioplayers_linux_registrar);
17 | g_autoptr(FlPluginRegistrar) printing_registrar =
18 | fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin");
19 | printing_plugin_register_with_registrar(printing_registrar);
20 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
21 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
22 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
23 | }
24 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Framework Markup Language",
3 | "short_name": "fml",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "Framework Markup Language",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: co.appdaddy.fml
2 | version: 3.3.4+29
3 | description: Framework Markup Language
4 | homepage: https://fml.dev
5 | repository: https://github.com/AppDaddy-Software-Solutions-Inc/Flutter-Markup-Language.git
6 |
7 | environment:
8 | sdk: '>=3.3.1 <4.0.0'
9 | flutter: '>=3.0.0'
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 | fml:
16 | path: ../
17 |
18 | dev_dependencies:
19 |
20 | # Dart linter
21 | lints: ^3.0.0
22 |
23 | # Flutter linter
24 | flutter_lints: ^3.0.0
25 |
26 | flutter:
27 | uses-material-design: true
28 |
29 | assets:
30 | - assets/
31 | - assets/images/
32 | - assets/audio/
33 | - assets/applications/
34 |
35 | - assets/applications/example/
36 | - assets/applications/example/images/
37 | - assets/applications/example/templates/
38 |
39 | - assets/applications/fmlpad/
40 | - assets/applications/fmlpad/images/
41 | - assets/applications/fmlpad/templates/
42 |
43 | fonts:
44 | - family: custom_icons
45 | fonts:
46 | - asset: assets/fonts/custom_icons.ttf
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/lib/datasources/camera/model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/datasources/file/model.dart';
3 | import 'package:fml/datasources/datasource_interface.dart';
4 | import 'package:fml/log/manager.dart';
5 | import 'package:fml/widgets/widget/model.dart';
6 | import 'package:xml/xml.dart';
7 | import 'package:fml/helpers/helpers.dart';
8 |
9 | class CameraImageModel extends FileModel implements IDataSource {
10 | CameraImageModel(super.parent, super.id);
11 |
12 | static CameraImageModel? fromXml(Model parent, XmlElement xml) {
13 | CameraImageModel? model;
14 | try {
15 | model = CameraImageModel(parent, Xml.get(node: xml, tag: 'id'));
16 | model.deserialize(xml);
17 | } catch (e) {
18 | Log().exception(e, caller: 'camera.Model');
19 | model = null;
20 | }
21 | return model;
22 | }
23 |
24 | /// Deserializes the FML template elements, attributes and children
25 | @override
26 | void deserialize(XmlElement xml) {
27 | // deserialize
28 | super.deserialize(xml);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/test/view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 |
4 | class TestWidget extends StatefulWidget {
5 | const TestWidget({super.key});
6 |
7 | @override
8 | TestWidgetState createState() => TestWidgetState();
9 | }
10 |
11 | class TestWidgetState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | body: Row(
16 | children: [
17 | Expanded(
18 | child: Row(
19 | children: [
20 | // Expanded(child:
21 | // Container(color: Colors.blue, child:
22 | Row(
23 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
24 | children: [
25 | Container(
26 | color: Colors.deepOrange,
27 | child: const Icon(Icons.airplanemode_active)),
28 | const Icon(Icons.airplanemode_inactive),
29 | ],
30 | ), //)//)
31 | ],
32 | ),
33 | )
34 | ],
35 | ));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | repositories {
14 | google()
15 | mavenCentral()
16 | gradlePluginPortal()
17 | }
18 | }
19 |
20 | plugins {
21 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22 | id "com.android.application" version "7.3.0" apply false
23 | // START: FlutterFire Configuration
24 | id "com.google.gms.google-services" version "4.3.15" apply false
25 | // END: FlutterFire Configuration
26 | id "org.jetbrains.kotlin.android" version "1.9.23" apply false
27 | }
28 |
29 | include ":app", ':RFIDAPI3Library'
30 | project(":RFIDAPI3Library").projectDir = file("./RFIDAPI3Library")
31 |
--------------------------------------------------------------------------------
/lib/datasources/transforms/data/format.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 | import 'package:fml/datasources/transforms/transform_interface.dart';
4 | import 'package:fml/datasources/transforms/transform_model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/widgets/widget/model.dart';
7 | import 'package:fml/helpers/helpers.dart';
8 |
9 | class Format extends TransformModel implements ITransform {
10 |
11 | final String? filter;
12 |
13 | Format(Model parent, {String? id, this.filter}) : super(parent, id);
14 |
15 | static Format? fromXml(Model parent, XmlElement xml) {
16 | Format model = Format(
17 | parent,
18 | id: Xml.get(node: xml, tag: 'id'),
19 | filter: Xml.get(node: xml, tag: 'filter'),
20 | );
21 | model.deserialize(xml);
22 | return model;
23 | }
24 |
25 | @override
26 | void deserialize(XmlElement xml) {
27 | // Deserialize
28 | super.deserialize(xml);
29 | }
30 |
31 | _format(Data? data) {}
32 |
33 | @override
34 | apply(Data? data) async {
35 | if (enabled == false) return;
36 | _format(data);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/widgets/tabview/tab_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/tabview/tab_model.dart';
4 | import 'package:fml/widgets/viewable/viewable_view.dart';
5 |
6 | class Tab extends StatefulWidget implements ViewableWidgetView {
7 |
8 | @override
9 | final TabModel model;
10 |
11 | Tab(this.model) : super(key: ObjectKey(model));
12 |
13 | @override
14 | State createState() => _TabState();
15 | }
16 |
17 | class _TabState extends ViewableWidgetState with TickerProviderStateMixin {
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 |
22 | // Check if widget is visible before wasting resources on building it
23 | if (!widget.model.visible) return const Offstage();
24 |
25 | // build the view
26 | Widget view = widget.model.getView();
27 |
28 | // add margins
29 | view = addMargins(view);
30 |
31 | // apply visual transforms
32 | view = applyTransforms(view);
33 |
34 | // apply user defined constraints
35 | view = applyConstraints(view, widget.model.constraints);
36 |
37 | return view;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "1088639803327",
4 | "project_id": "framework-markup-language",
5 | "storage_bucket": "framework-markup-language.firebasestorage.app"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:1088639803327:android:e49d5b5b02b3558d2f4b0a",
11 | "android_client_info": {
12 | "package_name": "co.appdaddy.fml"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "1088639803327-sr2cn1ab04la9bfn1db3gsanppgb072c.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyAxyJbFYZKEF1OAM2C9QdSX573GNGHSYO0"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "1088639803327-mbiba2amn3up6hqoq8vrfi4ac449f46u.apps.googleusercontent.com",
31 | "client_type": 3
32 | }
33 | ]
34 | }
35 | }
36 | }
37 | ],
38 | "configuration_version": "1"
39 | }
--------------------------------------------------------------------------------
/lib/datasources/icons/icons_data_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 | import 'package:fml/datasources/datasource_interface.dart';
4 | import 'package:fml/graphics.dart';
5 | import 'package:fml/widgets/widget/model.dart';
6 | import 'package:fml/datasources/base/model.dart';
7 | import 'package:xml/xml.dart';
8 | import 'package:fml/helpers/helpers.dart';
9 |
10 | class IconsDataModel extends DataSourceModel implements IDataSource {
11 |
12 | @override
13 | bool get autoexecute => true;
14 |
15 | IconsDataModel(super.parent, super.id, {dynamic datastring});
16 |
17 | static IconsDataModel? fromXml(Model parent, XmlElement xml) {
18 | IconsDataModel? model = IconsDataModel(parent, Xml.get(node: xml, tag: 'id'));
19 | model.deserialize(xml);
20 | var data = generate();
21 | model.onSuccess(data, code: 200, message: "Ok");
22 | return model;
23 | }
24 |
25 | static Data generate() {
26 | Data data = Data();
27 | for (var key in Graphics.icons.keys) {
28 | var row = {};
29 | row["icon"] = key;
30 | data.add(row);
31 | }
32 | return data;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:fml/fml.dart';
3 |
4 | void main() {
5 | runApp(const MyApp());
6 | }
7 |
8 | class MyApp extends StatelessWidget {
9 | const MyApp({super.key});
10 |
11 | // This widget is the root of your application.
12 | @override
13 | Widget build(BuildContext context) {
14 |
15 | //String example = 'https://fml.dev/#/templates/pricing.xml';
16 | //String example = 'https://test.appdaddy.co';
17 | //String example = 'http://10.69.4.245:81/';
18 | //String example = 'http://in4.pro';
19 | String example = 'https://jet.fml.dev';
20 | //String example = 'http://napapsweb.nap.goodyear.com:8081/';
21 | //String example = 'https://pad.fml.dev';
22 |
23 | var version = "3.3.1";
24 |
25 | // launch the FML engine
26 | return FmlEngine(
27 | ApplicationType.multi,
28 | domain: example,
29 | title: "Framework Markup Language V$version",
30 | version: version,
31 | color: Colors.lightBlue,
32 | brightness: Brightness.light,
33 | font: 'Roboto',
34 | transition: PageTransitions.platform)
35 | .launch();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/rfid/rfid_detector.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 |
3 | import 'package:fml/data/data.dart';
4 |
5 | class Tag {
6 | String? source;
7 | String? epc;
8 | int? antenna;
9 | int? rssi;
10 | int? distance;
11 | String? memoryBankData;
12 | String? lockData;
13 | int? size;
14 | String? seen;
15 | Map? parameters;
16 | }
17 |
18 | class Payload {
19 | final List tags = [];
20 | Payload({List? tags}) {
21 | if (tags != null) this.tags.addAll(tags);
22 | }
23 |
24 | static Data toData(Payload payload) {
25 | Data data = Data();
26 |
27 | // build the payload
28 | for (var tag in payload.tags) {
29 | Map map = {};
30 | map["source"] = tag.source;
31 | map["epc"] = tag.epc;
32 | map["antenna"] = tag.antenna;
33 | map["rssi"] = tag.rssi;
34 | map["distance"] = tag.distance;
35 | map["size"] = tag.size;
36 | map["data"] = tag.memoryBankData;
37 | map["lock"] = tag.lockData;
38 | map["seen"] = tag.seen;
39 | data.add(map);
40 | }
41 | return data;
42 | }
43 | }
--------------------------------------------------------------------------------
/lib/datasources/file/file.base.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:typed_data';
3 |
4 | import 'file.dart';
5 |
6 | class FileBase implements File {
7 | final dynamic file;
8 | @override
9 | final String url;
10 | @override
11 | final String name;
12 | @override
13 | final String? mimeType;
14 | @override
15 | final int size;
16 |
17 | UriData? _uri;
18 | @override
19 | Uint8List? get bytes {
20 | if (file is UriData) return (file as UriData).contentAsBytes();
21 | if (_uri == null) return null;
22 | return _uri!.contentAsBytes();
23 | }
24 |
25 | set bytes(Uint8List? value) {
26 | if (value != null) {
27 | _uri = UriData.fromBytes(value,
28 | mimeType: mimeType!,
29 | parameters: {'name': name, 'bytes': size.toString()});
30 | }
31 | }
32 |
33 | @override
34 | String? get uri {
35 | if (file is UriData) return (file as UriData).toString();
36 | if (_uri == null) return null;
37 | return _uri.toString();
38 | }
39 |
40 | FileBase(this.file, this.url, this.name, this.mimeType, this.size);
41 |
42 | @override
43 | Future read({int? start, int? end}) async => null;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/datasources/datasource_interface.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 | import 'datasource_listener_interface.dart';
4 | import 'package:fml/widgets/widget/model.dart';
5 | import 'package:fml/observable/observable_barrel.dart';
6 |
7 | abstract class IDataSource {
8 | String get id;
9 | Data? get data;
10 | bool get busy;
11 | bool initialized = false;
12 | bool? autoexecute;
13 |
14 | StringObservable? get bodyObservable;
15 | String? body;
16 | String? root;
17 | bool get custombody;
18 |
19 | Model? get parent;
20 |
21 | Future start();
22 | Future stop();
23 | Future clear({int? start, int? end});
24 | register(IDataSourceListener listener);
25 | remove(IDataSourceListener listener);
26 | Future onSuccess(Data data,
27 | {int? code, String? message, Observable? onSuccessOverride});
28 | notify();
29 | dispose();
30 |
31 | // move an item in the list
32 | Future move(dynamic from, dynamic to, {bool notifyListeners = true});
33 |
34 | // move an item in the list
35 | Future insert(String? jsonOrXml, int? index,
36 | {bool notifyListeners = true});
37 |
38 | // move an item in the list
39 | Future delete(int? index, {bool notifyListeners = true});
40 | }
41 |
--------------------------------------------------------------------------------
/lib/store/store_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:async';
3 | import 'package:fml/application/application_model.dart';
4 | import 'package:fml/system.dart';
5 | import 'package:fml/widgets/widget/model.dart';
6 |
7 | class StoreModel extends Model {
8 |
9 | bool initialized = false;
10 |
11 | static final StoreModel _singleton = StoreModel._initialize();
12 | factory StoreModel() => _singleton;
13 | StoreModel._initialize() : super(null, "STORE");
14 |
15 | Future addApp(ApplicationModel app) async {
16 | busy = true;
17 |
18 | // add the application
19 | bool ok = await System.addApplication(app);
20 |
21 | // notify
22 | if (!ok) System.toast('Failed to add the application');
23 |
24 | busy = false;
25 | }
26 |
27 | Future deleteApp(ApplicationModel app) async {
28 | busy = true;
29 |
30 | // delete the application
31 | bool ok = await System.deleteApplication(app);
32 |
33 | // notify
34 | if (!ok) System.toast('Failed to delete the application');
35 |
36 | busy = false;
37 | }
38 |
39 | ApplicationModel? findApp({String? url}) {
40 |
41 | // find app with matching url
42 | for (var app in System.apps)
43 | {
44 | if (app.url == url) return app;
45 | }
46 | return null;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/biometrics/biometrics_detector.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 |
4 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
5 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
6 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
7 |
8 | import 'biometrics_detector.stub.dart';
9 | //if (dart.library.io) 'biometrics_detector.mobile.dart'
10 | //if (dart.library.html) 'biometrics_detector.web.dart';
11 |
12 | class Biometric {
13 | int? smile;
14 | }
15 |
16 | class Payload {
17 | final List biometrics = [];
18 | Payload({List? biometrics}) {
19 | if (biometrics != null) this.biometrics.addAll(biometrics);
20 | }
21 |
22 | static Data toData(Payload payload) {
23 | Data data = Data();
24 | for (var biometric in payload.biometrics) {
25 | Map map = {};
26 | map["smile"] =
27 | (biometric.smile != null ? biometric.smile.toString() : '0');
28 | data.add(map);
29 | }
30 | return data;
31 | }
32 | }
33 |
34 | abstract class IBiometricsDetector {
35 | factory IBiometricsDetector() => getDetector();
36 | Future detect(DetectableImage image);
37 | }
38 |
--------------------------------------------------------------------------------
/lib/widgets/scroller/scroller_behavior.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ProperScrollBehavior extends MaterialScrollBehavior {
4 | /// Override to allow for horizontal scrolling in web -Flex
5 | @override
6 | Widget buildScrollbar(
7 | BuildContext context, Widget child, ScrollableDetails details) {
8 | switch (axisDirectionToAxis(details.direction)) {
9 | case Axis.horizontal:
10 | switch (getPlatform(context)) {
11 | case TargetPlatform.linux:
12 | case TargetPlatform.macOS:
13 | case TargetPlatform.windows:
14 | return Scrollbar(
15 | controller: details.controller,
16 | child: child,
17 | );
18 | case TargetPlatform.android:
19 | case TargetPlatform.fuchsia:
20 | case TargetPlatform.iOS:
21 | return child;
22 | }
23 | case Axis.vertical:
24 | switch (getPlatform(context)) {
25 | case TargetPlatform.linux:
26 | case TargetPlatform.macOS:
27 | case TargetPlatform.windows:
28 | return Scrollbar(
29 | controller: details.controller,
30 | child: child,
31 | );
32 | case TargetPlatform.android:
33 | case TargetPlatform.fuchsia:
34 | case TargetPlatform.iOS:
35 | return child;
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/widgets/theme/theme_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/viewable/viewable_view.dart';
4 | import 'package:fml/widgets/theme/theme_model.dart';
5 | import 'package:fml/theme/theme.dart';
6 |
7 | class ThemeView extends StatefulWidget implements ViewableWidgetView {
8 | @override
9 | final ThemeModel model;
10 | final List children = [];
11 |
12 | ThemeView(this.model) : super(key: ObjectKey(model));
13 |
14 | @override
15 | State createState() => _ThemeViewState();
16 | }
17 |
18 | class _ThemeViewState extends ViewableWidgetState {
19 | @override
20 | Widget build(BuildContext context) {
21 | // Check if widget is visible before wasting resources on building it
22 | if (!widget.model.visible) return const Offstage();
23 |
24 | // build children
25 | widget.children.clear();
26 | widget.children.addAll(widget.model.inflate());
27 | if (widget.children.isEmpty) widget.children.add(Container());
28 |
29 | var m = widget.model;
30 | ThemeData themeData =
31 | ThemeNotifier.fromTheme(Theme.of(context).colorScheme, m);
32 |
33 | // theme
34 | return Theme(
35 | data: themeData,
36 | child: widget.children.length == 1
37 | ? widget.children[0]
38 | : Stack(children: widget.children));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/example/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.Create(L"fml", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/widgets/measure/measure_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/rendering.dart';
4 |
5 | typedef OnWidgetSizeChange = void Function(Size size, {dynamic data});
6 |
7 | class MeasureObject extends RenderProxyBox {
8 | Size? oldSize;
9 |
10 | final OnWidgetSizeChange onChange;
11 | final dynamic data;
12 |
13 | MeasureObject(this.onChange, {this.data});
14 |
15 | @override
16 | void performLayout() {
17 | Size size = const Size(0, 0);
18 | if (child != null) {
19 | child!.layout(constraints, parentUsesSize: true);
20 | size = child!.size;
21 | }
22 | this.size = constraints.smallest;
23 |
24 | if (oldSize == size) return;
25 | oldSize = size;
26 | WidgetsBinding.instance.addPostFrameCallback((_) {
27 | onChange(size, data: data);
28 | });
29 | }
30 |
31 | @override
32 | void paint(PaintingContext context, Offset offset) {
33 | // do nothing
34 | return;
35 | }
36 | }
37 |
38 | class MeasureView extends SingleChildRenderObjectWidget {
39 | final OnWidgetSizeChange onChange;
40 | final dynamic data;
41 |
42 | const MeasureView(Widget widget, this.onChange, {super.key, this.data})
43 | : super(child: widget);
44 |
45 | @override
46 | RenderObject createRenderObject(BuildContext context) {
47 | return MeasureObject(onChange, data: data);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/widgets/dragdrop/droppable_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/dragdrop/drag_drop_interface.dart';
4 | import 'package:fml/widgets/viewable/viewable_model.dart';
5 | import 'package:fml/widgets/viewable/viewable_view.dart';
6 |
7 | class DroppableView extends StatefulWidget implements ViewableWidgetView {
8 | @override
9 | final ViewableMixin model;
10 | final Widget view;
11 |
12 | DroppableView(this.model, this.view) : super(key: ObjectKey(model));
13 |
14 | @override
15 | State createState() => _DroppableViewState();
16 | }
17 |
18 | class _DroppableViewState extends ViewableWidgetState {
19 | @override
20 | Widget build(BuildContext context) {
21 | // Check if widget is visible before wasting resources on building it
22 | if (!widget.model.visible) return const Offstage();
23 |
24 | return DragTarget(
25 | onWillAcceptWithDetails: onWillAccept,
26 | onAcceptWithDetails: onAccept,
27 | builder: onBuild);
28 | }
29 |
30 | bool onWillAccept(DragTargetDetails details) =>
31 | widget.model.willAccept(details.data);
32 |
33 | void onAccept(DragTargetDetails details) =>
34 | widget.model.onDrop(details.data, dropSpot: details.offset);
35 |
36 | Widget onBuild(context, List cd, List rd) => widget.view;
37 | }
38 |
--------------------------------------------------------------------------------
/example/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import audioplayers_darwin
9 | import connectivity_plus
10 | import firebase_auth
11 | import firebase_core
12 | import geolocator_apple
13 | import path_provider_foundation
14 | import printing
15 | import url_launcher_macos
16 | import video_player_avfoundation
17 | import webview_flutter_wkwebview
18 |
19 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
20 | AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
21 | ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
22 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
23 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
24 | GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
25 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
26 | PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin"))
27 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
28 | FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
29 | FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin"))
30 | }
31 |
--------------------------------------------------------------------------------
/lib/widgets/center/center_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/box/box_model.dart';
4 | import 'package:fml/widgets/box/box_view.dart';
5 | import 'package:fml/widgets/reactive/reactive_view.dart';
6 | import 'package:fml/widgets/widget/model.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:xml/xml.dart';
9 | import 'package:fml/helpers/helpers.dart';
10 |
11 | /// Center [CenterModel]
12 | ///
13 | /// DEPRECATED
14 | /// Defines the properties used to build a centered [CENTER.CenterView]
15 | class CenterModel extends BoxModel {
16 | @override
17 | bool get expand => true;
18 |
19 | @override
20 | String? get layout => "column";
21 |
22 | @override
23 | bool get center => true;
24 |
25 | CenterModel(Model super.parent, super.id,
26 | {dynamic flex}); // ; {key: value}
27 |
28 | static CenterModel? fromXml(Model parent, XmlElement xml,
29 | {String? type}) {
30 | CenterModel? model;
31 | try {
32 | model = CenterModel(parent, Xml.get(node: xml, tag: 'id'));
33 | model.deserialize(xml);
34 | } catch (e) {
35 | Log().debug(e.toString());
36 | model = null;
37 | }
38 | return model;
39 | }
40 |
41 | @override
42 | Widget getView({Key? key}) {
43 | var view = BoxView(this, (_,__) => inflate());
44 | return isReactive ? ReactiveView(this, view) : view;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/widgets/tooltip/v2/src/element_box.dart:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2022 Marcelo Gil
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | class ElementBox {
24 | final double w;
25 | final double h;
26 | final double x;
27 | final double y;
28 |
29 | ElementBox({
30 | required this.w,
31 | required this.h,
32 | this.x = 0.0,
33 | this.y = 0.0,
34 | });
35 | }
36 |
--------------------------------------------------------------------------------
/lib/datasources/transforms/transform_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/widget/model.dart';
4 | import 'package:xml/xml.dart';
5 | import 'package:fml/observable/observable_barrel.dart';
6 | import 'package:fml/helpers/helpers.dart';
7 |
8 | class TransformModel extends Model {
9 |
10 | /// enabled
11 | BooleanObservable? _enabled;
12 | set enabled(dynamic v) {
13 | if (_enabled != null) {
14 | _enabled!.set(v);
15 | } else if (v != null) {
16 | _enabled = BooleanObservable(Binding.toKey(id, 'enabled'), v,
17 | scope: scope, listener: onPropertyChange);
18 | }
19 | }
20 | bool get enabled => _enabled?.get() ?? true;
21 |
22 | TransformModel(super.parent, super.id);
23 |
24 | static TransformModel? fromXml(Model parent, XmlElement xml) {
25 | TransformModel? model;
26 | try {
27 | model = TransformModel(parent, Xml.get(node: xml, tag: 'id'));
28 | model.deserialize(xml);
29 | } catch (e) {
30 | Log().exception(e, caller: 'transform_model');
31 | model = null;
32 | }
33 | return model;
34 | }
35 |
36 | /// Deserializes the FML template elements, attributes and children
37 | @override
38 | void deserialize(XmlElement xml) {
39 |
40 | // deserialize
41 | super.deserialize(xml);
42 |
43 | // properties
44 | enabled = Xml.get(node: xml, tag: 'enabled');
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/widgets/row/row_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/observable/scope.dart';
4 | import 'package:fml/widgets/box/box_model.dart';
5 | import 'package:fml/widgets/widget/model.dart';
6 | import 'package:xml/xml.dart';
7 | import 'package:fml/helpers/helpers.dart';
8 |
9 | class RowModel extends BoxModel {
10 | @override
11 | LayoutType layoutType = LayoutType.row;
12 |
13 | @override
14 | String? get layout => "row";
15 |
16 | // indicates if the widget will grow in
17 | // its vertical axis
18 | @override
19 | bool get expandVertically {
20 | if (!super.expandVertically) return false;
21 | bool flexible = false;
22 | for (var child in viewableChildren) {
23 | if (child.visible && child.expandVertically) {
24 | flexible = true;
25 | break;
26 | }
27 | }
28 | return flexible;
29 | }
30 |
31 | RowModel(Model super.parent, super.id, {super.scope, super.data});
32 |
33 | static RowModel? fromXml(Model parent, XmlElement xml,
34 | {Scope? scope, dynamic data}) {
35 | RowModel? model;
36 | try {
37 | // build model
38 | model = RowModel(parent, Xml.get(node: xml, tag: 'id'),
39 | scope: scope, data: data);
40 | model.deserialize(xml);
41 | } catch (e) {
42 | Log().exception(e, caller: 'row.Model');
43 | model = null;
44 | }
45 | return model;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/widgets/padding/padding_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:math';
3 | import 'package:flutter/material.dart';
4 | import 'package:fml/widgets/box/box_view.dart';
5 | import 'package:fml/widgets/viewable/viewable_view.dart';
6 | import 'padding_model.dart';
7 |
8 | class PaddingView extends StatefulWidget implements ViewableWidgetView {
9 | @override
10 | final PaddingModel model;
11 |
12 | PaddingView(this.model) : super(key: ObjectKey(model));
13 |
14 | @override
15 | State createState() => _PaddingViewState();
16 | }
17 |
18 | class _PaddingViewState extends ViewableWidgetState {
19 | @override
20 | Widget build(BuildContext context) {
21 | // Check if widget is visible before wasting resources on building it
22 | if (!widget.model.visible) return const Offstage();
23 |
24 | double pTop = max(widget.model.marginTop ?? 0, 0);
25 | double pBottom = max(widget.model.marginBottom ?? 0, 0);
26 | double pLeft = max(widget.model.marginLeft ?? 0, 0);
27 | double pRight = max(widget.model.marginRight ?? 0, 0);
28 |
29 | // simple empty box
30 | if (widget.model.children == null || widget.model.children!.isEmpty) {
31 | return SizedBox(width: pLeft + pRight, height: pTop + pBottom);
32 | }
33 |
34 | // box view
35 | Widget view = BoxView(widget.model, (_,__) => widget.model.inflate());
36 |
37 | // build the child views
38 | return view;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/widgets/window/window_manager_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/window/window_manager_view.dart';
4 | import 'package:fml/widgets/window/window_view.dart';
5 |
6 | class WindowManagerModel {
7 | final List windows = [];
8 | final List parking = [];
9 | final Widget child;
10 |
11 | WindowManagerViewState? state;
12 |
13 | WindowManagerModel(this.child);
14 |
15 | void refresh() => state?.refresh();
16 |
17 | void dispose() {
18 | windows.clear();
19 | parking.clear();
20 | state = null;
21 | }
22 |
23 | int? park(WindowView modal) {
24 | if (!modal.model.minimized) return null;
25 |
26 | // Already Parked
27 | if (parking.contains(modal)) return parking.indexOf(modal);
28 |
29 | // Lot Full - Make Space
30 | if (!parking.contains(null)) parking.add(null);
31 |
32 | // First Empty Space
33 | int space = parking.indexOf(null);
34 | parking[space] = modal;
35 | return space;
36 | }
37 |
38 | void unpark(WindowView modal) {
39 | // Free Up Space
40 | if ((parking.contains(modal))) {
41 | parking[parking.indexOf(modal)] = null;
42 | }
43 | }
44 |
45 | void bringToFront(Widget widget) {
46 | if ((windows.contains(widget)) && (widget != windows.last)) {
47 | windows.remove(widget);
48 | windows.add(widget as WindowView);
49 | refresh();
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/widgets/column/column_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/observable/scope.dart';
4 | import 'package:fml/widgets/box/box_model.dart';
5 | import 'package:fml/widgets/widget/model.dart';
6 | import 'package:xml/xml.dart';
7 | import 'package:fml/helpers/helpers.dart';
8 |
9 | class ColumnModel extends BoxModel {
10 | @override
11 | LayoutType layoutType = LayoutType.column;
12 |
13 | @override
14 | String? get layout => "column";
15 |
16 | // indicates if the widget will grow in
17 | // its horizontal axis
18 | @override
19 | bool get expandHorizontally {
20 | if (!super.expandHorizontally) return false;
21 | bool flexible = false;
22 | for (var child in viewableChildren) {
23 | if (child.visible && child.expandHorizontally) {
24 | flexible = true;
25 | break;
26 | }
27 | }
28 | return flexible;
29 | }
30 |
31 | ColumnModel(Model super.parent, super.id, {super.scope, super.data});
32 |
33 | static ColumnModel? fromXml(Model parent, XmlElement xml,
34 | {Scope? scope, dynamic data}) {
35 | ColumnModel? model;
36 | try {
37 | // build model
38 | model = ColumnModel(parent, Xml.get(node: xml, tag: 'id'),
39 | scope: scope, data: data);
40 | model.deserialize(xml);
41 | } catch (e) {
42 | Log().exception(e, caller: 'column.Model');
43 | model = null;
44 | }
45 | return model;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/helpers/mime.dart:
--------------------------------------------------------------------------------
1 | import 'package:mime/mime.dart' deferred as mime;
2 |
3 | class Mime {
4 | static bool _libraryLoaded = false;
5 |
6 | static Future type(String path, {String defaultType = ""}) async {
7 | String type;
8 | try {
9 | if (!_libraryLoaded) {
10 | await mime.loadLibrary();
11 | _libraryLoaded = true;
12 | }
13 | type = mime.lookupMimeType(path) ?? defaultType;
14 | } catch (e) {
15 | type = defaultType;
16 | }
17 | return type;
18 | }
19 |
20 | /// makes a filename safe
21 | static String toSafeFileName(String filename,
22 | {String separator = '-',
23 | bool withSpaces = false,
24 | bool lowercase = false,
25 | bool onlyAlphanumeric = false}) {
26 | final List reservedCharacters = [
27 | '?',
28 | ':',
29 | '"',
30 | '*',
31 | '|',
32 | '/',
33 | '\\',
34 | '<',
35 | '>',
36 | '+',
37 | '[',
38 | ']'
39 | ];
40 | final RegExp onlyAlphanumericRegex = RegExp(r'''[^a-zA-Z0-9\s.]''');
41 | String returnString = filename;
42 | if (onlyAlphanumeric) {
43 | returnString = returnString.replaceAll(onlyAlphanumericRegex, '');
44 | } else {
45 | for (var c in reservedCharacters) {
46 | returnString = returnString.replaceAll(c, separator);
47 | }
48 | }
49 | if (!withSpaces) returnString = returnString.replaceAll(' ', separator);
50 | return lowercase ? returnString.toLowerCase() : returnString;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/datasources/http/post/model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/widget/model.dart';
4 | import 'package:fml/datasources/http/model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/helpers/helpers.dart';
7 |
8 | class HttpPostModel extends HttpModel {
9 |
10 | @override
11 | HttpMethods get method => HttpMethods.post;
12 |
13 | HttpPostModel(super.parent, super.id);
14 |
15 | static HttpPostModel? fromXml(Model parent, XmlElement xml) {
16 | HttpPostModel? model;
17 | try {
18 | model = HttpPostModel(parent, Xml.get(node: xml, tag: 'id'));
19 | model.deserialize(xml);
20 | } catch (e) {
21 | Log().exception(e, caller: 'post.Model');
22 | model = null;
23 | }
24 | return model;
25 | }
26 |
27 | /// Deserializes the FML template elements, attributes and children
28 | @override
29 | void deserialize(XmlElement xml) {
30 | super.deserialize(xml);
31 | }
32 |
33 | @override
34 | Future execute(
35 | String caller, String propertyOrFunction, List arguments) async {
36 | if (scope == null) return null;
37 | var function = propertyOrFunction.toLowerCase().trim();
38 |
39 | bool refresh = toBool(elementAt(arguments, 0)) ?? false;
40 | switch (function) {
41 | case "post":
42 | return await start(refresh: refresh);
43 | }
44 | return super.execute(caller, propertyOrFunction, arguments);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/widgets/iframe/inline_frame_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/widgets/viewable/viewable_model.dart';
3 | import 'package:fml/widgets/widget/model.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/widgets/iframe/inline_frame_view.dart' as widget_view;
7 | import 'package:fml/observable/observable_barrel.dart';
8 | import 'package:fml/helpers/helpers.dart';
9 |
10 | class InlineFrameModel extends ViewableModel {
11 | // url
12 | StringObservable? _url;
13 | set url(dynamic v) {
14 | if (_url != null) {
15 | _url!.set(v);
16 | } else if (v != null) {
17 | _url = StringObservable(Binding.toKey(id, 'url'), v,
18 | scope: scope, listener: onPropertyChange);
19 | }
20 | }
21 |
22 | String? get url => _url?.get();
23 |
24 | InlineFrameModel(Model super.parent, super.id);
25 |
26 | static InlineFrameModel? fromXml(Model parent, XmlElement xml) {
27 | InlineFrameModel? model =
28 | InlineFrameModel(parent, Xml.get(node: xml, tag: 'id'));
29 | model.deserialize(xml);
30 | return model;
31 | }
32 |
33 | /// Deserializes the FML template elements, attributes and children
34 | @override
35 | void deserialize(XmlElement xml) {
36 | // deserialize
37 | super.deserialize(xml);
38 |
39 | // properties
40 | url = Xml.get(node: xml, tag: 'url');
41 | }
42 |
43 | @override
44 | Widget getView({Key? key}) => (widget_view.View(this) as Widget);
45 | }
46 |
--------------------------------------------------------------------------------
/lib/datasources/file/file.mobile.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:typed_data';
3 | import 'package:cross_file/cross_file.dart';
4 | import 'package:fml/log/manager.dart';
5 | import 'file.base.dart';
6 |
7 | File create(dynamic file, String url, String name, String? mimeType, int size) {
8 | return File(file, url, name, mimeType, size);
9 | }
10 |
11 | class File extends FileBase {
12 | File(super.file, super.url, super.name, super.mimeType, super.size);
13 |
14 | @override
15 | Future read({int? start, int? end}) async {
16 | try {
17 | // already read
18 | if (bytes != null) return bytes;
19 |
20 | if (file is XFile) {
21 | if ((start == null) && (end == null)) {
22 | bytes = await file.readAsBytes();
23 | } else {
24 | return await _read(start!, end);
25 | }
26 | }
27 |
28 | return bytes;
29 | } catch (e) {
30 | Log().exception(e);
31 | return null;
32 | }
33 | }
34 |
35 | Future _read(int start, int? end) async {
36 | List parts = [];
37 | if (start.isNegative) start = 0;
38 | end ??= await file.length();
39 |
40 | Stream> stream = file.openRead(start, end);
41 | await for (dynamic part in stream) {
42 | try {
43 | parts.addAll(Uint8List.fromList(part));
44 | } catch (e) {
45 | Log().exception(e);
46 | }
47 | }
48 | return (parts.isEmpty ? null : Uint8List.fromList(parts));
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/datasources/http/patch/model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/widget/model.dart';
4 | import 'package:fml/datasources/http/model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/helpers/helpers.dart';
7 |
8 | class HttpPatchModel extends HttpModel {
9 |
10 | @override
11 | HttpMethods get method => HttpMethods.patch;
12 |
13 | HttpPatchModel(super.parent, super.id);
14 |
15 | static HttpPatchModel? fromXml(Model parent, XmlElement xml) {
16 | HttpPatchModel? model;
17 | try {
18 | model = HttpPatchModel(parent, Xml.get(node: xml, tag: 'id'));
19 | model.deserialize(xml);
20 | } catch (e) {
21 | Log().exception(e, caller: 'patch.Model');
22 | model = null;
23 | }
24 | return model;
25 | }
26 |
27 | /// Deserializes the FML template elements, attributes and children
28 | @override
29 | void deserialize(XmlElement xml) {
30 | super.deserialize(xml);
31 | }
32 |
33 | @override
34 | Future execute(
35 | String caller, String propertyOrFunction, List arguments) async {
36 | if (scope == null) return null;
37 | var function = propertyOrFunction.toLowerCase().trim();
38 |
39 | bool refresh = toBool(elementAt(arguments, 0)) ?? false;
40 | switch (function) {
41 | case "patch":
42 | return await start(refresh: refresh);
43 | }
44 | return super.execute(caller, propertyOrFunction, arguments);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/datasources/http/delete/model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/widget/model.dart';
4 | import 'package:fml/datasources/http/model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/helpers/helpers.dart';
7 |
8 | class HttpDeleteModel extends HttpModel {
9 |
10 | @override
11 | HttpMethods get method => HttpMethods.delete;
12 |
13 | HttpDeleteModel(super.parent, super.id);
14 |
15 | static HttpDeleteModel? fromXml(Model parent, XmlElement xml) {
16 | HttpDeleteModel? model;
17 | try {
18 | model = HttpDeleteModel(parent, Xml.get(node: xml, tag: 'id'));
19 | model.deserialize(xml);
20 | } catch (e) {
21 | Log().exception(e, caller: 'delete.Model');
22 | model = null;
23 | }
24 | return model;
25 | }
26 |
27 | /// Deserializes the FML template elements, attributes and children
28 | @override
29 | void deserialize(XmlElement xml) {
30 | super.deserialize(xml);
31 | }
32 |
33 | @override
34 | Future execute(
35 | String caller, String propertyOrFunction, List arguments) async {
36 | if (scope == null) return null;
37 | var function = propertyOrFunction.toLowerCase().trim();
38 |
39 | bool refresh = toBool(elementAt(arguments, 0)) ?? false;
40 | switch (function) {
41 | case "delete":
42 | return await start(refresh: refresh);
43 | }
44 | return super.execute(caller, propertyOrFunction, arguments);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/example/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.14'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | target 'RunnerTests' do
35 | inherit! :search_paths
36 | end
37 | end
38 |
39 | post_install do |installer|
40 | installer.pods_project.targets.each do |target|
41 | flutter_additional_macos_build_settings(target)
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/text/text_detector.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 |
4 | import 'text_detector.stub.dart'
5 | if (dart.library.io) 'text_detector.mobile.dart'
6 | if (dart.library.html) 'text_detector.web.dart';
7 |
8 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
9 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
10 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
11 |
12 | class Line {
13 | String? text;
14 | List words = [];
15 | Line({this.text});
16 | }
17 |
18 | class Payload {
19 | final String? body;
20 | final List? lines;
21 | Payload({this.body, this.lines});
22 |
23 | static Data toData(Payload payload) {
24 | Data data = Data();
25 |
26 | // process lines
27 | int i = 0;
28 | if (payload.lines != null) {
29 | for (var line in payload.lines!) {
30 | i++;
31 |
32 | Map map = {};
33 | data.add(map);
34 | map["body"] = (i == 1 ? payload.body : null);
35 | map["line"] = line.text;
36 |
37 | int j = 1;
38 | for (var word in line.words) {
39 | map["word${j++}"] = word;
40 | }
41 | }
42 | }
43 | return data;
44 | }
45 | }
46 |
47 | abstract class ITextDetector {
48 | factory ITextDetector() => getDetector();
49 | Future detect(DetectableImage image);
50 | }
51 |
--------------------------------------------------------------------------------
/lib/widgets/box/box_layout.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/box/box_data.dart';
4 | import 'package:fml/widgets/viewable/viewable_model.dart';
5 |
6 | class BoxLayout extends ParentDataWidget {
7 |
8 | final ViewableMixin model;
9 |
10 | const BoxLayout({
11 | super.key,
12 | required this.model,
13 | required super.child
14 | });
15 |
16 | @override
17 | void applyParentData(RenderObject renderObject) {
18 |
19 | if (renderObject.parentData is BoxData) {
20 |
21 | final data = renderObject.parentData! as BoxData;
22 |
23 | // determine if we need to draw (redraw) the box
24 | // boxes mark themselves as needing rebuild when their view size or position changes
25 | // This gets marked in onLayoutChange() of the visibleMixin
26 | bool needsLayout = data.model?.needsLayout ?? false;
27 |
28 | // model changed?
29 | if (data.model != model) {
30 | data.model = model;
31 | needsLayout = true;
32 | }
33 |
34 | // we need to rebuild the box
35 | if (needsLayout) {
36 | final RenderObject? targetParent = renderObject.parent;
37 | if (targetParent is RenderObject) {
38 | targetParent.markNeedsLayout();
39 | }
40 | }
41 | }
42 | else {
43 | if (kDebugMode) print('Error: applyParentData() called on a parentData that is not BoxData');
44 | }
45 | }
46 |
47 | @override
48 | Type get debugTypicalAncestorWidgetClass => Flex;
49 | }
50 |
--------------------------------------------------------------------------------
/lib/widgets/colorpicker/colorpicker_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flex_color_picker/flex_color_picker.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:fml/widgets/colorpicker/colorpicker_model.dart';
5 | import 'package:fml/helpers/string.dart';
6 | import 'package:fml/widgets/text/text_model.dart';
7 | import 'package:fml/widgets/text/text_view.dart';
8 |
9 | class ColorPickerView {
10 |
11 | static Color? colorSelected;
12 |
13 | static launchPicker(ColorpickerModel model, BuildContext? context) async {
14 | if (context == null) return;
15 |
16 | colorSelected = null;
17 |
18 | var buttons = const ColorPickerActionButtons(dialogActionButtons: false, closeButton: true);
19 |
20 | var view = ColorPicker(
21 | color: toColor(model.value) ?? Colors.transparent,
22 | onColorChanged: (Color color) => colorSelected = color,
23 | width: model.width ?? 44,
24 | height: model.height ?? 44,
25 | hasBorder: model.border != 'none',
26 | borderRadius: model.radius,
27 | borderColor: model.borderColor,
28 | actionButtons: buttons,
29 | heading: TextView(TextModel(null, null, value: model.heading, size: 20)),
30 | subheading: TextView(TextModel(null, null, value: model.subheading, size: 20)));
31 |
32 | // wait for the dialog to be dismissed
33 | await view.showPickerDialog(context);
34 |
35 | // selected?
36 | if (colorSelected != null) {
37 | model.setSelectedColor(colorSelected);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/datasources/transforms/image/flip.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 | import 'package:fml/datasources/transforms/transform_interface.dart';
4 | import 'package:fml/datasources/transforms/image/image_transform_model.dart';
5 | import 'package:fml/observable/binding.dart';
6 | import 'package:fml/observable/observables/string.dart';
7 | import 'package:xml/xml.dart';
8 | import 'package:fml/widgets/widget/model.dart';
9 | import 'package:fml/helpers/helpers.dart';
10 |
11 | class Flip extends ImageTransformModel implements ITransform {
12 |
13 | /// axis
14 | StringObservable? _axis;
15 | set axis(dynamic v) {
16 | if (_axis != null) {
17 | _axis!.set(v);
18 | } else if (v != null) {
19 | _axis = StringObservable(Binding.toKey(id, 'axis'), v,
20 | scope: scope, listener: onPropertyChange);
21 | }
22 | }
23 | String get axis => _axis?.get() ?? "horizontal";
24 |
25 | Flip(Model parent, {String? id}) : super(parent, id);
26 |
27 | static Flip? fromXml(Model parent, XmlElement xml) {
28 | Flip model = Flip(parent, id: Xml.get(node: xml, tag: 'id'));
29 | model.deserialize(xml);
30 | return model;
31 | }
32 |
33 | @override
34 | void deserialize(XmlElement xml) {
35 | // Deserialize
36 | super.deserialize(xml);
37 |
38 | // Properties
39 | axis = Xml.get(node: xml, tag: 'axis');
40 | }
41 |
42 | @override
43 | apply(Data? data) async {
44 | if (enabled == false) return;
45 | if (data != null) await flipImage(data, axis);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/datasources/http/get/model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/widget/model.dart';
4 | import 'package:fml/datasources/http/model.dart';
5 | import 'package:xml/xml.dart';
6 | import 'package:fml/helpers/helpers.dart';
7 |
8 | class HttpGetModel extends HttpModel {
9 |
10 | @override
11 | HttpMethods get method => HttpMethods.get;
12 |
13 | @override
14 | bool get autoexecute => super.autoexecute ?? true;
15 |
16 | HttpGetModel(super.parent, super.id);
17 |
18 | static HttpGetModel? fromXml(Model parent, XmlElement xml) {
19 | HttpGetModel? model;
20 | try {
21 | model = HttpGetModel(parent, Xml.get(node: xml, tag: 'id'));
22 | model.deserialize(xml);
23 | } catch (e) {
24 | Log().exception(e, caller: 'get.Model');
25 | model = null;
26 | }
27 | return model;
28 | }
29 |
30 | /// Deserializes the FML template elements, attributes and children
31 | @override
32 | void deserialize(XmlElement xml) {
33 | super.deserialize(xml);
34 | }
35 |
36 | @override
37 | Future execute(
38 | String caller, String propertyOrFunction, List arguments) async {
39 | if (scope == null) return null;
40 | var function = propertyOrFunction.toLowerCase().trim();
41 |
42 | bool refresh = toBool(elementAt(arguments, 0)) ?? false;
43 | switch (function) {
44 | case "get":
45 | return await start(refresh: refresh);
46 | }
47 | return super.execute(caller, propertyOrFunction, arguments);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/widgets/stack/stack_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/observable/scope.dart';
4 | import 'package:fml/widgets/box/box_model.dart';
5 | import 'package:fml/widgets/viewable/viewable_model.dart';
6 | import 'package:fml/widgets/widget/model.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:xml/xml.dart';
9 | import 'package:fml/helpers/helpers.dart';
10 |
11 | class StackModel extends BoxModel {
12 | @override
13 | LayoutType layoutType = LayoutType.stack;
14 |
15 | @override
16 | String? get layout => "stack";
17 |
18 | StackModel(Model super.parent, super.id, {super.scope, super.data});
19 |
20 | static StackModel? fromXml(Model parent, XmlElement xml, {Scope? scope, dynamic data}) {
21 | StackModel? model;
22 | try {
23 | // build model
24 | model = StackModel(parent, Xml.get(node: xml, tag: 'id'), scope: scope, data: data);
25 | model.deserialize(xml);
26 | } catch (e) {
27 | Log().exception(e, caller: 'stack.Model');
28 | model = null;
29 | }
30 | return model;
31 | }
32 |
33 | @override
34 | List inflate() {
35 | // sort children by depth
36 | if (children != null) {
37 | children!.sort((a, b) {
38 | if (a is ViewableMixin && b is ViewableMixin) {
39 | if (a.depth != null && b.depth != null) {
40 | return a.depth?.compareTo(b.depth!) ?? 0;
41 | }
42 | }
43 | return 0;
44 | });
45 | }
46 | return super.inflate();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/datasources/http/put/model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/datasources/datasource_interface.dart';
3 | import 'package:fml/log/manager.dart';
4 | import 'package:fml/widgets/widget/model.dart';
5 | import 'package:fml/datasources/http/model.dart';
6 | import 'package:xml/xml.dart';
7 | import 'package:fml/helpers/helpers.dart';
8 |
9 | class HttpPutModel extends HttpModel implements IDataSource {
10 |
11 | @override
12 | HttpMethods get method => HttpMethods.put;
13 |
14 | HttpPutModel(super.parent, super.id);
15 |
16 | static HttpPutModel? fromXml(Model parent, XmlElement xml) {
17 | HttpPutModel? model;
18 | try {
19 | model = HttpPutModel(parent, Xml.get(node: xml, tag: 'id'));
20 | model.deserialize(xml);
21 | } catch (e) {
22 | Log().exception(e, caller: 'put.Model');
23 | model = null;
24 | }
25 | return model;
26 | }
27 |
28 | /// Deserializes the FML template elements, attributes and children
29 | @override
30 | void deserialize(XmlElement xml) {
31 | super.deserialize(xml);
32 | }
33 |
34 | @override
35 | Future execute(
36 | String caller, String propertyOrFunction, List arguments) async {
37 | if (scope == null) return null;
38 | var function = propertyOrFunction.toLowerCase().trim();
39 |
40 | bool refresh = toBool(elementAt(arguments, 0)) ?? false;
41 | switch (function) {
42 | case "put":
43 | return await start(refresh: refresh);
44 | }
45 | return super.execute(caller, propertyOrFunction, arguments);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = '../build'
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 |
13 | subprojects {
14 | afterEvaluate { project ->
15 | if (project.extensions.findByName("android") != null) {
16 | Integer pluginCompileSdk = project.android.compileSdk
17 | if (pluginCompileSdk != null && pluginCompileSdk < 31) {
18 | project.logger.error(
19 | "Warning: Overriding compileSdk version in Flutter plugin: "
20 | + project.name
21 | + " from "
22 | + pluginCompileSdk
23 | + " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
24 | + "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
25 | + project.name
26 | + " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
27 | )
28 | project.android {
29 | compileSdk 31
30 | }
31 | }
32 | }
33 | }
34 | }
35 |
36 | subprojects {
37 | project.buildDir = "${rootProject.buildDir}/${project.name}"
38 | project.evaluationDependsOn(":app")
39 | }
40 |
41 |
42 | tasks.register("clean", Delete) {
43 | delete rootProject.buildDir
44 | }
45 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '16.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | target.build_configurations.each do |config|
41 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
42 | end
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/lib/widgets/trigger/condition/trigger_condition_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/widgets/widget/model.dart';
3 | import 'package:xml/xml.dart';
4 | import 'package:fml/observable/observable_barrel.dart';
5 | import 'package:fml/helpers/helpers.dart';
6 |
7 | class TriggerConditionModel extends Model {
8 | //////////
9 | /* When */
10 | //////////
11 | StringObservable? _when;
12 | set when(dynamic v) {
13 | if (_when != null) {
14 | _when!.set(v);
15 | } else if (v != null) {
16 | _when = StringObservable(Binding.toKey(id, 'when'), v, scope: scope);
17 | }
18 | }
19 |
20 | String? get when {
21 | return _when?.get();
22 | }
23 |
24 | ///////////
25 | /* Call */
26 | ///////////
27 | StringObservable? get callObservable => _call;
28 | StringObservable? _call;
29 | set call(dynamic v) {
30 | if (_call != null) {
31 | _call!.set(v);
32 | } else if (v != null) {
33 | _call = StringObservable(Binding.toKey(id, 'call'), v, scope: scope);
34 | }
35 | }
36 |
37 | String? get call {
38 | return _call?.get();
39 | }
40 |
41 | TriggerConditionModel(Model parent,
42 | {String? id, dynamic when, dynamic call})
43 | : super(parent, id) {
44 | this.when = when;
45 | this.call = call;
46 | }
47 |
48 | static TriggerConditionModel? fromXml(Model parent, XmlElement e,
49 | {String? when}) {
50 | TriggerConditionModel condition = TriggerConditionModel(
51 | parent,
52 | when: Xml.get(node: e, tag: 'when'),
53 | call: Xml.get(node: e, tag: 'call'),
54 | );
55 |
56 | return condition;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/widgets/link/link_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/box/box_view.dart';
4 | import 'package:fml/widgets/viewable/viewable_view.dart';
5 | import 'package:fml/widgets/widget/model.dart';
6 | import 'link_model.dart';
7 |
8 | class LinkView extends StatefulWidget implements ViewableWidgetView {
9 | @override
10 | final LinkModel model;
11 | LinkView(this.model) : super(key: ObjectKey(model));
12 |
13 | @override
14 | State createState() => _LinkViewState();
15 | }
16 |
17 | class _LinkViewState extends ViewableWidgetState {
18 | onTap() async {
19 | Model.unfocus();
20 | await widget.model.onClick(context);
21 | }
22 |
23 | onDoubleTap() async {
24 | Model.unfocus();
25 | await widget.model.onDoubleTap(context);
26 | }
27 |
28 | onLongPress() async {
29 | Model.unfocus();
30 | await widget.model.onLongPress(context);
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | // Check if widget is visible before wasting resources on building it
36 | if (!widget.model.visible) return const Offstage();
37 |
38 | // column view
39 | Widget view = BoxView(widget.model, (_,__) => widget.model.inflate());
40 |
41 | // wrap in gesture detector
42 | if (widget.model.enabled) {
43 | view = GestureDetector(
44 | onTap: onTap,
45 | onLongPress: onLongPress,
46 | onDoubleTap: onDoubleTap,
47 | child: MouseRegion(cursor: SystemMouseCursors.click, child: view));
48 | }
49 |
50 | // build the child views
51 | return view;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/image/detectable_image.web.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:ui';
3 |
4 | import 'package:camera/camera.dart' show CameraImage;
5 | import 'package:camera/camera.dart' show CameraDescription;
6 | import 'package:cross_file/cross_file.dart';
7 | import 'package:zxing_lib/common.dart' show HybridBinarizer;
8 | import 'package:zxing_lib/zxing.dart' show RGBLuminanceSource;
9 | import 'package:zxing_lib/zxing.dart' show BinaryBitmap;
10 | import 'package:fml/helpers/helpers.dart';
11 |
12 | class DetectableImage {
13 | final dynamic image;
14 |
15 | DetectableImage(this.image);
16 |
17 | static Future fromCamera(
18 | CameraImage image, CameraDescription camera) async {
19 | return DetectableImage(null);
20 | }
21 |
22 | static Future fromFile(XFile file) async {
23 | var bytes = await file.readAsBytes();
24 | var codec = await instantiateImageCodec(bytes);
25 | var frame = await codec.getNextFrame();
26 | var data = await frame.image.toByteData(format: ImageByteFormat.rawRgba);
27 | if (data == null) return DetectableImage(null);
28 | return await fromRgba(data.buffer.asUint8List(), frame.image.width, frame.image.height);
29 | }
30 |
31 | static Future fromRgba(List bytes, int width, int height) async {
32 |
33 | // decode pixels
34 | List pixels = ImageHelper.toPixelsFromRgba(bytes);
35 |
36 | // get luminance
37 | var source = RGBLuminanceSource(width, height, pixels);
38 |
39 | // get bitmap
40 | BinaryBitmap bitmap = BinaryBitmap(HybridBinarizer(source));
41 |
42 | return DetectableImage(bitmap);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/hive/stash.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:async';
3 | import 'package:fml/data/data.dart';
4 | import 'package:fml/hive/database.dart';
5 | import 'package:fml/observable/scope.dart';
6 |
7 | class Stash {
8 | static String tableName = "STASH";
9 |
10 | final String key;
11 | final Map map;
12 | final Scope? scope;
13 |
14 | Stash(this.key, this.map, {this.scope});
15 |
16 | // inserts a new stash entry
17 | Future insert() async {
18 | var exception = await Database.insert(tableName, key, map);
19 | return (exception == null);
20 | }
21 |
22 | // updates the stash entry
23 | Future upsert() async {
24 | var exception = await Database.upsert(tableName, key, map);
25 | return (exception == null);
26 | }
27 |
28 | // deletes a stash entry
29 | Future delete() async {
30 | var exception = await Database.delete(tableName, key);
31 | return (exception == null);
32 | }
33 |
34 | // get all stash entries
35 | static Future get(String key, {Scope? scope}) async {
36 | Map? entry = await Database.find(tableName, key);
37 | return Stash(key, entry ?? {}, scope: scope);
38 | }
39 |
40 | // get specific stash
41 | static Future getStash(String domain) async {
42 | Map entries = await Database.find(tableName, domain) ?? {};
43 | return Stash(domain, entries);
44 | }
45 |
46 | static Future getStashData(String domain) async {
47 | Stash stash = await getStash(domain);
48 | Data data = Data();
49 | stash.map.forEach((k, v) {
50 | data.add({'key': k, 'value': v});
51 | });
52 | return data;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/widgets/plugin/plugin_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:fml/widgets/plugin/plugin_interface.dart';
3 | import 'package:fml/widgets/viewable/viewable_model.dart';
4 | import 'package:fml/widgets/viewable/viewable_view.dart';
5 |
6 | class PluginView extends StatefulWidget implements ViewableWidgetView {
7 |
8 | @override
9 | final ViewableModel model;
10 | IPlugin get plugin => model as IPlugin;
11 |
12 | PluginView(this.model) : super(key: ObjectKey(model)) {
13 | assert(model is IPlugin);
14 | }
15 |
16 | @override
17 | State createState() => PluginViewState();
18 | }
19 |
20 | class PluginViewState extends ViewableWidgetState {
21 |
22 | Widget? plugin;
23 |
24 | @override
25 | void initState() {
26 |
27 | super.initState();
28 |
29 | // load the plugin
30 | _loadRuntime();
31 | }
32 |
33 |
34 | void _loadRuntime() async {
35 |
36 | // build the inner plugin
37 | var plugin = widget.plugin.build();
38 |
39 | this.plugin = plugin;
40 |
41 | // rebuild the widget
42 | setState(() {});
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 |
48 | // visible?
49 | if (!widget.model.visible) return const Offstage();
50 |
51 | var view = plugin;
52 |
53 | // not loaded yet?
54 | if (view == null) return Container();
55 |
56 | // no need to continue
57 | if (view is Offstage) return view;
58 |
59 | // add margins
60 | view = addMargins(view);
61 |
62 | // apply visual transforms
63 | view = applyTransforms(view);
64 |
65 | // apply user defined constraints
66 | view = applyConstraints(view, widget.model.constraints);
67 |
68 | // return the view
69 | return view;
70 | }
71 | }
--------------------------------------------------------------------------------
/example/applications/example/templates/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/example/assets/applications/example/templates/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/biometrics/biometrics_detector.mobile.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | // import 'package:google_mlkit_face_detection/google_mlkit_face_detection.dart' as ML;
3 | // import 'biometrics.dart' as BIOMETRICS;
4 | //
5 | // BiometricsDetector getDetector() => BiometricsDetector();
6 | //
7 | // class BiometricsDetector implements BIOMETRICS.BiometricsDetector
8 | // {
9 | // static final BiometricsDetector _singleton = BiometricsDetector._initialize();
10 | //
11 | // static var _detector;
12 | //
13 | // BiometricsDetector._initialize();
14 | //
15 | // factory BiometricsDetector()
16 | // {
17 | // return _singleton;
18 | // }
19 | //
20 | // Future detect(dynamic detectable) async
21 | // {
22 | // try
23 | // {
24 | // BIOMETRICS.Payload result;
25 | //
26 | // if (detectable?.image is ML.InputImage)
27 | // {
28 | // var image = detectable.image;
29 | //
30 | // // process the image
31 | // List faces = await _detector.processImage(image);
32 | //
33 | // // return result
34 | // result = Payload(faces);
35 | // }
36 | //
37 | // return result;
38 | // }
39 | // catch(e)
40 | // {
41 | // print (e);
42 | // return null;
43 | // }
44 | // }
45 | //
46 | // BIOMETRICS.Payload Payload(List faces)
47 | // {
48 | // if ((faces == null) || (faces.isEmpty)) return null;
49 | //
50 | // BIOMETRICS.Payload payload = BIOMETRICS.Payload();
51 | // faces.forEach((face)
52 | // {
53 | // BIOMETRICS.Biometric face = BIOMETRICS.Biometric();
54 | // payload.biometrics.add(face);
55 | // });
56 | //
57 | // return payload;
58 | // }
59 | // }
60 |
--------------------------------------------------------------------------------
/lib/widgets/icon/icon_view.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/viewable/viewable_view.dart';
4 | import 'package:fml/widgets/icon/icon_model.dart';
5 |
6 | class IconView extends StatefulWidget implements ViewableWidgetView {
7 | @override
8 | final IconModel model;
9 |
10 | IconView(this.model) : super(key: ObjectKey(model));
11 |
12 | @override
13 | State createState() => _IconViewState();
14 | }
15 |
16 | class _IconViewState extends ViewableWidgetState {
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 |
21 | // Check if widget is visible before wasting resources on building it
22 | if (!widget.model.visible) return const Offstage();
23 |
24 | IconData? value = widget.model.icon;
25 |
26 | // icon's size can be expressed as a %
27 | // Don't use layoutBuilder() as this causes issues in popover
28 | // myMaxWidth traverses up the parent tree to find the max width constraint
29 | double? size = widget.model.size ?? 32;
30 | if (widget.model.widthPercentage != null) {
31 | size = (widget.model.widthPercentage! / 100) * widget.model.myMaxWidth;
32 | }
33 |
34 | // icon color
35 | Color? color = Theme.of(context).colorScheme.inverseSurface;
36 | if (widget.model.color != null) color = widget.model.color;
37 | if (widget.model.opacity != null) {
38 | color = color!.withOpacity(widget.model.opacity!);
39 | }
40 |
41 | // view
42 | Widget view = Icon(value, size: size, color: color);
43 |
44 | // add margins
45 | view = addMargins(view);
46 |
47 | // apply visual transforms
48 | view = applyTransforms(view);
49 |
50 | return view;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | void RegisterPlugins(flutter::PluginRegistry* registry) {
20 | AudioplayersWindowsPluginRegisterWithRegistrar(
21 | registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
22 | CameraWindowsRegisterWithRegistrar(
23 | registry->GetRegistrarForPlugin("CameraWindows"));
24 | ConnectivityPlusWindowsPluginRegisterWithRegistrar(
25 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
26 | FirebaseAuthPluginCApiRegisterWithRegistrar(
27 | registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
28 | FirebaseCorePluginCApiRegisterWithRegistrar(
29 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
30 | GeolocatorWindowsRegisterWithRegistrar(
31 | registry->GetRegistrarForPlugin("GeolocatorWindows"));
32 | PrintingPluginRegisterWithRegistrar(
33 | registry->GetRegistrarForPlugin("PrintingPlugin"));
34 | UrlLauncherWindowsRegisterWithRegistrar(
35 | registry->GetRegistrarForPlugin("UrlLauncherWindows"));
36 | VideoPlayerWinPluginCApiRegisterWithRegistrar(
37 | registry->GetRegistrarForPlugin("VideoPlayerWinPluginCApi"));
38 | }
39 |
--------------------------------------------------------------------------------
/lib/datasources/transforms/data/eval.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 | import 'package:fml/datasources/transforms/transform_interface.dart';
4 | import 'package:fml/datasources/transforms/transform_model.dart';
5 | import 'package:fml/eval/eval.dart' as fml_eval;
6 | import 'package:fml/observable/binding.dart';
7 |
8 | import 'package:xml/xml.dart';
9 | import 'package:fml/widgets/widget/model.dart';
10 | import 'package:fml/helpers/helpers.dart';
11 |
12 | class Eval extends TransformModel implements ITransform {
13 |
14 | final String? source;
15 | final String? target;
16 |
17 | Eval(Model? parent, {String? id, this.source, this.target})
18 | : super(parent, id);
19 |
20 | static Eval? fromXml(Model? parent, XmlElement xml) {
21 | Eval model = Eval(
22 | parent,
23 | id: Xml.get(node: xml, tag: 'id'),
24 | source: Xml.get(node: xml, tag: "source"),
25 | target: Xml.get(node: xml, tag: "target"),
26 | );
27 | model.deserialize(xml);
28 | return model;
29 | }
30 |
31 | @override
32 | void deserialize(XmlElement xml) {
33 | // Deserialize
34 | super.deserialize(xml);
35 | }
36 |
37 | _eval(Data? list) {
38 | if ((list == null) || (source == null)) return null;
39 |
40 | List? bindings = Binding.getBindings(source);
41 | for (var row in list) {
42 |
43 | // get variables
44 | var variables = Data.readBindings(bindings, row);
45 |
46 | // evaluate
47 | var value = fml_eval.Eval.evaluate(source, variables: variables);
48 |
49 | // save to the data set
50 | Data.write(row, target, value);
51 | }
52 | }
53 |
54 | @override
55 | apply(Data? data) async {
56 | if (enabled == false) return;
57 | _eval(data);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/widgets/tooltip/v2/src/tooltip_elements_display.dart:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2022 Marcelo Gil
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | import 'package:flutter/material.dart';
24 | import 'package:fml/widgets/tooltip/v2/src/position_manager.dart';
25 | import 'element_box.dart';
26 |
27 | /// [ToolTipElementsDisplay] holds the size, position and style
28 | /// for the tooltip and the arrow.
29 | class ToolTipElementsDisplay {
30 | final ElementBox bubble;
31 | final ElementBox arrow;
32 | final TooltipPosition position;
33 | final BorderRadiusGeometry? radius;
34 |
35 | ToolTipElementsDisplay({
36 | required this.bubble,
37 | required this.arrow,
38 | required this.position,
39 | this.radius,
40 | });
41 | }
42 |
--------------------------------------------------------------------------------
/lib/observable/observables/icon.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:async';
3 | import 'package:fml/graphics.dart' deferred as icons;
4 | import 'package:flutter/material.dart';
5 | import 'package:fml/observable/observable.dart';
6 |
7 | class IconObservable extends Observable {
8 | static Completer? libraryLoader;
9 | String? _pendingIcon;
10 |
11 | IconObservable(super.name, super.value, {
12 | super.scope,
13 | super.listener,
14 | super.getter,
15 | super.setter,
16 | super.readonly}) {
17 |
18 | // load the library
19 | if (libraryLoader == null) {
20 | libraryLoader = Completer();
21 | icons.loadLibrary().then((value) => libraryLoader!.complete(true));
22 | }
23 |
24 | // wait for the library to load
25 | if (!libraryLoader!.isCompleted) {
26 | libraryLoader!.future.whenComplete(() {
27 | if (_pendingIcon != null) set(toIcon(_pendingIcon!));
28 | });
29 | }
30 | }
31 |
32 | @override
33 | IconData? get({String? dotnotation}) {
34 | dynamic value = super.get();
35 | return (value is IconData) ? value : null;
36 | }
37 |
38 | @override
39 | dynamic to(dynamic value) {
40 | try {
41 | if (value == null) return null;
42 | if (value is IconData) return value;
43 | if (value is String) return toIcon(value);
44 | return Exception();
45 | } catch (e) {
46 | return e;
47 | }
48 | }
49 |
50 | IconData? toIcon(String name) {
51 | IconData? icon;
52 | if (libraryLoader?.isCompleted ?? false) {
53 | name = name.toLowerCase();
54 | if (icons.Graphics.icons.containsKey(name)) {
55 | icon = icons.Graphics.icons[name];
56 | }
57 | } else {
58 | _pendingIcon = name;
59 | icon = Icons.horizontal_rule;
60 | }
61 | return icon;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/lib/widgets/drawer/item/drawer_item_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:fml/widgets/drawer/drawer_model.dart';
4 | import 'package:fml/widgets/drawer/drawer_view.dart';
5 | import 'package:fml/widgets/widget/model.dart';
6 | import 'package:fml/widgets/box/box_model.dart';
7 | import 'package:xml/xml.dart';
8 | import 'package:fml/helpers/helpers.dart';
9 |
10 | class DrawerItemModel extends BoxModel {
11 | final Drawers position;
12 |
13 | DrawerItemModel(Model super.parent, super.id, this.position);
14 |
15 | static DrawerItemModel? fromXml(
16 | Model parent, XmlElement? xml, Drawers position) {
17 | DrawerItemModel? model;
18 | try {
19 | model = DrawerItemModel(parent, Xml.get(node: xml, tag: 'id'), position);
20 | if (xml != null) {
21 | model.deserialize(xml);
22 | }
23 | } catch (e) {
24 | Log().exception(e, caller: 'drawerItem.Model');
25 | model = null;
26 | }
27 | return model;
28 | }
29 |
30 | @override
31 | Future execute(
32 | String caller, String propertyOrFunction, List arguments) async {
33 | if (scope == null) return null;
34 |
35 | var function = propertyOrFunction.toLowerCase().trim();
36 | switch (function) {
37 | case "open":
38 | DrawerViewState? drawer =
39 | parent?.findListenerOfExactType(DrawerViewState);
40 | if (drawer != null) return await drawer.openDrawer(position);
41 | break;
42 |
43 | case "close":
44 | DrawerViewState? drawer =
45 | parent?.findListenerOfExactType(DrawerViewState);
46 | if (drawer != null) return await drawer.closeDrawer(position);
47 | break;
48 | }
49 | return super.execute(caller, propertyOrFunction, arguments);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "ba393198430278b6595976de84fe170f553cc728"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: ba393198430278b6595976de84fe170f553cc728
17 | base_revision: ba393198430278b6595976de84fe170f553cc728
18 | - platform: android
19 | create_revision: ba393198430278b6595976de84fe170f553cc728
20 | base_revision: ba393198430278b6595976de84fe170f553cc728
21 | - platform: ios
22 | create_revision: ba393198430278b6595976de84fe170f553cc728
23 | base_revision: ba393198430278b6595976de84fe170f553cc728
24 | - platform: linux
25 | create_revision: ba393198430278b6595976de84fe170f553cc728
26 | base_revision: ba393198430278b6595976de84fe170f553cc728
27 | - platform: macos
28 | create_revision: ba393198430278b6595976de84fe170f553cc728
29 | base_revision: ba393198430278b6595976de84fe170f553cc728
30 | - platform: web
31 | create_revision: ba393198430278b6595976de84fe170f553cc728
32 | base_revision: ba393198430278b6595976de84fe170f553cc728
33 | - platform: windows
34 | create_revision: ba393198430278b6595976de84fe170f553cc728
35 | base_revision: ba393198430278b6595976de84fe170f553cc728
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/lib/event/event.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/event/manager.dart';
3 | import 'package:fml/widgets/widget/model.dart';
4 |
5 | enum EventTypes {
6 | alert,
7 | back,
8 | build,
9 | clearbranding,
10 | close,
11 | cont,
12 | copy,
13 | execute /* Executed by dot notation datasource events */,
14 | focusnode,
15 | logon,
16 | logoff,
17 | maximize,
18 | minimize,
19 | open,
20 | openjstemplate,
21 | refresh,
22 | saveas,
23 | set,
24 | sound,
25 | stash,
26 | theme,
27 | toast,
28 | trigger,
29 | wait
30 | }
31 |
32 | /// Events are inline void function calls
33 | ///
34 | /// Generally Events are used from templates to force an action to happen within the code
35 | /// Events are scoped but broadcast up and individual widgets can be set up to handle events
36 | class Event {
37 | /// When an event is processed and you want it to stop broadcasting set handled = true
38 | bool _handled = false;
39 | set handled(bool b) {
40 | if (cancellable && b) _handled = true;
41 | }
42 |
43 | bool get handled {
44 | return _handled;
45 | }
46 |
47 | /// What type the event is to determine what it should do
48 | final EventTypes type;
49 |
50 | /// Parameters to go with an event
51 | Map? parameters;
52 |
53 | /// Deprecated
54 | bool bubbles = true;
55 |
56 | /// Acts as an override to any individual widget handling of [handled]
57 | ///
58 | /// If set to false it will prevent [handled] from being set to true
59 | bool cancellable = true;
60 |
61 | /// List of all [IEventManager] objects related to handling this event
62 | final List functions = [];
63 |
64 | final Model? model;
65 |
66 | Event(this.type,
67 | {this.parameters,
68 | this.bubbles = true,
69 | this.cancellable = true,
70 | this.model});
71 | }
72 |
--------------------------------------------------------------------------------
/lib/widgets/plugin/plugin_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:flutter/material.dart';
3 | import 'package:fml/widgets/package/package_model.dart';
4 | import 'package:fml/widgets/plugin/plugin_interface.dart';
5 | import 'package:fml/widgets/plugin/plugin_view.dart';
6 | import 'package:fml/widgets/reactive/reactive_view.dart';
7 | import 'package:fml/widgets/viewable/viewable_model.dart';
8 | import 'package:xml/xml.dart';
9 | import 'package:fml/widgets/widget/model.dart';
10 | import 'package:fml/helpers/helpers.dart';
11 |
12 | class PluginModel extends ViewableModel implements IPlugin {
13 |
14 | @override
15 | PackageModel? get package {
16 | if (_package == null) return null;
17 | var model = scope?.findModel(_package!);
18 | if (model is PackageModel) return model;
19 | return null;
20 | }
21 | String? _package;
22 |
23 | // holds the plugin eval string
24 | @override
25 | String? get plugin => _plugin;
26 | String? _plugin;
27 |
28 | PluginModel(Model super.parent, super.id);
29 |
30 | static PluginModel fromXml(Model parent, XmlElement xml) {
31 |
32 | PluginModel model = PluginModel(parent, Xml.get(node: xml, tag: 'id'));
33 | model.deserialize(xml);
34 | return model;
35 | }
36 |
37 | /// Deserializes the FML template elements, attributes and children
38 | @override
39 | void deserialize(XmlElement xml) {
40 |
41 | // deserialize
42 | super.deserialize(xml);
43 |
44 | // plugin properties
45 | _plugin = Xml.get(node: xml, tag: fromEnum('plugin'))?.trim();
46 | _package = _plugin?.split(".").first.trim();
47 | }
48 |
49 | @override
50 | Widget? build() => package?.build(id, scope, plugin);
51 |
52 | @override
53 | Widget getView({Key? key}) {
54 | var view = PluginView(this);
55 | return isReactive ? ReactiveView(this, view) : view;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/lib/token/token.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'dart:convert';
3 | import 'package:fml/log/manager.dart';
4 | import 'package:jaguar_jwt/jaguar_jwt.dart';
5 | import 'package:fml/helpers/helpers.dart';
6 |
7 | // Json web token - oauth2
8 | class Jwt {
9 | bool valid = false;
10 | final String token;
11 | final Map claims = {};
12 |
13 | Jwt(this.token, {bool validateAge = false, bool validateSignature = false}) {
14 | valid = false;
15 | try {
16 | //final JwtClaim decClaimSet = verifyJwtHS256Signature(token, key);
17 |
18 | var parts = token.split(".");
19 | Map json = jsonDecode(fromBase64(parts[0])!);
20 | json.forEach((key, value) {
21 | claims[key] = value.toString();
22 | });
23 |
24 | json = jsonDecode(fromBase64(parts[1])!);
25 | json.forEach((key, value) {
26 | claims[key] = value.toString();
27 | });
28 |
29 | valid = true;
30 | } catch (e) {
31 | Log().exception(e);
32 | }
33 | }
34 |
35 | factory Jwt.encode(String key, Map claims,
36 | {String subject = "jwt",
37 | String issuer = "fml.client",
38 | List? audience,
39 | int shelflife = 60}) {
40 | // we could have done this quite simply ourselves, however, for the sake of time, use package
41 | // future todo - encode ourselves
42 | final myClaims = JwtClaim(
43 | subject: subject,
44 | issuer: issuer,
45 | audience: audience,
46 | otherClaims: claims,
47 | maxAge: Duration(minutes: shelflife));
48 | String token = issueJwtHS256(myClaims, key);
49 | return Jwt(token);
50 | }
51 |
52 | factory Jwt.decode(String token,
53 | {bool validateSignature = false, validateAge = false}) {
54 | return Jwt(token,
55 | validateSignature: validateSignature, validateAge: validateAge);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/hive/data.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/hive/database.dart';
3 | import 'package:fml/crypto/crypto.dart';
4 | import 'package:fml/helpers/helpers.dart';
5 |
6 | String _cacheHashKey = 'FUQK70bxp6e3dUeyXqqNjPbDLhDfYTA1';
7 |
8 | class Data {
9 | static String tableName = "DATA";
10 |
11 | final Map _map = {};
12 |
13 | String get key => _map["key"];
14 | String? get value => _map["value"];
15 | int? get expires => _map["expires"];
16 |
17 | Data({String? key, String? value, int? expires}) {
18 | key ??= newId();
19 |
20 | // encrypted key
21 | if (key.length > 256) {
22 | key = Cryptography.hash(key: _cacheHashKey, text: key);
23 | }
24 |
25 | _map["key"] = key;
26 | _map["value"] = value ?? "";
27 | _map["expires"] = expires ?? 0;
28 | }
29 |
30 | Future insert() async =>
31 | (await Database.insert(tableName, key, _map) == null);
32 | Future update() async =>
33 | (await Database.update(tableName, key, _map) == null);
34 | Future delete() async =>
35 | (await Database.delete(tableName, key) == null);
36 |
37 | static Future deleteAll() async =>
38 | (await Database.deleteAll(tableName) == null);
39 |
40 | static Data? _fromMap(dynamic map) {
41 | Data? data;
42 | if (map is Map) {
43 | data = Data(
44 | key: fromMap(map, "key"),
45 | value: fromMap(map, "value"),
46 | expires: fromMapAsInt(map, "expires"));
47 | }
48 | return data;
49 | }
50 |
51 | static Future find(String key) async {
52 | // encrypted key
53 | if (key.length > 256) {
54 | key = Cryptography.hash(key: _cacheHashKey, text: key);
55 | }
56 |
57 | Map? entry = await Database.find(tableName, key);
58 | Data? data = _fromMap(entry);
59 | return data;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | 3.0.0+16
2 | - Attempt to resolve anaysis issue for "unknown platforms"
3 | - Added Icon Change Option
4 | - Added ApplicationType.branded functionality
5 | - Updated packages
6 |
7 | 3.1.1+21
8 | - Miscellaneous fixes
9 |
10 | 3.0.0+15
11 | - Attempt to resolve anaysis issue for "unknown platforms"
12 |
13 | - 3.0.0+14
14 | - Attempt to resolve anaysis issue for "unknown platforms"
15 | -
16 | 3.0.0+13
17 | - Attempt to resolve anaysis issue for "unknown platforms"
18 |
19 | 3.0.0+13
20 | - Attempt to resolve anaysis issue for "unknown platforms"
21 |
22 | - 3.0.0+12
23 | - Attempt to resolve anaysis issue for "unknown platforms"
24 |
25 | - 3.0.0+11
26 | - Attempt to resolve anaysis issue for "unknown platforms"
27 |
28 | 3.0.0+10
29 | - Attempt to resolve anaysis issue for "unknown platforms"
30 |
31 | 3.0.0+9
32 | - mods to README file
33 | -
34 | 3.0.0+8
35 | - mods to README file
36 | -
37 | 3.0.0+7
38 | - mods to README file
39 |
40 | 3.0.0+6
41 | - renamed example folder
42 | -
43 | 3.0.0+5
44 | - Changes to README.md
45 | - Attempt to resolve anaysis issue for "unknown platforms"
46 |
47 | 3.0.0+4
48 | - Changes to README.md
49 |
50 | 3.0.0+3
51 | - Changes to README.md
52 |
53 | 3.0.0+2
54 | - Readme file updates
55 | - Changes to pubspec.yaml (platform directive)
56 |
57 | 3.0.0+1
58 | - Readme file updates
59 | -
60 | 3.0.0
61 | - Packaged FML Engine
62 | - Significant modifications to base engine
63 | 1.3.0
64 | - To-Do
65 |
66 | 1.2.3
67 | - To-Do
68 |
69 | 1.2.0
70 | - Added EDITOR widget for code editing in FML apps.
71 | - Added FMLPad sample app built in FML to default package.
72 | - Added TYPEAHEAD widget to sepereate out SELECT.
73 | - Added windows support for CAMERA
74 | - Added STASH.clear() event.
75 | - Improved id.syntax consistency.
76 | - Added save, complete, validate, and clear to FORM
77 | - Added expanding and multiline features to INPUT
78 | - Improved behaviour of TEXT and BOX in scrollers.
79 | - Added alternating color and default sort to TABLE
80 |
81 |
--------------------------------------------------------------------------------
/lib/mirror/asset.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/log/manager.dart';
3 | import 'package:xml/xml.dart';
4 | import 'package:fml/datasources/http/http.dart';
5 | import 'package:fml/helpers/helpers.dart';
6 |
7 | class Asset {
8 | String? uri;
9 | String? type;
10 |
11 | String? _name;
12 | String? get name {
13 | return _name;
14 | }
15 |
16 | set name(String? s) {
17 | if (s != null) s = s.toLowerCase();
18 | if (s != _name) {
19 | _name = s;
20 | }
21 | }
22 |
23 | double? _epoch;
24 | double? get epoch {
25 | return _epoch;
26 | }
27 |
28 | set epoch(double? e) {
29 | if (e != _epoch) {
30 | _epoch = e;
31 | }
32 | }
33 |
34 | deserialize(XmlElement xml) {
35 | String tag = 'uri';
36 | uri = Xml.get(node: xml, tag: tag);
37 |
38 | tag = 'type';
39 | type = Xml.get(node: xml, tag: tag);
40 |
41 | tag = 'name';
42 | name = Xml.get(node: xml, tag: tag);
43 |
44 | tag = 'updated';
45 | String? updated = Xml.get(node: xml, tag: tag);
46 | if (isNumeric(updated)) epoch = toDouble(updated);
47 | }
48 | }
49 |
50 | class Assets {
51 | List list = [];
52 |
53 | deserialize(XmlElement xml) {
54 | Iterable assetNodes = xml.findElements("Asset", namespace: "*");
55 | for (XmlElement assetNode in assetNodes) {
56 | Asset asset = Asset();
57 | asset.deserialize(assetNode);
58 | list.add(asset);
59 | }
60 | }
61 |
62 | load(String url) async {
63 | list.clear();
64 |
65 | // perform inventory
66 | final response = await Http.get(url);
67 |
68 | // error?
69 | if (!response.ok) {
70 | Log().error('Error calling mirror $url. ${response.statusCode} ${response.statusMessage}');
71 | return;
72 | }
73 |
74 | // parse
75 | XmlDocument? document = Xml.tryParse(response.body);
76 | if (document != null) deserialize(document.rootElement);
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/lib/datasources/detectors/biometrics/biometrics_detector_model.dart:
--------------------------------------------------------------------------------
1 | // © COPYRIGHT 2022 APPDADDY SOFTWARE SOLUTIONS INC. ALL RIGHTS RESERVED.
2 | import 'package:fml/data/data.dart';
3 | import 'package:fml/datasources/detectors/detector_interface.dart';
4 | import 'package:fml/log/manager.dart';
5 | import 'package:fml/datasources/detectors/detector_model.dart';
6 | import 'package:fml/widgets/widget/model.dart';
7 | import 'package:xml/xml.dart';
8 | import 'biometrics_detector.dart';
9 | import 'package:fml/helpers/helpers.dart';
10 |
11 | import 'package:fml/datasources/detectors/image/detectable_image.web.dart'
12 | if (dart.library.io) 'package:fml/datasources/detectors/image/detectable_image.vm.dart'
13 | if (dart.library.html) 'package:fml/datasources/detectors/image/detectable_image.web.dart';
14 |
15 | class BiometricsDetectorModel extends DetectorModel implements IDetectable {
16 | BiometricsDetectorModel(super.parent, super.id);
17 |
18 | static BiometricsDetectorModel? fromXml(Model parent, XmlElement xml) {
19 | BiometricsDetectorModel? model;
20 | try {
21 | model = BiometricsDetectorModel(parent, Xml.get(node: xml, tag: 'id'));
22 | model.deserialize(xml);
23 | } catch (e) {
24 | Log().exception(e, caller: 'biometrics.Model');
25 | model = null;
26 | }
27 | return model;
28 | }
29 |
30 | @override
31 | void detect(DetectableImage image, bool streamed) async {
32 | if (!busy) {
33 | busy = true;
34 |
35 | count++;
36 | Payload? payload = await IBiometricsDetector().detect(image);
37 | if (payload != null) {
38 | Data data = Payload.toData(payload);
39 | await onDetected(data);
40 | } else if (!streamed) {
41 | await onDetectionFailed(Data(data: [
42 | {
43 | "message":
44 | "Biometrics detector $id failed to detect any faces in the supplied image"
45 | }
46 | ]));
47 | }
48 |
49 | busy = false;
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------