Skip to content

V- Modal AI: Visual Video / Image Search - Flutter Video SDK

Release Flutter SDK from be13b2ca87ef7e877c8bf7f6a76f6eedf4e9c88c

vmodal-release-app121a6795ff47
diff --git a/.gitleaks.toml b/.gitleaks.toml
index e57241f..6cacb94 100644
--- a/.gitleaks.toml
+++ b/.gitleaks.toml
@@ -5,6 +5,11 @@ useDefault = true
description = "Internal implementation plans contain documented credential-pattern examples"
paths = ['''(^|/)uinterface/sdk_flutter/docs/dev_plan(_step)?\.md$''', '''^docs/dev_plan(_step)?\.md$''']
+[[allowlists]]
+description = "Unpublished Flutter task plan contains a documented credential-pattern example"
+targetRules = ["generic-api-key"]
+paths = ['''^docs/todo/dev_plan\.md$''']
+
[[allowlists]]
description = "Generated Flutter build outputs are excluded from source secret detection"
paths = ['''(^|/)build/''']
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 77f0736..da81308 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+----------------------------------------------------------
+date: 2026-09-23
+commit_hash: pending
+title: Add account-scoped Framebase Flutter example
+summary:
+ - Added offline Firebase-style sign-in, VMODAL session validation and refresh, and per-user archive storage.
+ - Added Flutter example checks to the SDK release workflow and restored its secret scan.
+
----------------------------------------------------------
date: 2026-09-05
commit_hash: 0f70f90
diff --git a/README.md b/README.md
index c055ddf..a4ff864 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@
| 📱 | **Demo app and community** | [Visit r/v_modal on Reddit](https://www.reddit.com/r/v_modal/) |
| 🔑 | **Get an API key** | [Request a VModal API key](https://v-modal.com/page/contact.ts) |
-<img src="https://shorturl.at/hSnss" alt="A wall of searchable video moments and developer screens" width="100%">
+<img src="readme_assets/dev_homepage.jpg" alt="A wall of searchable video moments and developer screens" width="100%">
<p align="center"><em>Turn every video library into an experience your users can explore.</em></p>
@@ -35,7 +35,7 @@ VModal brings multimodal video search and mobile-friendly uploads to Dart with a
| Your Flutter experience | VModal gives you |
|---|---|
| “Find the cyclist in the red jacket” | Semantic video and image search |
-| Search words spoken or shown on screen | ASR and OCR search sources |
+| Search words spoken or shown on screen | AUDIO and TEXT search sources |
| Upload from a picker or camera flow | Streamed, signed uploads with live progress |
| A cancel button that really cancels | Per-operation cancellation tokens |
| Collection and indexing screens | Typed collection, index, usage, and image resources |
diff --git a/RELEASE_METADATA b/RELEASE_METADATA
index 607d6c3..dce3e75 100644
--- a/RELEASE_METADATA
+++ b/RELEASE_METADATA
@@ -1 +1 @@
-Source-vmx-api: c1099511b66087a5958b2c1a0f814f60271c9c42
+Source-vmx-api: be13b2ca87ef7e877c8bf7f6a76f6eedf4e9c88c
diff --git a/SOURCE_MANIFEST.sha256 b/SOURCE_MANIFEST.sha256
index ac0f572..8832d5d 100644
--- a/SOURCE_MANIFEST.sha256
+++ b/SOURCE_MANIFEST.sha256
@@ -1,17 +1,17 @@
e789cd4d1bed8a78ec8014c5c5913e300f81b63ea56a56aacb0dfec3b5e7ce2b ./.flutter-version
a3e3ce18f80b46587bcd529d13e456d10d97dd5e4a3f15e8e1a18894961120b1 ./.github/workflows/publish.yml
-a98f72526420d47e76b9b4e67ac86acd06b7088ad1f4c35617b11b09e59346ea ./.gitleaks.toml
+f8944a946de6f0d751d0de3277b9fd65150a26bac629030ac10c8c9772c06574 ./.gitleaks.toml
5115d06bd9913f466d50fcbf8ad8890372349060c54a4581f3481ea084cfdec6 ./.pubignore
-8029fe59e0b97941b26ac39dd9acb3376b5058ff4699d9799231d4f7a7e7a6e2 ./CHANGELOG.md
+4e7cdf7c1056e12cdee9ce274554d780f74b629354742e1dedd88b9ae600f612 ./CHANGELOG.md
37b7148216ac6090e36adfb699d642b8dd1e1b8ba99870e65e88733947a59fa6 ./LICENSE
-7f07eec6fd3d2a7c7cbe73c17e04d98b70befe575701f99ae30bb03e2c6527ef ./README.md
-5d409c083d816bc9fd6ae4963b93bc814ed3070d4a48754f993bea605dd18401 ./RELEASE_METADATA
+534637dca830a792f7e4bec16dddfea86c37f59e67e6e95c4651c9bd0ae0052b ./README.md
+fc8f1c5af5e91720ef64805028a2b78224857daba896df8c7bbf24cf61c2f947 ./RELEASE_METADATA
def7e4f643adff5b01b877b6a7fa5b2381612b693c0bf06bd232ee0f7197d342 ./analysis_options.yaml
-f4d01b95ad9f06bea1a40188ce640d8a749fb7d006c4c2202f9556dd727fc846 ./build.sh
+f213bba0a0fe69ef33cbcf31e63fe210ec813287436bd571e35a49e4027228c4 ./build.sh
4f18642680fb433554a5523d00bd99e0d650af340bcaebe628f59f63ac84e458 ./dartdoc_options.yaml
75461620cf3a062f4dad10e034952b82cca461b483788de1f46c539aca8b0f0f ./doc/manage_api_key.md
a66d39da0983a994474fa516f81fd41bbb131efbd69c955891a41781a76daf24 ./doc/performance.md
-741613bd158555e47a317e7c150081ce467b8dd869a843f6c9acdec931981228 ./doc/release.md
+71c001988597d223eeeef89b0ed33a3fb418ea949df4247f8903c74198f964a4 ./doc/release.md
616b3b20c5166ed48e1d6d8ba48bf34f1cad7c11dcd88ad8276c416faf30200b ./doc/sdk_contract.md
797404fa5975951d5ddb0ee4fde4db16d6ece935c530adcd4ad5591a2fd7ef06 ./doc/sdk_doc.md
c0f878afdfd9f8b9914d60ce1c7bc15a54d2c8631826a3a6d17907d4c2ada846 ./doc/search_app.md
@@ -188,7 +188,175 @@ cd5b582104b7f453d7f1e628f633d3f89a199f52cc6cec0b4c083e5526e8a967 ./example/04_e
cb335a6997ddec7208a31edea88cbf7df3a5af67d891116a54ff74fab4bf37b4 ./example/04_example/test_driver/integration_test.dart
332c6cf3f7ec27c02ef4217bf01cdacf64e20ad49e03c6024f050c4d6558221d ./example/04_example/tool/dev_run.sh
09a4d126420e89e9f407c20a064b9ef9a01fbbb82d24d94c23ccb561b1e5cb8a ./example/04_example/tool/shoot.sh
-705b7e4ed181abc90e877b79299888c17d01a11143fd26f372ba3139071ed966 ./example/readme.md
+4ecc92b82356d3fc31b7573caa8b9608dafb3af44dfe6f99b9f3ab93b4693500 ./example/05_framebase/.metadata
+bc001543e1418412ce7879a5c46d40ef1b3c485d8ba2b9a343bf7104b17e360c ./example/05_framebase/LICENSE
+559a8b6846e28399e68511e778cb7ea4b0390cf38fd87a9936414711bca72947 ./example/05_framebase/MEDIA_SOURCES.md
+b66d4b075c8ff54eeda6786073344a3b5fb34a699da638a49a9b6aec5e86b7d2 ./example/05_framebase/README.md
+e0ea485cfdbc3e12b93efb8679a5ea73ebfe20ea4ca0c473dc594fc2fb274ed5 ./example/05_framebase/analysis_options.yaml
+6939878d0e417b29be6738e9c57772fc8a22a9aab5db39ae7fa867848d09d089 ./example/05_framebase/android/app/build.gradle.kts
+4e4a0e0726baf45d2d878ea5d0e0666e08ea6e9dbdc33ecd2a74a3525cf5ba51 ./example/05_framebase/android/app/src/debug/AndroidManifest.xml
+c9c0bf4eec9782a325a05955947e6c2b40f86064d24cd2e20fc998ba55bd97c9 ./example/05_framebase/android/app/src/main/AndroidManifest.xml
+5995c8ace09b2dcf4e53829a2b24c2151746d1d8576477272a0e3bca8c66e08c ./example/05_framebase/android/app/src/main/kotlin/app/framebase/search/MainActivity.kt
+7ca6d5cec2169c5a98661a119db23a6f3399c8fef2256ff04f3a642831282478 ./example/05_framebase/android/app/src/main/res/drawable-v21/launch_background.xml
+3c0200be8c1345f7c96c859b89c082468f9a9d327f29009c6d14071bf54ea10a ./example/05_framebase/android/app/src/main/res/drawable/ic_framebase.xml
+94433756fe10005ddd6fc55cc5c0b1e9f3c10b66a08ceac795ece6713d34e28a ./example/05_framebase/android/app/src/main/res/drawable/launch_background.xml
+6a7c8f0d703e3682108f9662f813302236240d3f8f638bb391e32bfb96055fef ./example/05_framebase/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
+c7c0c0189145e4e32a401c61c9bdc615754b0264e7afae24e834bb81049eaf81 ./example/05_framebase/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
+e14aa40904929bf313fded22cf7e7ffcbf1d1aac4263b5ef1be8bfce650397aa ./example/05_framebase/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
+4d470bf22d5c17d84edc5f82516d1ba8a1c09559cd761cefb792f86d9f52b540 ./example/05_framebase/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
+3c34e1f298d0c9ea3455d46db6b7759c8211a49e9ec6e44b635fc5c87dfb4180 ./example/05_framebase/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+8c5bad5152f217e837519f9c15211d19f39bd45f5f67faf6dd81cb4b299e518f ./example/05_framebase/android/app/src/main/res/values-night/styles.xml
+937d7c82f539c72eb94fd3a3773f29b3d3fef1997213c92cb632298cedf4bda9 ./example/05_framebase/android/app/src/main/res/values/styles.xml
+30b0832ed8b92dfbd6ae2abfa939ccf26333d37600056b1572bd4a397a18a74b ./example/05_framebase/android/app/src/profile/AndroidManifest.xml
+6a26dba2cb8dfba1e74f540b0d17a89d96c1301d3c3bfda14348bed257fddcba ./example/05_framebase/android/build.gradle.kts
+4922e39cd2ea910bd97156fd4320b0be9217df262fc45435ce408bad534a20d0 ./example/05_framebase/android/gradle.properties
+297c9e63b6fa6e7e8b221900fa1787c1a0e38869d8957da66389fd0f6b00f78e ./example/05_framebase/android/gradle/wrapper/gradle-wrapper.properties
+a9b5756048f668d4ebf355116678fd334cd5f2169b7d4518ad19b8df14d3af36 ./example/05_framebase/android/settings.gradle.kts
+b24f1812584816958afcf22e22d08e44318c5e51651e25d2438efdde389b33b1 ./example/05_framebase/assets/fonts/InstrumentSans.ttf
+bc29b497c4e8316b2d248322a9cea670c2f0afc24ae0eb7bbaa54e02e00eebab ./example/05_framebase/assets/fonts/OFL.txt
+811bade93f7ccf4d9e7bec6adf893ac91552471036a6010703f9ea87f04084b2 ./example/05_framebase/assets/stills/downtown_traffic.jpg
+52e714101edb1ee2989dc7f56d878a3d453047b646f1fa182269b0df62041218 ./example/05_framebase/assets/stills/evening_junction.jpg
+a7d35dcde3a034dff69a710c710459d9a4ac340c365f3c2f6c04b38a5187ac5b ./example/05_framebase/assets/stills/neighborhood_crossing.jpg
+1b706d824f82e41272811c6453267c1dd0796e3969e48dec71ed039b720ef308 ./example/05_framebase/assets/videos/downtown_traffic.mp4
+4e92533b5bec8b1e9a567e7bdbccfb600d83678330219d5054c09cc986f833a8 ./example/05_framebase/assets/videos/evening_junction.mp4
+d799fb9a6924271f79e147e90382b6e6990d1611872d48127d1fb5c991072503 ./example/05_framebase/assets/videos/neighborhood_crossing.mp4
+da12038f9b2688a8a26160fea2609fa8fcb11421448c109f09c0f573efe7698d ./example/05_framebase/ios/Flutter/AppFrameworkInfo.plist
+a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/05_framebase/ios/Flutter/Debug.xcconfig
+a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/05_framebase/ios/Flutter/Release.xcconfig
+8a715a1a59f9a2b46e9f772f855b50305f1eaf6fe6dd7841b16a07fca15c3f5f ./example/05_framebase/ios/Runner.xcodeproj/project.pbxproj
+7f3b00b5c3fdb45242d7b87e1e5c4e25d1fa8129a16c94295ecc4e8ea2235c5f ./example/05_framebase/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/05_framebase/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/05_framebase/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+2dd28b879e66081e28a3324cf2bee7ab2f70be9a3e50e08926b7366dadff7d6e ./example/05_framebase/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+46c3c9702ff7c5584e11c954d943cfb6e07fb26e3fbd072ddbc0f388aa352de1 ./example/05_framebase/ios/Runner.xcworkspace/contents.xcworkspacedata
+dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/05_framebase/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/05_framebase/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+451c6d9ba0a2b3ff43092ea349c60fa79a91f1158b915eb29dbdd357cb95d7b8 ./example/05_framebase/ios/Runner/AppDelegate.swift
+3b1e214f466ffedff74baa5598ad5c4421130eea6bc8d57b8fe23435e8280ae4 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+7770183009e914112de7d8ef1d235a6a30c5834424858e0d2f8253f6b8d31926 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+cab10a0d391ec5bc09ef50ce49e8ad401cee7ef03707ec0923a222c5c2b3d212 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+c6e6d3b215ae744a9c391f4c4d44157eff5e739d6ad6c39f9bfa5df66dddd267 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+5dee24dc104ac76dc162e42ae0beb163d426bf365562ee28ba7b3ad368559a60 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+a9b21eb6f4271385655a8771f76e29eef8c1107d7879cbcfc567e6619d1f716a ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+e677d701ffe4af7bc2935098d6b3984cc9ab7ace573e6900955a5535b12410cf ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+7c61c42fc7b657d9cf314d32a4ec458f0647c3aaf360be1b9377857266ec2499 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+4209a49e44a92ec40a327d3455eb1b1c153ee83d75de1c2be0a12ab18b2ff9de ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+836c918cb613249eba0483a6b02fa3df3c1c0a89a315ee4d3b88509b83c7ab73 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+41c7d42f6e61f8fe7f30b1ffa2256aecbc9682be06d18c4a3062043e1a2e547c ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+5d7e5bdf01b93802bc973345b3a78c038907147625035952a08a115a563b7f81 ./example/05_framebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+ccc7950fd5f5b82067c85f667940a9d59189151460761ece8098ca78daa19469 ./example/05_framebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/05_framebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/05_framebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/05_framebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
+a985b626c4f7546a8ba392d135e9226c3547c8e2b46895f5f2bdf40d7b14ef9f ./example/05_framebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+857e61203b3deafb05766d8fcda898b86a7cb6f3d5e385ecc9926c4d698215e9 ./example/05_framebase/ios/Runner/Base.lproj/LaunchScreen.storyboard
+fd367b6c43006d61b730f674970dd48b9f662c8f2264e52ffc1558102a2c9f2d ./example/05_framebase/ios/Runner/Base.lproj/Main.storyboard
+0c9062393ec6a34696b7a091166b158edee84eeb69c513d37c9b187d87f68c49 ./example/05_framebase/ios/Runner/Info.plist
+1a8d11d01d1cc92c650c9c9ed35299240052d4683a15a719a2315ef44185e074 ./example/05_framebase/ios/Runner/Runner-Bridging-Header.h
+add68b905971dedfcc0d0b5b7118030de5925ba8c081ad9815463699e3a444ad ./example/05_framebase/ios/Runner/SceneDelegate.swift
+5e8f4908dacea6f29b2a790e4d38bf5fded69096063f9a27a2f21584d62b30c0 ./example/05_framebase/ios/RunnerTests/RunnerTests.swift
+38915e998b313d617db841f46ae5bf293a06bc813791ec3adb7dfd245ec549c1 ./example/05_framebase/pubspec.lock
+d127d3f4cd96b63ab036c263e488f8af91a5140be12768b0e3cd0904193676d5 ./example/05_framebase/pubspec.yaml
+5ac0550b52416cec8dd4f01d0cf8622dc696a235502aedbb7a291a13594eac02 ./example/05_framebase/readme_assets/library.png
+1af691525fbc6b8c558690bdc651d0bfc76b09116caa59835f27d552b456239e ./example/05_framebase/readme_assets/playback.png
+1fc9b69f52a19ed05d741b4cf71bea35daac8b684977fb73909c97a65b0f9d24 ./example/05_framebase/readme_assets/search.png
+3a485e1c7900795abfcb2dbb0edc4e7ac76a25faff2347345de9794648e8414b ./example/05_framebase/test/search_gateway_test.dart
+c783830af58111d94c3e78a705865468fa3ba8f59cc5bef833404d7ac3567119 ./example/05_framebase/test/widget_test.dart
+4ecc92b82356d3fc31b7573caa8b9608dafb3af44dfe6f99b9f3ab93b4693500 ./example/05_framebase_userlogin/.metadata
+bc001543e1418412ce7879a5c46d40ef1b3c485d8ba2b9a343bf7104b17e360c ./example/05_framebase_userlogin/LICENSE
+559a8b6846e28399e68511e778cb7ea4b0390cf38fd87a9936414711bca72947 ./example/05_framebase_userlogin/MEDIA_SOURCES.md
+ffad10dd1a5f7c885244e9ffd8e86fb2cc73468132ce71157e2da6d1464b0a0a ./example/05_framebase_userlogin/README.md
+e0ea485cfdbc3e12b93efb8679a5ea73ebfe20ea4ca0c473dc594fc2fb274ed5 ./example/05_framebase_userlogin/analysis_options.yaml
+6939878d0e417b29be6738e9c57772fc8a22a9aab5db39ae7fa867848d09d089 ./example/05_framebase_userlogin/android/app/build.gradle.kts
+4e4a0e0726baf45d2d878ea5d0e0666e08ea6e9dbdc33ecd2a74a3525cf5ba51 ./example/05_framebase_userlogin/android/app/src/debug/AndroidManifest.xml
+c9c0bf4eec9782a325a05955947e6c2b40f86064d24cd2e20fc998ba55bd97c9 ./example/05_framebase_userlogin/android/app/src/main/AndroidManifest.xml
+5995c8ace09b2dcf4e53829a2b24c2151746d1d8576477272a0e3bca8c66e08c ./example/05_framebase_userlogin/android/app/src/main/kotlin/app/framebase/search/MainActivity.kt
+7ca6d5cec2169c5a98661a119db23a6f3399c8fef2256ff04f3a642831282478 ./example/05_framebase_userlogin/android/app/src/main/res/drawable-v21/launch_background.xml
+3c0200be8c1345f7c96c859b89c082468f9a9d327f29009c6d14071bf54ea10a ./example/05_framebase_userlogin/android/app/src/main/res/drawable/ic_framebase.xml
+94433756fe10005ddd6fc55cc5c0b1e9f3c10b66a08ceac795ece6713d34e28a ./example/05_framebase_userlogin/android/app/src/main/res/drawable/launch_background.xml
+6a7c8f0d703e3682108f9662f813302236240d3f8f638bb391e32bfb96055fef ./example/05_framebase_userlogin/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
+c7c0c0189145e4e32a401c61c9bdc615754b0264e7afae24e834bb81049eaf81 ./example/05_framebase_userlogin/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
+e14aa40904929bf313fded22cf7e7ffcbf1d1aac4263b5ef1be8bfce650397aa ./example/05_framebase_userlogin/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
+4d470bf22d5c17d84edc5f82516d1ba8a1c09559cd761cefb792f86d9f52b540 ./example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
+3c34e1f298d0c9ea3455d46db6b7759c8211a49e9ec6e44b635fc5c87dfb4180 ./example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+8c5bad5152f217e837519f9c15211d19f39bd45f5f67faf6dd81cb4b299e518f ./example/05_framebase_userlogin/android/app/src/main/res/values-night/styles.xml
+937d7c82f539c72eb94fd3a3773f29b3d3fef1997213c92cb632298cedf4bda9 ./example/05_framebase_userlogin/android/app/src/main/res/values/styles.xml
+30b0832ed8b92dfbd6ae2abfa939ccf26333d37600056b1572bd4a397a18a74b ./example/05_framebase_userlogin/android/app/src/profile/AndroidManifest.xml
+6a26dba2cb8dfba1e74f540b0d17a89d96c1301d3c3bfda14348bed257fddcba ./example/05_framebase_userlogin/android/build.gradle.kts
+4922e39cd2ea910bd97156fd4320b0be9217df262fc45435ce408bad534a20d0 ./example/05_framebase_userlogin/android/gradle.properties
+297c9e63b6fa6e7e8b221900fa1787c1a0e38869d8957da66389fd0f6b00f78e ./example/05_framebase_userlogin/android/gradle/wrapper/gradle-wrapper.properties
+a9b5756048f668d4ebf355116678fd334cd5f2169b7d4518ad19b8df14d3af36 ./example/05_framebase_userlogin/android/settings.gradle.kts
+b24f1812584816958afcf22e22d08e44318c5e51651e25d2438efdde389b33b1 ./example/05_framebase_userlogin/assets/fonts/InstrumentSans.ttf
+bc29b497c4e8316b2d248322a9cea670c2f0afc24ae0eb7bbaa54e02e00eebab ./example/05_framebase_userlogin/assets/fonts/OFL.txt
+811bade93f7ccf4d9e7bec6adf893ac91552471036a6010703f9ea87f04084b2 ./example/05_framebase_userlogin/assets/stills/downtown_traffic.jpg
+52e714101edb1ee2989dc7f56d878a3d453047b646f1fa182269b0df62041218 ./example/05_framebase_userlogin/assets/stills/evening_junction.jpg
+a7d35dcde3a034dff69a710c710459d9a4ac340c365f3c2f6c04b38a5187ac5b ./example/05_framebase_userlogin/assets/stills/neighborhood_crossing.jpg
+1b706d824f82e41272811c6453267c1dd0796e3969e48dec71ed039b720ef308 ./example/05_framebase_userlogin/assets/videos/downtown_traffic.mp4
+4e92533b5bec8b1e9a567e7bdbccfb600d83678330219d5054c09cc986f833a8 ./example/05_framebase_userlogin/assets/videos/evening_junction.mp4
+d799fb9a6924271f79e147e90382b6e6990d1611872d48127d1fb5c991072503 ./example/05_framebase_userlogin/assets/videos/neighborhood_crossing.mp4
+da12038f9b2688a8a26160fea2609fa8fcb11421448c109f09c0f573efe7698d ./example/05_framebase_userlogin/ios/Flutter/AppFrameworkInfo.plist
+a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/05_framebase_userlogin/ios/Flutter/Debug.xcconfig
+a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/05_framebase_userlogin/ios/Flutter/Release.xcconfig
+8a715a1a59f9a2b46e9f772f855b50305f1eaf6fe6dd7841b16a07fca15c3f5f ./example/05_framebase_userlogin/ios/Runner.xcodeproj/project.pbxproj
+7f3b00b5c3fdb45242d7b87e1e5c4e25d1fa8129a16c94295ecc4e8ea2235c5f ./example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+2dd28b879e66081e28a3324cf2bee7ab2f70be9a3e50e08926b7366dadff7d6e ./example/05_framebase_userlogin/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+46c3c9702ff7c5584e11c954d943cfb6e07fb26e3fbd072ddbc0f388aa352de1 ./example/05_framebase_userlogin/ios/Runner.xcworkspace/contents.xcworkspacedata
+dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+451c6d9ba0a2b3ff43092ea349c60fa79a91f1158b915eb29dbdd357cb95d7b8 ./example/05_framebase_userlogin/ios/Runner/AppDelegate.swift
+3b1e214f466ffedff74baa5598ad5c4421130eea6bc8d57b8fe23435e8280ae4 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+7770183009e914112de7d8ef1d235a6a30c5834424858e0d2f8253f6b8d31926 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+cab10a0d391ec5bc09ef50ce49e8ad401cee7ef03707ec0923a222c5c2b3d212 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+c6e6d3b215ae744a9c391f4c4d44157eff5e739d6ad6c39f9bfa5df66dddd267 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+5dee24dc104ac76dc162e42ae0beb163d426bf365562ee28ba7b3ad368559a60 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+a9b21eb6f4271385655a8771f76e29eef8c1107d7879cbcfc567e6619d1f716a ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+e677d701ffe4af7bc2935098d6b3984cc9ab7ace573e6900955a5535b12410cf ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+7c61c42fc7b657d9cf314d32a4ec458f0647c3aaf360be1b9377857266ec2499 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+4209a49e44a92ec40a327d3455eb1b1c153ee83d75de1c2be0a12ab18b2ff9de ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+836c918cb613249eba0483a6b02fa3df3c1c0a89a315ee4d3b88509b83c7ab73 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+41c7d42f6e61f8fe7f30b1ffa2256aecbc9682be06d18c4a3062043e1a2e547c ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+5d7e5bdf01b93802bc973345b3a78c038907147625035952a08a115a563b7f81 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
+ccc7950fd5f5b82067c85f667940a9d59189151460761ece8098ca78daa19469 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
+a985b626c4f7546a8ba392d135e9226c3547c8e2b46895f5f2bdf40d7b14ef9f ./example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+857e61203b3deafb05766d8fcda898b86a7cb6f3d5e385ecc9926c4d698215e9 ./example/05_framebase_userlogin/ios/Runner/Base.lproj/LaunchScreen.storyboard
+fd367b6c43006d61b730f674970dd48b9f662c8f2264e52ffc1558102a2c9f2d ./example/05_framebase_userlogin/ios/Runner/Base.lproj/Main.storyboard
+0c9062393ec6a34696b7a091166b158edee84eeb69c513d37c9b187d87f68c49 ./example/05_framebase_userlogin/ios/Runner/Info.plist
+1a8d11d01d1cc92c650c9c9ed35299240052d4683a15a719a2315ef44185e074 ./example/05_framebase_userlogin/ios/Runner/Runner-Bridging-Header.h
+add68b905971dedfcc0d0b5b7118030de5925ba8c081ad9815463699e3a444ad ./example/05_framebase_userlogin/ios/Runner/SceneDelegate.swift
+5e8f4908dacea6f29b2a790e4d38bf5fded69096063f9a27a2f21584d62b30c0 ./example/05_framebase_userlogin/ios/RunnerTests/RunnerTests.swift
+9970e371aa042196c5b632e83411dc081768256c35d168a892738365f8ad1459 ./example/05_framebase_userlogin/lib/data/archive_controller.dart
+dba0ac7c273f4c53187df1d4aa5a0709e87bab7b191dbee9f806f99f1569f780 ./example/05_framebase_userlogin/lib/data/search_gateway.dart
+83d703a4176d34d35472475bf37ccb38c30d655ce23a7f060db213c921248328 ./example/05_framebase_userlogin/lib/main.dart
+1f7958647977c5a6d8cc3b1b1f0079d8a5e4140a7e22544d7e830c40d176360f ./example/05_framebase_userlogin/lib/user/auth_adapter.dart
+4af30076d205211ac289d75fc583cdb37fcb937db4c79edc4f63e3ac579e5e06 ./example/05_framebase_userlogin/lib/user/login_page.dart
+d34a3e5ea1783adcaeac1bb3abb9c0760b7d2355279b9e442e78d93c70c0c728 ./example/05_framebase_userlogin/lib/user/mock_firebase_auth.dart
+5541327a114d32d64c874363767a7f2a627cbf4afe6834381dc786e0f451a5a1 ./example/05_framebase_userlogin/lib/user/user_collection.dart
+ce54d214a484937abf6f3de7b10283ce8fc51276bef7540985d12d0322de481c ./example/05_framebase_userlogin/lib/user/user_session_controller.dart
+60cdc7deba6d5bfd88abbdfb2738ecb25ed2ce4586e8a7193d7d43c5394e4ff8 ./example/05_framebase_userlogin/lib/user/vmodal_credential.dart
+38915e998b313d617db841f46ae5bf293a06bc813791ec3adb7dfd245ec549c1 ./example/05_framebase_userlogin/pubspec.lock
+d127d3f4cd96b63ab036c263e488f8af91a5140be12768b0e3cd0904193676d5 ./example/05_framebase_userlogin/pubspec.yaml
+5ac0550b52416cec8dd4f01d0cf8622dc696a235502aedbb7a291a13594eac02 ./example/05_framebase_userlogin/readme_assets/library.png
+1af691525fbc6b8c558690bdc651d0bfc76b09116caa59835f27d552b456239e ./example/05_framebase_userlogin/readme_assets/playback.png
+1fc9b69f52a19ed05d741b4cf71bea35daac8b684977fb73909c97a65b0f9d24 ./example/05_framebase_userlogin/readme_assets/search.png
+8b4e372b59e32cdc5e56a3cf823cf5d265262a73dacd750bf1e8798846c3fd29 ./example/05_framebase_userlogin/test/archive_controller_test.dart
+8d3c3ce3e9edb1e69bbea021ec4d0bdb5a0b7d574b87f791b48d0ecbbfc4ea20 ./example/05_framebase_userlogin/test/search_gateway_test.dart
+ccf1fb18ee188b3bd966d5ec0f2ad45ad1ad90ff46ebbafb3822bf1195cd2497 ./example/05_framebase_userlogin/test/user_collection_test.dart
+dac923d9ef8ee95a08920037e07ec43ad7b2da12996a8aaf273bb443c0bc477f ./example/05_framebase_userlogin/test/user_session_controller_test.dart
+ea227c1405876c237e4c88c851ce8223456e56999a98b1b39109a45a616689e0 ./example/05_framebase_userlogin/test/widget_test.dart
+bb2e66ce21a066b5331a8c6ee665f1a4d2fcb3451cde5ce2ba0e6fe492344ac0 ./example/readme.md
23756b83470b1f25f6a7e6b5a6270f123a5224e49fd8e2eda36001358951b688 ./install.sh
7becacd31a8d134fa435b39cd819798d5fbf58f89b9f30c50362e2dcf757aaed ./lib/src/adaptive_upload.dart
9464fff0c519a1ce70cddefb3e3eaa95d07b97ccdaf5b8381c01d7c88767ae83 ./lib/src/api_key_provider.dart
@@ -210,11 +378,15 @@ e4413678ceb7bdfc1f6aaa241c53d8ba2033fc5171dd0a30030b62946d14008e ./lib/src/vmod
14f02410389d19abb09ca40ff69c6267f3ad0b8b40ab115aa6e2c76bf43bfeef ./lib/vmodal_sdk_flutter.dart
72fff91181fd3e25fd9afd766930a67025205b61096fd35c55cbdd9a3178ecf0 ./pubspec.lock
5bdde8cb1c29076e2c3f9ac308f3786b3355873666f7d5c5384acb45ebe8701d ./pubspec.yaml
+387ec75b8a58410c403abd622bc6627d194a2fa4b839c549600cc0ea28b50f67 ./readme_assets/app1.png
+ecf9d38677ac502250e93353ce7784aa8685c725e73e5dcfc744a1f9d4eb0651 ./readme_assets/app2.png
+93db32456ccda95d5b5bfea658e6e1b8088dc65f0166517e5b1a46bf54028405 ./readme_assets/app3.png
+5ecf57fdb27bab2ba7966384beefe5c4641a257e4bfd3c9cbeb2c7f3d18fb08d ./readme_assets/app5.png
a80b38547f5d9ca1874f60e71c648e3fc12ab5f7cb88d1bead6d5b863d3c0245 ./readme_assets/dev_homepage.jpg
c56419d129059b64551e06f074e88ef62676f25938dc2a1fe28a6ab3f2ba8547 ./readme_assets/logo_vmodal_owl.jpeg
478b9ab42059ecf4b2bca27378a35a97b807877293ed43a66115169bb08451cc ./release_note.md
3198051c448338c5331baef7e17ff32bfbaf1265b59543a8aca2baf57513feed ./run.sh
-d2dfce0e68717f8626ecaadb4552f7471ced1dbdfe6a51182e0d62c24a1b718b ./security_check.sh
+b2baed242356b68d3396cace6e67993db2e4ef8eea89b63d9b68d1773368f870 ./security_check.sh
75d9810c9d50fd1224462aba8d2d1669cbfa094bd9cc0e5275f3a6a9f1364cb5 ./test.sh
be59599b9ba77d031e9b4bad7f8d5c59efd2687888c5b73be4fbea115902106b ./test/adaptive_upload_test.dart
002abcc5d95c0cf20375adefe4ee2472581a615e64f5726bf361dd5c679cdea7 ./test/auth_http_test.dart
@@ -228,13 +400,13 @@ d132b6dceb89804a47418245845547a25fcf8f89f56b292ee70a404d63364865 ./test/fakes.d
14368b598ece0ce9b2e249148a10a92f2c80e38427c077013a1515826f4365bd ./test/fixtures/routes_contract.json
593b356ac3431de80e03e7a0e2f1df0d29589140f44746468213c1cac1c35bbe ./test/multipart_upload_test.dart
348b9581f6262acaaf96012a3d57685b0b45c3663c1497f14135663de7a60954 ./test/new_api_surface_test.dart
-a1cc368fa8cb25576cdc6559520a831e47cadcd1455da2bf5b01c3792fd7165b ./test/regression_manifest_test.dart
+09718731393326d8ce581a46abd8ff6ef2341e3390dc7435b3af725616af13fe ./test/regression_manifest_test.dart
8c87a4645a2e329477d070277f64b617da14ac90163bb734fbb5326c1a97a5c3 ./test/resources_models_test.dart
8619ce113bb8669612f9a2a16b1b334ac68435c5972e84828a789511467fcb77 ./test/shell_scripts_test.dart
efe4f1158e7d4b9ca8e57f3538ce296279817292a4356c1399cf5f2cbae4c52d ./test/transcode_upload_test.dart
b94c0fef25560e387c4de5de0e4032fce73aa22b23a4bf38594ea6ff241d914c ./test/transport_test.dart
c4aa3c091992668ee531412a7fc783106769df7d75147eb06271492027b0c100 ./test/upload_test.dart
-a4660a3baa1abea95eff6878da0722a4ec1319936ac8621a1e53909300597f9c ./test/workflow_layout_test.dart
+ae7562e46bf8867f9c5021efa8e3828cf54402f2132dfe3e4c1ecd1cb1d2f83a ./test/workflow_layout_test.dart
406de1350b79662fcaf007cb0cacd7a6b71b83815dc7cd3c7b561fcfba5600a3 ./tool/check_route_sync.dart
d5f5f9246656a5c275c5ab5863dbf3945d8ef6b1c9042c9d1912cfafce93646f ./tool/flutter_checksums.txt
24ea8e3013e0ed3531ff2aa3c86ad5332bf315d3d26f6a0814d2d6c84c5dade2 ./tool/live_cctv_test.dart
diff --git a/build.sh b/build.sh
index e34c842..a46bc6c 100755
--- a/build.sh
+++ b/build.sh
@@ -44,6 +44,7 @@ sdk_pub_get() {
(cd example/03_cctv && sdk_flutter pub get)
(cd example/04_example && sdk_flutter pub get)
(cd example/05_framebase && sdk_flutter pub get)
+ (cd example/05_framebase_userlogin && sdk_flutter pub get)
}
sdk_format() {
@@ -51,7 +52,7 @@ sdk_format() {
## Usage:
bash build.sh format
'
- sdk_dart format --output=none --set-exit-if-changed lib test tool example/01_full_app/lib example/01_full_app/test example/02_users/lib example/02_users/test example/03_cctv/bin example/03_cctv/lib example/03_cctv/test example/04_example/lib example/04_example/test example/04_example/integration_test example/05_framebase/lib example/05_framebase/test
+ sdk_dart format --output=none --set-exit-if-changed lib test tool example/01_full_app/lib example/01_full_app/test example/02_users/lib example/02_users/test example/03_cctv/bin example/03_cctv/lib example/03_cctv/test example/04_example/lib example/04_example/test example/04_example/integration_test example/05_framebase_userlogin/lib example/05_framebase_userlogin/test
}
sdk_analyze() {
@@ -64,7 +65,7 @@ sdk_analyze() {
(cd example/02_users && sdk_flutter analyze)
(cd example/03_cctv && sdk_flutter analyze)
(cd example/04_example && sdk_flutter analyze)
- (cd example/05_framebase && sdk_flutter analyze)
+ (cd example/05_framebase_userlogin && sdk_flutter analyze)
}
sdk_test() {
@@ -77,7 +78,7 @@ sdk_test() {
(cd example/02_users && sdk_flutter test)
(cd example/03_cctv && sdk_flutter test)
(cd example/04_example && sdk_flutter test)
- (cd example/05_framebase && sdk_flutter test)
+ (cd example/05_framebase_userlogin && sdk_flutter test)
}
sdk_example_android() {
@@ -86,6 +87,7 @@ sdk_example_android() {
bash build.sh example_android
'
(cd example/01_full_app && sdk_flutter build apk --debug)
+ (cd example/05_framebase_userlogin && sdk_flutter build apk --debug)
}
sdk_example_ios() {
@@ -95,6 +97,7 @@ sdk_example_ios() {
'
[[ "$(uname -s)" == 'Darwin' ]] || { echo 'iOS builds require a configured macOS runner.' >&2; return 2; }
(cd example/01_full_app && sdk_flutter build ios --simulator --debug --no-codesign)
+ (cd example/05_framebase_userlogin && sdk_flutter build ios --simulator --debug --no-codesign)
}
sdk_package() {
@@ -140,7 +143,7 @@ sdk_clean() {
(cd example/02_users && sdk_flutter clean)
(cd example/03_cctv && sdk_flutter clean)
(cd example/04_example && sdk_flutter clean)
- (cd example/05_framebase && sdk_flutter clean)
+ (cd example/05_framebase_userlogin && sdk_flutter clean)
}
sdk_help() {
diff --git a/doc/release.md b/doc/release.md
index e64c05d..924e23e 100644
--- a/doc/release.md
+++ b/doc/release.md
@@ -16,11 +16,16 @@ The release workflow is manually dispatched during development. Exact-candidate
comments so they can be restored later, but they do not gate the fast release
path. Jobs use the normal workflow checkout, while GitHub's built-in
`GITHUB_SHA` is recorded in artifacts, public commits, tags, and documentation
-metadata for traceability. The secret scanner and protected release approval
-are also disabled during this development mode. Optional pub.dev publication is
+metadata for traceability. A secret-detection job scans the Flutter SDK tree
+before source and documentation publication. Protected release approval remains
+disabled during this development mode. Optional pub.dev publication is
triggered only by the exported version tag and uses OIDC trusted publishing; no
long-lived pub token is stored.
+The offline job also analyzes and tests `example/05_framebase_userlogin` with
+fake auth and transport. Its real Firebase and credential issuer integration
+requires separate device verification once that server contract exists.
+
After the tested SDK source is published, the same workflow installs the pinned
Flutter toolchain, regenerates `docs_sdk` from the public Dart library, and
publishes the immutable class/method reference to the `gh-pages` branch of the
@@ -30,7 +35,7 @@ fails when backend hosts, route prefixes, or implementation-only types appear.
The workflow pushes that branch directly, without opening a pull request, and
configures GitHub Pages for branch-based (`legacy`) publishing. It verifies the
recorded `GITHUB_SHA` at `https://v-modal.github.io/vmodal_sdk_flutter/`. The
-deployment depends on both source publication and the current no-op
+deployment depends on both source publication and the active
secret-detection job. The private monorepo maintainer handbook owns the local
generation commands because the generator is intentionally absent from the
standalone public package.
diff --git a/example/05_framebase/MEDIA_SOURCES.md b/example/05_framebase/MEDIA_SOURCES.md
index 27f2da1..9887900 100644
--- a/example/05_framebase/MEDIA_SOURCES.md
+++ b/example/05_framebase/MEDIA_SOURCES.md
@@ -1,6 +1,6 @@
# Street archive — media provenance
-All three videos are licensed stock footage from Pexels, not recordings made by the app author. They form one theme: street intersections, pedestrians, buses, and city traffic. No source audio is included, so this app tests visual search only, not ASR or audio search.
+All three videos are licensed stock footage from Pexels, not recordings made by the app author. They form one theme: street intersections, pedestrians, buses, and city traffic. No source audio is included, so this app tests visual search only, not AUDIO or audio search.
| Local video | Author / original | App edit |
| --- | --- | --- |
diff --git a/example/05_framebase/README.md b/example/05_framebase/README.md
index ba53f06..e2f251a 100644
--- a/example/05_framebase/README.md
+++ b/example/05_framebase/README.md
@@ -1,20 +1,20 @@
# Framebase
Framebase is a product-style Flutter example for finding moments inside a
-small travel-video library with natural-language or reference-photo search.
-It demonstrates the complete mobile flow: runtime authentication,
-metadata-aware streamed uploads, asynchronous indexing, trip-scoped grouped
-results, and playback of the local source video at the returned timestamp.
+small video library with natural-language visual search. It demonstrates the
+complete mobile flow: runtime authentication, streamed uploads, asynchronous
+indexing, grouped frame results, and playback of the local source video at the
+returned timestamp.
-The bundled library contains three short city-street recordings. Filter it by
-city, try a query such as `A bus on a city street`, or choose a reference photo
-to retrieve visually similar moments from the selected trip.
+The bundled library contains three short city-street recordings. Try searches
+such as `A bus on a city street`, `People crossing the street`, or
+`Cars at an intersection`.
## Screenshots
-| Travel library | Selected trip | Reference-photo results |
+| Library | Grouped search results | Source playback |
| --- | --- | --- |
-| ![Framebase travel-video library](readme_assets/library.png) | ![Singapore trip selected in the library](readme_assets/trip.png) | ![Reference photo matched inside the Singapore trip](readme_assets/photo_search.png) |
+| ![Framebase street-video library](readme_assets/library.png) | ![Bus search results grouped by source video](readme_assets/search.png) | ![Source video opened at a matching timestamp](readme_assets/playback.png) |
## Run the example
@@ -52,11 +52,9 @@ than 100 MB and are copied into the app's support directory before upload.
- `MutableApiKeyProvider` and `auth.me()` for runtime authentication.
- `UploadSource.fromFile`, upload progress, and cancellation.
-- Caller-selected filenames and searchable title/place upload metadata.
- Image-index creation and status polling.
- Collection-version discovery before search.
-- Text and base64 reference-image search with an explicit distance cutoff.
-- Client-side trip scoping before frame retrieval.
+- Natural-language video search with an explicit distance cutoff.
- One bulk URL lookup followed by cancellable image retrieval.
- Defensive mapping of filenames, result indexes, and relative timestamps.
- Grouping nearby matches from the same source video.
@@ -83,11 +81,10 @@ bash build.sh analyze
bash build.sh test
```
-Framebase has offline tests for result mapping, reference-image request mapping,
-trip scoping, import validation, timestamp handling, cancellation, cutoff
-enforcement, narrow layouts, grouped results, runtime-key error handling, and
-navigation. Live upload, indexing, search, and playback require an API key and
-a physical device or emulator.
+Framebase has offline tests for result mapping, timestamp handling, cancellation,
+cutoff enforcement, narrow layouts, grouped results, runtime-key error handling,
+and navigation. Live upload, indexing, search, and playback require an API key
+and a physical device or emulator.
Android was validated on a physical device. The iOS project is included, but
iOS runtime validation requires macOS and Xcode.
diff --git a/example/05_framebase/pubspec.yaml b/example/05_framebase/pubspec.yaml
index ee4d5ee..441f535 100644
--- a/example/05_framebase/pubspec.yaml
+++ b/example/05_framebase/pubspec.yaml
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
-version: 1.3.0+5
+version: 1.2.1+4
environment:
sdk: ^3.12.2
diff --git a/example/05_framebase/readme_assets/library.png b/example/05_framebase/readme_assets/library.png
index f85fceb..0d69fe2 100644
Binary files a/example/05_framebase/readme_assets/library.png and b/example/05_framebase/readme_assets/library.png differ
diff --git a/example/05_framebase/readme_assets/photo_search.png b/example/05_framebase/readme_assets/photo_search.png
deleted file mode 100644
index df3be43..0000000
Binary files a/example/05_framebase/readme_assets/photo_search.png and /dev/null differ
diff --git a/example/05_framebase/readme_assets/trip.png b/example/05_framebase/readme_assets/trip.png
deleted file mode 100644
index 57eefa4..0000000
Binary files a/example/05_framebase/readme_assets/trip.png and /dev/null differ
diff --git a/example/05_framebase/test/search_gateway_test.dart b/example/05_framebase/test/search_gateway_test.dart
index d16771d..3ac6805 100644
--- a/example/05_framebase/test/search_gateway_test.dart
+++ b/example/05_framebase/test/search_gateway_test.dart
@@ -143,63 +143,6 @@ void main() {
await gateway.close();
});
- test(
- 'reference photo search keeps only recordings from the selected trip',
- () async {
- const route = '/api/external/v1/image/get_image';
- final transport = QueueTransport([
- {
- 'data': [
- {
- 'filename': 'downtown_traffic.mp4',
- 'ts_unix': '0000000008000',
- 'score': .62,
- },
- {
- 'filename': 'evening_junction.mp4',
- 'ts_unix': '0000000010000',
- 'score': .58,
- },
- ],
- 'cnt_total': 2,
- },
- {
- 'records': [
- {
- 'input_index': 0,
- 'found': true,
- 'url_pre_signed': '$route?test=singapore',
- },
- ],
- },
- {
- 'records': [
- {
- 'url_pre_signed': '$route?test=singapore',
- 'content_base64': base64Encode([7, 8, 9]),
- },
- ],
- },
- ]);
- final gateway = SearchGateway(
- 'test-only-placeholder',
- transport: transport,
- );
- final result = await gateway.search(
- '',
- imageQuery: 'base64-reference',
- allowedFilenames: {'downtown_traffic.mp4'},
- );
- expect(result.matches, hasLength(1));
- expect(result.matches.single.filename, 'downtown_traffic.mp4');
- expect(result.matches.single.imageBytes, [7, 8, 9]);
- final body = transport.requests.first.jsonBody as Map;
- expect(body['query_text'], '');
- expect(body['image_query'], 'base64-reference');
- await gateway.close();
- },
- );
-
test(
'client cutoff rejects out-of-threshold beta results before downloading',
() async {
diff --git a/example/05_framebase/test/widget_test.dart b/example/05_framebase/test/widget_test.dart
index 2c4cee2..625e2e0 100644
--- a/example/05_framebase/test/widget_test.dart
+++ b/example/05_framebase/test/widget_test.dart
@@ -78,36 +78,6 @@ void main() {
expect(input.enableSuggestions, isFalse);
c.dispose();
});
- testWidgets('trip selection narrows the library and carries into search', (
- tester,
- ) async {
- final c = ArchiveController(persist: false);
- await tester.pumpWidget(FramebaseApp(controller: c));
- await tester.pumpAndSettle();
- await tester.tap(find.byKey(const Key('place_Singapore')));
- await tester.pumpAndSettle();
- expect(find.byType(VideoRow), findsOneWidget);
- expect(find.text('Downtown traffic'), findsOneWidget);
- expect(find.text('Neighborhood crossing'), findsNothing);
- expect(find.text('Search Singapore'), findsOneWidget);
- await tester.tap(find.byKey(const Key('open_search')));
- await tester.pumpAndSettle();
- expect(find.text('Searching in Singapore'), findsOneWidget);
- c.dispose();
- });
- testWidgets('import details require a human title and trip', (tester) async {
- await tester.pumpWidget(
- const MaterialApp(
- home: Scaffold(
- body: ImportDetailsSheet(sourceName: 'old_town-walk.mp4'),
- ),
- ),
- );
- expect(find.widgetWithText(TextField, 'Old Town Walk'), findsOneWidget);
- await tester.tap(find.byKey(const Key('add_to_trip')));
- await tester.pump();
- expect(find.text('Enter a place'), findsOneWidget);
- });
testWidgets('320px layout and secondary history route', (tester) async {
tester.view.physicalSize = const Size(320, 680);
tester.view.devicePixelRatio = 1;
diff --git a/example/05_framebase_userlogin/.gitignore b/example/05_framebase_userlogin/.gitignore
new file mode 100644
index 0000000..246670b
--- /dev/null
+++ b/example/05_framebase_userlogin/.gitignore
@@ -0,0 +1,51 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+/coverage/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
+
+# scratch
+*.zip
+
+# Generated screenshot output
+screenshots/
diff --git a/example/05_framebase_userlogin/.metadata b/example/05_framebase_userlogin/.metadata
new file mode 100644
index 0000000..cc2cda6
--- /dev/null
+++ b/example/05_framebase_userlogin/.metadata
@@ -0,0 +1,33 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: "cc0734ac716fbb8b90f3f9db8020958b1553afa7"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: cc0734ac716fbb8b90f3f9db8020958b1553afa7
+ base_revision: cc0734ac716fbb8b90f3f9db8020958b1553afa7
+ - platform: android
+ create_revision: cc0734ac716fbb8b90f3f9db8020958b1553afa7
+ base_revision: cc0734ac716fbb8b90f3f9db8020958b1553afa7
+ - platform: ios
+ create_revision: cc0734ac716fbb8b90f3f9db8020958b1553afa7
+ base_revision: cc0734ac716fbb8b90f3f9db8020958b1553afa7
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/example/05_framebase_userlogin/LICENSE b/example/05_framebase_userlogin/LICENSE
new file mode 100644
index 0000000..b81f341
--- /dev/null
+++ b/example/05_framebase_userlogin/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 V-Modal AI, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/example/05_framebase_userlogin/MEDIA_SOURCES.md b/example/05_framebase_userlogin/MEDIA_SOURCES.md
new file mode 100644
index 0000000..9887900
--- /dev/null
+++ b/example/05_framebase_userlogin/MEDIA_SOURCES.md
@@ -0,0 +1,13 @@
+# Street archive — media provenance
+
+All three videos are licensed stock footage from Pexels, not recordings made by the app author. They form one theme: street intersections, pedestrians, buses, and city traffic. No source audio is included, so this app tests visual search only, not AUDIO or audio search.
+
+| Local video | Author / original | App edit |
+| --- | --- | --- |
+| `neighborhood_crossing.mp4` | David McBee — [San Francisco street crossing](https://www.pexels.com/video/a-city-street-with-cars-and-pedestrians-crossing-the-street-26732129/) | 55.2 s, 960 px wide, H.264, 25 fps, audio removed |
+| `downtown_traffic.mp4` | Richard L — [Singapore city intersection](https://www.pexels.com/video/busy-city-intersection-with-traffic-and-pedestrians-33049294/) | 15.8 s, 960 px wide, H.264, 25 fps, audio removed |
+| `evening_junction.mp4` | Israyosoy S. — [Mexico City street](https://www.pexels.com/video/a-city-street-with-cars-and-people-walking-20474313/) | First 75 s, 960 px wide, H.264, 25 fps, audio removed |
+
+The files are bundled under `assets/videos`. Matching JPEG covers under `assets/stills` were extracted at 00:03 from each local MP4. Search results are separately retrieved from the live index; the bundled covers are never substituted for search results.
+
+[Pexels license](https://www.pexels.com/license/) permits free use and modification. Credit is provided here even though attribution is not required. Do not imply endorsement by the people, businesses, or footage authors depicted. Location labels describe source footage, not GPS metadata generated by the app.
diff --git a/example/05_framebase_userlogin/README.md b/example/05_framebase_userlogin/README.md
new file mode 100644
index 0000000..57f830d
--- /dev/null
+++ b/example/05_framebase_userlogin/README.md
@@ -0,0 +1,63 @@
+# Framebase user library
+
+This Flutter example gives each signed-in user a separate street-video library.
+The app owns sign-in and credential acquisition; the VMODAL SDK owns API
+transport. The bundled videos, grouped search results, uploads, index jobs,
+and timestamp playback follow the original `05_framebase` example.
+
+## Run offline
+
+From `uinterface/sdk_flutter`:
+
+```bash
+bash install.sh install
+cd example/05_framebase_userlogin
+flutter_bin="$(bash ../../install.sh flutter_bin)"
+"$flutter_bin" pub get
+"$flutter_bin" run --device-id DEVICE_ID
+```
+
+The default `MockFirebaseAuth` emits an empty response, so the app opens on
+the sign-in page and makes no VMODAL requests. A fake account and queued
+`VmodalCredential` responses can be injected in tests. Fixture keys are
+placeholders, not live credentials. Email/password sign-in through the fake
+adapter only succeeds for accounts supplied to that adapter.
+
+## Session contract
+
+`lib/user/` owns auth state, credential validation, permissions, token renewal,
+and account transitions. A trusted app-owned credential issuer must bind a
+Firebase UID to a VMODAL principal and stable `collection_user_id`, returning
+an `ak_...` key accepted by the gateway. Firebase Auth does not issue that key.
+No Firebase project config or issuer endpoint exists in this repo yet, so this
+example does not enable a production Firebase adapter.
+
+The controller validates expiry and binding, checks `auth.me()`, then opens
+`framebase_streets__user_<collection_user_id>` with stream `street_study`.
+It refreshes the VMODAL credential one minute before expiry and before SDK
+operations. The VMODAL key lives in memory only. Sign-out clears the provider,
+stops work, closes the client, and removes the previous account from the UI.
+The gateway remains the authorization boundary; UI permissions only hide
+unavailable actions.
+
+Imported MP4s and the `archive.json` manifest are stored under
+`accounts/<collection_user_id>/` in application support. Search results,
+downloaded images, signed URLs, and credentials are never persisted. Firebase's
+native session may be restored by a future real adapter, but the VMODAL key
+must be reacquired after each process start.
+
+## Verify
+
+```bash
+"$flutter_bin" pub get
+"$(bash ../../install.sh dart_bin)" format --output=none --set-exit-if-changed lib test
+"$flutter_bin" analyze
+"$flutter_bin" test
+```
+
+The offline tests cover auth states, scopes, refresh, account switching,
+archive separation, result mapping, and UI gating. Device testing with two
+real accounts, a trusted issuer, and a gateway-accepted key remains the
+production integration step.
+
+The bundled footage is documented in [MEDIA_SOURCES.md](MEDIA_SOURCES.md).
diff --git a/example/05_framebase_userlogin/analysis_options.yaml b/example/05_framebase_userlogin/analysis_options.yaml
new file mode 100644
index 0000000..0d29021
--- /dev/null
+++ b/example/05_framebase_userlogin/analysis_options.yaml
@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at https://dart.dev/lints.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/example/05_framebase_userlogin/android/.gitignore b/example/05_framebase_userlogin/android/.gitignore
new file mode 100644
index 0000000..be3943c
--- /dev/null
+++ b/example/05_framebase_userlogin/android/.gitignore
@@ -0,0 +1,14 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+.cxx/
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/to/reference-keystore
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/example/05_framebase_userlogin/android/app/build.gradle.kts b/example/05_framebase_userlogin/android/app/build.gradle.kts
new file mode 100644
index 0000000..16049e1
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/build.gradle.kts
@@ -0,0 +1,44 @@
+plugins {
+ id("com.android.application")
+ id("kotlin-android")
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id("dev.flutter.flutter-gradle-plugin")
+}
+
+android {
+ namespace = "app.framebase.search"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_17.toString()
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "app.framebase.search"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://flutter.dev/to/review-gradle-config.
+ minSdk = flutter.minSdkVersion
+ targetSdk = flutter.targetSdkVersion
+ versionCode = flutter.versionCode
+ versionName = flutter.versionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig = signingConfigs.getByName("debug")
+ }
+ }
+}
+
+flutter {
+ source = "../.."
+}
diff --git a/example/05_framebase_userlogin/android/app/src/debug/AndroidManifest.xml b/example/05_framebase_userlogin/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..d30de11
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- The INTERNET permission is required for development. Specifically,
+ the Flutter tool needs it to communicate with the running application
+ to allow setting breakpoints, to provide hot reload, etc.
+ -->
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <application android:usesCleartextTraffic="true" />
+</manifest>
diff --git a/example/05_framebase_userlogin/android/app/src/main/AndroidManifest.xml b/example/05_framebase_userlogin/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..bb9704d
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+ <uses-permission android:name="android.permission.INTERNET" />
+ <application
+ android:label="Framebase"
+ android:name="${applicationName}"
+ android:icon="@drawable/ic_framebase">
+ <activity
+ android:name=".MainActivity"
+ android:exported="true"
+ android:launchMode="singleTop"
+ android:taskAffinity=""
+ android:theme="@style/LaunchTheme"
+ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
+ android:hardwareAccelerated="true"
+ android:windowSoftInputMode="adjustResize">
+ <!-- Specifies an Android theme to apply to this Activity as soon as
+ the Android process has started. This theme is visible to the user
+ while the Flutter UI initializes. After that, this theme continues
+ to determine the Window background behind the Flutter UI. -->
+ <meta-data
+ android:name="io.flutter.embedding.android.NormalTheme"
+ android:resource="@style/NormalTheme"
+ />
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+ </activity>
+ <!-- Don't delete the meta-data below.
+ This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+ <meta-data
+ android:name="flutterEmbedding"
+ android:value="2" />
+ </application>
+ <!-- Required to query activities that can process text, see:
+ https://developer.android.com/training/package-visibility and
+ https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
+
+ In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
+ <queries>
+ <intent>
+ <action android:name="android.intent.action.PROCESS_TEXT"/>
+ <data android:mimeType="text/plain"/>
+ </intent>
+ </queries>
+</manifest>
diff --git a/example/05_framebase_userlogin/android/app/src/main/kotlin/app/framebase/search/MainActivity.kt b/example/05_framebase_userlogin/android/app/src/main/kotlin/app/framebase/search/MainActivity.kt
new file mode 100644
index 0000000..da4a200
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/main/kotlin/app/framebase/search/MainActivity.kt
@@ -0,0 +1,5 @@
+package app.framebase.search
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity : FlutterActivity()
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/drawable-v21/launch_background.xml b/example/05_framebase_userlogin/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="?android:colorBackground" />
+
+ <!-- You can insert your own image assets here -->
+ <!-- <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@mipmap/launch_image" />
+ </item> -->
+</layer-list>
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/drawable/ic_framebase.xml b/example/05_framebase_userlogin/android/app/src/main/res/drawable/ic_framebase.xml
new file mode 100644
index 0000000..e98f31d
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/main/res/drawable/ic_framebase.xml
@@ -0,0 +1,7 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp" android:height="108dp" android:viewportWidth="108" android:viewportHeight="108">
+ <path android:fillColor="#ECE9E2" android:pathData="M0,0h108v108h-108z" />
+ <path android:fillColor="@android:color/transparent" android:strokeColor="#AA4F2D"
+ android:strokeWidth="6" android:strokeLineCap="square"
+ android:pathData="M28,46L28,28L46,28M62,28L80,28L80,46M80,62L80,80L62,80M46,80L28,80L28,62M47,43L62,54L47,65" />
+</vector>
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/drawable/launch_background.xml b/example/05_framebase_userlogin/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@android:color/white" />
+
+ <!-- You can insert your own image assets here -->
+ <!-- <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@mipmap/launch_image" />
+ </item> -->
+</layer-list>
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..db77bb4
Binary files /dev/null and b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17987b7
Binary files /dev/null and b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..09d4391
Binary files /dev/null and b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d5f1c8d
Binary files /dev/null and b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d6372e
Binary files /dev/null and b/example/05_framebase_userlogin/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/values-night/styles.xml b/example/05_framebase_userlogin/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
+ <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+ <!-- Show a splash screen on the activity. Automatically removed when
+ the Flutter engine draws its first frame -->
+ <item name="android:windowBackground">@drawable/launch_background</item>
+ </style>
+ <!-- Theme applied to the Android Window as soon as the process has started.
+ This theme determines the color of the Android Window while your
+ Flutter UI initializes, as well as behind your Flutter UI while its
+ running.
+
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
+ <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+ <item name="android:windowBackground">?android:colorBackground</item>
+ </style>
+</resources>
diff --git a/example/05_framebase_userlogin/android/app/src/main/res/values/styles.xml b/example/05_framebase_userlogin/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
+ <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
+ <!-- Show a splash screen on the activity. Automatically removed when
+ the Flutter engine draws its first frame -->
+ <item name="android:windowBackground">@drawable/launch_background</item>
+ </style>
+ <!-- Theme applied to the Android Window as soon as the process has started.
+ This theme determines the color of the Android Window while your
+ Flutter UI initializes, as well as behind your Flutter UI while its
+ running.
+
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
+ <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
+ <item name="android:windowBackground">?android:colorBackground</item>
+ </style>
+</resources>
diff --git a/example/05_framebase_userlogin/android/app/src/profile/AndroidManifest.xml b/example/05_framebase_userlogin/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/example/05_framebase_userlogin/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- The INTERNET permission is required for development. Specifically,
+ the Flutter tool needs it to communicate with the running application
+ to allow setting breakpoints, to provide hot reload, etc.
+ -->
+ <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>
diff --git a/example/05_framebase_userlogin/android/build.gradle.kts b/example/05_framebase_userlogin/android/build.gradle.kts
new file mode 100644
index 0000000..dbee657
--- /dev/null
+++ b/example/05_framebase_userlogin/android/build.gradle.kts
@@ -0,0 +1,24 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+val newBuildDir: Directory =
+ rootProject.layout.buildDirectory
+ .dir("../../build")
+ .get()
+rootProject.layout.buildDirectory.value(newBuildDir)
+
+subprojects {
+ val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
+ project.layout.buildDirectory.value(newSubprojectBuildDir)
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register<Delete>("clean") {
+ delete(rootProject.layout.buildDirectory)
+}
diff --git a/example/05_framebase_userlogin/android/gradle.properties b/example/05_framebase_userlogin/android/gradle.properties
new file mode 100644
index 0000000..d5da727
--- /dev/null
+++ b/example/05_framebase_userlogin/android/gradle.properties
@@ -0,0 +1,6 @@
+org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
+# This builtInKotlin flag was added automatically by Flutter migrator
+android.builtInKotlin=false
+# This newDsl flag was added automatically by Flutter migrator
+android.newDsl=false
diff --git a/example/05_framebase_userlogin/android/gradle/wrapper/gradle-wrapper.properties b/example/05_framebase_userlogin/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e4ef43f
--- /dev/null
+++ b/example/05_framebase_userlogin/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
diff --git a/example/05_framebase_userlogin/android/settings.gradle.kts b/example/05_framebase_userlogin/android/settings.gradle.kts
new file mode 100644
index 0000000..ca7fe06
--- /dev/null
+++ b/example/05_framebase_userlogin/android/settings.gradle.kts
@@ -0,0 +1,26 @@
+pluginManagement {
+ val flutterSdkPath =
+ run {
+ val properties = java.util.Properties()
+ file("local.properties").inputStream().use { properties.load(it) }
+ val flutterSdkPath = properties.getProperty("flutter.sdk")
+ require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
+ flutterSdkPath
+ }
+
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
+
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+
+plugins {
+ id("dev.flutter.flutter-plugin-loader") version "1.0.0"
+ id("com.android.application") version "8.11.1" apply false
+ id("org.jetbrains.kotlin.android") version "2.2.20" apply false
+}
+
+include(":app")
diff --git a/example/05_framebase_userlogin/assets/fonts/InstrumentSans.ttf b/example/05_framebase_userlogin/assets/fonts/InstrumentSans.ttf
new file mode 100644
index 0000000..3589b81
Binary files /dev/null and b/example/05_framebase_userlogin/assets/fonts/InstrumentSans.ttf differ
diff --git a/example/05_framebase_userlogin/assets/fonts/OFL.txt b/example/05_framebase_userlogin/assets/fonts/OFL.txt
new file mode 100644
index 0000000..d41633c
--- /dev/null
+++ b/example/05_framebase_userlogin/assets/fonts/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2022 The Instrument Sans Project Authors (https://github.com/Instrument/instrument-sans)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/example/05_framebase_userlogin/assets/stills/downtown_traffic.jpg b/example/05_framebase_userlogin/assets/stills/downtown_traffic.jpg
new file mode 100644
index 0000000..be50a97
Binary files /dev/null and b/example/05_framebase_userlogin/assets/stills/downtown_traffic.jpg differ
diff --git a/example/05_framebase_userlogin/assets/stills/evening_junction.jpg b/example/05_framebase_userlogin/assets/stills/evening_junction.jpg
new file mode 100644
index 0000000..6cda95e
Binary files /dev/null and b/example/05_framebase_userlogin/assets/stills/evening_junction.jpg differ
diff --git a/example/05_framebase_userlogin/assets/stills/neighborhood_crossing.jpg b/example/05_framebase_userlogin/assets/stills/neighborhood_crossing.jpg
new file mode 100644
index 0000000..9d1205f
Binary files /dev/null and b/example/05_framebase_userlogin/assets/stills/neighborhood_crossing.jpg differ
diff --git a/example/05_framebase_userlogin/assets/videos/downtown_traffic.mp4 b/example/05_framebase_userlogin/assets/videos/downtown_traffic.mp4
new file mode 100644
index 0000000..aecbb0b
Binary files /dev/null and b/example/05_framebase_userlogin/assets/videos/downtown_traffic.mp4 differ
diff --git a/example/05_framebase_userlogin/assets/videos/evening_junction.mp4 b/example/05_framebase_userlogin/assets/videos/evening_junction.mp4
new file mode 100644
index 0000000..04ee834
Binary files /dev/null and b/example/05_framebase_userlogin/assets/videos/evening_junction.mp4 differ
diff --git a/example/05_framebase_userlogin/assets/videos/neighborhood_crossing.mp4 b/example/05_framebase_userlogin/assets/videos/neighborhood_crossing.mp4
new file mode 100644
index 0000000..8699a7b
Binary files /dev/null and b/example/05_framebase_userlogin/assets/videos/neighborhood_crossing.mp4 differ
diff --git a/example/05_framebase_userlogin/ios/.gitignore b/example/05_framebase_userlogin/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/example/05_framebase_userlogin/ios/Flutter/AppFrameworkInfo.plist b/example/05_framebase_userlogin/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..391a902
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>App</string>
+ <key>CFBundleIdentifier</key>
+ <string>io.flutter.flutter.app</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>App</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/example/05_framebase_userlogin/ios/Flutter/Debug.xcconfig b/example/05_framebase_userlogin/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/example/05_framebase_userlogin/ios/Flutter/Release.xcconfig b/example/05_framebase_userlogin/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.pbxproj b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..efa3eb3
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,620 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+ 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "<group>";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "<group>";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "<group>";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "<group>";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = app.framebase.search;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 331C8088294A63A400263BE5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = app.framebase.search.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Debug;
+ };
+ 331C8089294A63A400263BE5 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = app.framebase.search.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Release;
+ };
+ 331C808A294A63A400263BE5 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = app.framebase.search.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = app.framebase.search;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = app.framebase.search;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 331C8088294A63A400263BE5 /* Debug */,
+ 331C8089294A63A400263BE5 /* Release */,
+ 331C808A294A63A400263BE5 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:">
+ </FileRef>
+</Workspace>
diff --git a/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
diff --git a/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PreviewsEnabled</key>
+ <false/>
+</dict>
+</plist>
diff --git a/example/05_framebase_userlogin/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/05_framebase_userlogin/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..e3773d4
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1510"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <Testables>
+ <TestableReference
+ skipped = "NO"
+ parallelizable = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "331C8080294A63A400263BE5"
+ BuildableName = "RunnerTests.xctest"
+ BlueprintName = "RunnerTests"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ enableGPUValidationMode = "1"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Profile"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+ BuildableName = "Runner.app"
+ BlueprintName = "Runner"
+ ReferencedContainer = "container:Runner.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/example/05_framebase_userlogin/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/05_framebase_userlogin/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "group:Runner.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
diff --git a/example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PreviewsEnabled</key>
+ <false/>
+</dict>
+</plist>
diff --git a/example/05_framebase_userlogin/ios/Runner/AppDelegate.swift b/example/05_framebase_userlogin/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..c30b367
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/AppDelegate.swift
@@ -0,0 +1,16 @@
+import Flutter
+import UIKit
+
+@main
+@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+
+ func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
+ GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
+ }
+}
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "[email protected]",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
new file mode 100644
index 0000000..0467bf1
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "[email protected]",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "[email protected]",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] differ
diff --git a/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/example/05_framebase_userlogin/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/05_framebase_userlogin/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="EHf-IW-A2E">
+ <objects>
+ <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+ <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+ </imageView>
+ </subviews>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <constraints>
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+ </constraints>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="53" y="375"/>
+ </scene>
+ </scenes>
+ <resources>
+ <image name="LaunchImage" width="168" height="185"/>
+ </resources>
+</document>
diff --git a/example/05_framebase_userlogin/ios/Runner/Base.lproj/Main.storyboard b/example/05_framebase_userlogin/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+ </dependencies>
+ <scenes>
+ <!--Flutter View Controller-->
+ <scene sceneID="tne-QT-ifu">
+ <objects>
+ <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+ <layoutGuides>
+ <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+ <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+ </layoutGuides>
+ <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+ <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+ </objects>
+ </scene>
+ </scenes>
+</document>
diff --git a/example/05_framebase_userlogin/ios/Runner/Info.plist b/example/05_framebase_userlogin/ios/Runner/Info.plist
new file mode 100644
index 0000000..9f9d8f7
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/Info.plist
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CADisableMinimumFrameDurationOnPhone</key>
+ <true/>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
+ <key>CFBundleDisplayName</key>
+ <string>Framebase</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>framebase</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>$(FLUTTER_BUILD_NAME)</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>$(FLUTTER_BUILD_NUMBER)</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIApplicationSceneManifest</key>
+ <dict>
+ <key>UIApplicationSupportsMultipleScenes</key>
+ <false/>
+ <key>UISceneConfigurations</key>
+ <dict>
+ <key>UIWindowSceneSessionRoleApplication</key>
+ <array>
+ <dict>
+ <key>UISceneClassName</key>
+ <string>UIWindowScene</string>
+ <key>UISceneConfigurationName</key>
+ <string>flutter</string>
+ <key>UISceneDelegateClassName</key>
+ <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
+ <key>UISceneStoryboardFile</key>
+ <string>Main</string>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <key>UIApplicationSupportsIndirectInputEvents</key>
+ <true/>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
+ <key>UIMainStoryboardFile</key>
+ <string>Main</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
diff --git a/example/05_framebase_userlogin/ios/Runner/Runner-Bridging-Header.h b/example/05_framebase_userlogin/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/example/05_framebase_userlogin/ios/Runner/SceneDelegate.swift b/example/05_framebase_userlogin/ios/Runner/SceneDelegate.swift
new file mode 100644
index 0000000..b9ce8ea
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/Runner/SceneDelegate.swift
@@ -0,0 +1,6 @@
+import Flutter
+import UIKit
+
+class SceneDelegate: FlutterSceneDelegate {
+
+}
diff --git a/example/05_framebase_userlogin/ios/RunnerTests/RunnerTests.swift b/example/05_framebase_userlogin/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/example/05_framebase_userlogin/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/example/05_framebase/lib/data/archive_controller.dart b/example/05_framebase_userlogin/lib/data/archive_controller.dart
similarity index 78%
rename from example/05_framebase/lib/data/archive_controller.dart
rename to example/05_framebase_userlogin/lib/data/archive_controller.dart
index 09369ba..76ca63b 100644
--- a/example/05_framebase/lib/data/archive_controller.dart
+++ b/example/05_framebase_userlogin/lib/data/archive_controller.dart
@@ -93,8 +93,9 @@ class ArchiveEvent {
}
class ArchiveController extends ChangeNotifier {
- ArchiveController({this.persist = true});
+ ArchiveController({this.persist = true, this.supportDirectory});
final bool persist;
+ final Directory? supportDirectory;
List<ArchiveClip> clips = streetClips();
final List<ArchiveEvent> events = [];
bool initialized = false, connecting = false, busy = false, searching = false;
@@ -107,8 +108,10 @@ class ArchiveController extends ChangeNotifier {
UploadTask<VideoUploadResponse>? _upload;
CancellationToken? _work, _queryToken;
int _searchGeneration = 0;
+ int _generation = 0;
bool _disposed = false;
- String _accountId = '';
+ String _collectionUserId = '';
+ bool canRead = false, canWrite = false;
Future<void> _saveQueue = Future<void>.value();
bool get connected => _gateway != null;
bool get ready => connected && indexVersion != null;
@@ -119,9 +122,28 @@ class ArchiveController extends ChangeNotifier {
}
Future<void> initialize() async {
- if (persist) {
- try {
- _directory = await getApplicationSupportDirectory();
+ initialized = true;
+ emit();
+ }
+
+ Future<void> activate(
+ String collectionUserId,
+ SearchGateway gateway, {
+ required bool canRead,
+ required bool canWrite,
+ }) async {
+ deactivate();
+ final generation = _generation;
+ _collectionUserId = collectionUserId;
+ this.canRead = canRead;
+ this.canWrite = canWrite;
+ _gateway = gateway;
+ indexVersion = gateway.version;
+ try {
+ final root = supportDirectory ?? await getApplicationSupportDirectory();
+ if (generation != _generation) return;
+ _directory = Directory('${root.path}/accounts/$collectionUserId');
+ if (persist) {
final state = File('${_directory!.path}/archive.json');
if (await state.exists()) {
final data =
@@ -132,6 +154,7 @@ class ArchiveController extends ChangeNotifier {
ArchiveClip.fromJson(Map<String, dynamic>.from(r as Map)),
)
.toList();
+ if (generation != _generation) return;
clips = saved
.where(
(c) =>
@@ -140,7 +163,6 @@ class ArchiveController extends ChangeNotifier {
.toList();
if (clips.isEmpty) clips = streetClips();
pendingJob = data['pendingJob'] as String? ?? '';
- _accountId = data['accountId'] as String? ?? '';
for (final raw in (data['events'] as List? ?? [])) {
final r = Map<String, dynamic>.from(raw as Map);
events.add(
@@ -153,28 +175,53 @@ class ArchiveController extends ChangeNotifier {
);
}
}
- } on Object {
- notice =
- 'Local archive could not be restored. Built-in clips are available.';
}
+ } on Object {
+ notice =
+ 'Local archive could not be restored. Built-in clips are available.';
}
+ if (generation != _generation) return;
initialized = true;
emit();
}
+ void deactivate() {
+ _generation++;
+ stopWork();
+ invalidateSearch();
+ _gateway = null;
+ _directory = null;
+ _collectionUserId = '';
+ canRead = false;
+ canWrite = false;
+ clips = streetClips();
+ events.clear();
+ initialized = false;
+ connecting = false;
+ busy = false;
+ searching = false;
+ phase = notice = activeQuery = pendingJob = '';
+ progress = null;
+ batch = null;
+ indexVersion = null;
+ emit();
+ }
+
Future<void> save() {
- if (!persist || _directory == null) return Future<void>.value();
+ if (!persist || _directory == null || _collectionUserId.isEmpty) {
+ return Future<void>.value();
+ }
// Snapshot and serialize writes so progress events cannot truncate each other.
// Never serialize the client, key, response rows or signed URLs.
final snapshot = jsonEncode({
'clips': clips.map((c) => c.toJson()).toList(),
'pendingJob': pendingJob,
- 'accountId': _accountId,
'events': events.take(40).map((e) => e.toJson()).toList(),
});
final path = '${_directory!.path}/archive.json';
_saveQueue = _saveQueue.then((_) async {
try {
+ await File(path).parent.create(recursive: true);
await File(path).writeAsString(snapshot, flush: true);
} on Object {
/* Optional history must not cancel network work. */
@@ -190,61 +237,6 @@ class ArchiveController extends ChangeNotifier {
emit();
}
- Future<bool> connect(String key) async {
- if (busy || connecting) return false;
- connecting = true;
- notice = '';
- emit();
- SearchGateway? next;
- try {
- next = SearchGateway(key.trim());
- await next.connect();
- if (_disposed) {
- await next.close();
- return false;
- }
- invalidateSearch();
- if (_accountId.isNotEmpty && _accountId != next.accountId) {
- for (final clip in clips) {
- clip.uploaded = false;
- }
- pendingJob = '';
- events.clear();
- }
- _accountId = next.accountId;
- final previous = _gateway;
- _gateway = next;
- indexVersion = next.version;
- if (previous != null) await previous.close();
- record(
- 'Connected',
- indexVersion == null
- ? 'Authenticated. No street index yet.'
- : 'Authenticated · street index v$indexVersion available',
- );
- return true;
- } on Object catch (e) {
- await next?.close();
- notice = safeError(e);
- record('Connection failed', notice, error: true);
- return false;
- } finally {
- connecting = false;
- emit();
- }
- }
-
- Future<void> disconnect() async {
- if (busy || connecting) return;
- invalidateSearch();
- final old = _gateway;
- _gateway = null;
- indexVersion = null;
- await old?.close();
- notice = 'Disconnected. Recordings remain on this device.';
- emit();
- }
-
Future<File> localFile(ArchiveClip clip) async {
if (clip.path != null && await File(clip.path!).exists()) {
return File(clip.path!);
@@ -252,9 +244,12 @@ class ArchiveController extends ChangeNotifier {
if (!clip.bundled) {
throw const FileSystemException('Recording no longer available');
}
- _directory ??= await getApplicationSupportDirectory();
+ if (_directory == null || _collectionUserId.isEmpty) {
+ throw const FileSystemException('No active library');
+ }
final file = File('${_directory!.path}/${clip.filename}');
if (!await file.exists()) {
+ await file.parent.create(recursive: true);
final data = await rootBundle.load(clip.asset);
await file.writeAsBytes(
data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes),
@@ -265,27 +260,21 @@ class ArchiveController extends ChangeNotifier {
return file;
}
- Future<void> importFile(
- String path,
- double duration, {
- String? title,
- String? place,
- }) async {
- _directory ??= await getApplicationSupportDirectory();
+ Future<void> importFile(String path, double duration) async {
+ if (!canWrite || _directory == null) return;
+ final generation = _generation;
+ final directory = _directory!;
+ await directory.create(recursive: true);
+ if (generation != _generation) return;
final id = 'street_${DateTime.now().millisecondsSinceEpoch}';
- final file = await File(path).copy('${_directory!.path}/$id.mp4');
+ final file = await File(path).copy('${directory.path}/$id.mp4');
+ if (generation != _generation) return;
final sourceName = basename(path);
- final displayTitle = title?.trim().isNotEmpty == true
- ? title!.trim()
- : sourceName;
- final displayPlace = place?.trim().isNotEmpty == true
- ? place!.trim()
- : 'Unsorted trip';
clips.add(
ArchiveClip(
id: id,
- title: displayTitle,
- location: '$displayPlace · Imported',
+ title: sourceName,
+ location: 'Imported recording',
duration: duration,
asset: '',
poster: '',
@@ -295,7 +284,7 @@ class ArchiveController extends ChangeNotifier {
);
invalidateSearch();
await save();
- record('Recording added', '$displayTitle · $displayPlace');
+ record('Recording added', '$sourceName · stored on device only');
}
ArchiveClip? clipFor(String filename) {
@@ -312,7 +301,8 @@ class ArchiveController extends ChangeNotifier {
Future<void> uploadAndIndex() async {
final gateway = _gateway;
- if (gateway == null || busy) return;
+ if (gateway == null || busy || !canWrite) return;
+ final generation = _generation;
busy = true;
notice = '';
invalidateSearch();
@@ -327,19 +317,18 @@ class ArchiveController extends ChangeNotifier {
emit();
final file = await localFile(clip);
token.throwIfCanceled();
- final task = gateway.upload(
- file,
- title: clip.title,
- place: clip.location.split(' · ').first,
- );
+ final task = await gateway.upload(file);
_upload = task;
+ if (token.isCanceled) task.cancel();
final watch = Stopwatch()..start();
final subscription = task.progress.listen((p) {
+ if (generation != _generation) return;
progress = p.totalBytes > 0 ? p.uploadedBytes / p.totalBytes : null;
emit();
});
try {
final result = await task.result;
+ token.throwIfCanceled();
if (!result.uploaded) throw const TransportException();
clip.uploaded = true;
record(
@@ -357,6 +346,7 @@ class ArchiveController extends ChangeNotifier {
progress = null;
emit();
final job = await gateway.createIndex(token);
+ token.throwIfCanceled();
pendingJob = job.jobId;
await save();
if (pendingJob.isEmpty) {
@@ -365,25 +355,32 @@ class ArchiveController extends ChangeNotifier {
record('Index queued', 'Visual index · ${clips.length} recordings');
await _pollIndex(gateway, token);
} on OperationCanceled {
+ if (generation != _generation) return;
notice = pendingJob.isEmpty
? 'Upload canceled. Completed uploads are kept.'
: 'Stopped waiting. Indexing continues on the server; use Resume.';
record('Operation stopped', notice);
} on Object catch (e) {
+ if (generation != _generation) return;
+ gateway.reportFailure(e);
+ if (generation != _generation) return;
notice = safeError(e);
record('Processing failed', notice, error: true);
} finally {
- busy = false;
- phase = '';
- progress = null;
- _work = null;
- emit();
+ if (generation == _generation) {
+ busy = false;
+ phase = '';
+ progress = null;
+ _work = null;
+ emit();
+ }
}
}
Future<void> resumeIndex() async {
final gateway = _gateway;
- if (gateway == null || busy || pendingJob.isEmpty) return;
+ if (gateway == null || busy || !canWrite || pendingJob.isEmpty) return;
+ final generation = _generation;
busy = true;
notice = '';
final token = CancellationToken();
@@ -392,15 +389,21 @@ class ArchiveController extends ChangeNotifier {
try {
await _pollIndex(gateway, token);
} on OperationCanceled {
+ if (generation != _generation) return;
notice = 'Stopped waiting. The server job continues.';
} on Object catch (e) {
+ if (generation != _generation) return;
+ gateway.reportFailure(e);
+ if (generation != _generation) return;
notice = safeError(e);
record('Index check failed', notice, error: true);
} finally {
- busy = false;
- phase = '';
- _work = null;
- emit();
+ if (generation == _generation) {
+ busy = false;
+ phase = '';
+ _work = null;
+ emit();
+ }
}
}
@@ -412,8 +415,10 @@ class ArchiveController extends ChangeNotifier {
for (var attempt = 0; attempt < 120; attempt++) {
token.throwIfCanceled();
final state = await gateway.indexStatus(pendingJob, token);
+ token.throwIfCanceled();
if (indexDone(state.status)) {
await gateway.refreshVersion();
+ token.throwIfCanceled();
indexVersion = gateway.version;
pendingJob = '';
await save();
@@ -453,16 +458,12 @@ class ArchiveController extends ChangeNotifier {
emit();
}
- Future<void> search(
- String query, {
- double maxDistance = 1.5,
- String? place,
- String? imageQuery,
- }) async {
+ Future<void> search(String query, {double maxDistance = 1.5}) async {
final gateway = _gateway;
if (gateway == null ||
+ !canRead ||
indexVersion == null ||
- (query.trim().isEmpty && imageQuery == null) ||
+ query.trim().isEmpty ||
busy) {
return;
}
@@ -471,21 +472,14 @@ class ArchiveController extends ChangeNotifier {
final token = CancellationToken();
_queryToken = token;
searching = true;
- activeQuery = query.trim().isEmpty ? 'Reference photo' : query.trim();
+ activeQuery = query.trim();
notice = '';
emit();
try {
final result = await gateway.search(
- query.trim(),
+ activeQuery,
cancellation: token,
maxDistance: maxDistance,
- imageQuery: imageQuery,
- allowedFilenames: place == null
- ? null
- : clips
- .where((clip) => clip.location.split(' · ').first == place)
- .expand((clip) => [clip.id, clip.filename])
- .toSet(),
);
if (_disposed || generation != _searchGeneration) return;
batch = result;
@@ -513,7 +507,6 @@ class ArchiveController extends ChangeNotifier {
_disposed = true;
_queryToken?.cancel();
stopWork();
- if (_gateway != null) unawaited(_gateway!.close());
super.dispose();
}
}
diff --git a/example/05_framebase/lib/data/search_gateway.dart b/example/05_framebase_userlogin/lib/data/search_gateway.dart
similarity index 70%
rename from example/05_framebase/lib/data/search_gateway.dart
rename to example/05_framebase_userlogin/lib/data/search_gateway.dart
index 7aa6413..3cbd78e 100644
--- a/example/05_framebase/lib/data/search_gateway.dart
+++ b/example/05_framebase_userlogin/lib/data/search_gateway.dart
@@ -3,9 +3,9 @@ import 'dart:convert';
import 'dart:typed_data';
import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+import '../user/user_collection.dart';
-const archiveCollection = 'framebase_streets';
-const archiveStream = 'street_study';
+const archiveStream = userStream;
String firstText(Map<String, Object?> row, List<String> fields) {
for (final field in fields) {
@@ -112,8 +112,14 @@ class SearchBatch {
/// One session, one application-owned collection. No credentials or signed URLs
/// are persisted. The low-level SDK is used consistently for collection selectors.
class SearchGateway {
- SearchGateway(String key, {VmodalTransport? transport})
- : keys = MutableApiKeyProvider(key) {
+ SearchGateway(
+ this.keys,
+ String collectionUserId, {
+ VmodalTransport? transport,
+ Future<void> Function()? ensureFresh,
+ }) : collection = encodedUserCollection(collectionUserId),
+ // ignore: prefer_initializing_formals
+ _ensureFresh = ensureFresh {
client = VmodalClient(
config: SdkConfig(
apiKeyProvider: keys,
@@ -124,82 +130,116 @@ class SearchGateway {
}
final MutableApiKeyProvider keys;
+ final String collection;
+ final Future<void> Function()? _ensureFresh;
+ void Function(int status)? onAccessFailure;
late final VmodalClient client;
String accountId = '';
int? version;
- Future<void> connect() async {
+ Future<void> _fresh() async => await _ensureFresh?.call();
+
+ void reportFailure(Object error) {
+ if (error is SdkException &&
+ (error.statusCode == 401 || error.statusCode == 403)) {
+ onAccessFailure?.call(error.statusCode);
+ }
+ }
+
+ Future<T> _call<T>(Future<T> Function() run) async {
+ await _fresh();
+ try {
+ return await run();
+ } on SdkException catch (error) {
+ reportFailure(error);
+ rethrow;
+ }
+ }
+
+ Future<void> connect(String expectedUserId) async {
final profile = await client.auth.me();
- if (profile.userId?.isNotEmpty != true) {
+ if (profile.userId != expectedUserId) {
throw const AuthException('No authenticated identity');
}
accountId = profile.userId!;
await refreshVersion();
+ await listJobs();
}
Future<void> refreshVersion() async {
- final groups = await client.collections.listGroups(mode: 'vid_file');
+ final groups = await _call(
+ () => client.collections.listGroups(mode: 'vid_file'),
+ );
version = groups
- .findGroup(archiveCollection, mode: 'vid_file')
+ .findGroup(collection, mode: 'vid_file')
?.latestLancedbVersion;
}
- UploadTask<VideoUploadResponse> upload(
- File file, {
- required String title,
- required String place,
- }) => client.collections.videoUpload(
- UploadSource.fromFile(file),
- collectionName: archiveCollection,
- subCollectionName: archiveStream,
- options: VideoUploadOptions(
- videoFilename: basename(file.path),
- metadataText: '$title $place',
- metadataTags: ['travel', place.toLowerCase()],
- ),
- );
+ Future<void> listJobs() async {
+ await _call(
+ () => client.indexes.jobsList(mode: 'vid_file', groupName: collection),
+ );
+ }
+
+ Future<UploadTask<VideoUploadResponse>> upload(File file) async {
+ await _fresh();
+ return client.collections.videoUpload(
+ UploadSource.fromFile(file),
+ collectionName: collection,
+ subCollectionName: archiveStream,
+ );
+ }
Future<IndexationSubmitResponse> createIndex(
CancellationToken cancellation,
- ) => client.indexes.createIndex(
- IndexationSubmitRequest(
- mode: 'vid_file',
- groupName: archiveCollection,
- streamName: archiveStream,
- indexType: 'vid_img_emb',
- modality: 'vid_img_emb',
- reProcess: true,
- ),
- cancellation: cancellation,
- );
+ ) async {
+ return _call(
+ () => client.indexes.createIndex(
+ IndexationSubmitRequest(
+ mode: 'vid_file',
+ groupName: collection,
+ streamName: archiveStream,
+ indexType: 'vid_img_emb',
+ modality: 'vid_img_emb',
+ reProcess: true,
+ ),
+ cancellation: cancellation,
+ ),
+ );
+ }
Future<IndexationStatusResponse> indexStatus(
String job,
CancellationToken cancellation,
- ) => client.indexes.indexStatus(job, cancellation: cancellation);
+ ) async {
+ return _call(
+ () => client.indexes.indexStatus(job, cancellation: cancellation),
+ );
+ }
Future<SearchBatch> search(
String query, {
CancellationToken? cancellation,
String? imageQuery,
double maxDistance = 1.5,
- Set<String>? allowedFilenames,
}) async {
final token = cancellation ?? CancellationToken();
final timer = Stopwatch()..start();
- final response = await client.searches.searchVideo(
- SearchRequest(
- queryText: query,
- imageQuery: imageQuery,
- mode: 'vid_file',
- groupName: archiveCollection,
- streamName: archiveStream,
- searchSources: const ['image'],
- limit: 30,
- imageEmbScoreMin: maxDistance,
- versionLancedb: version,
+ final response = await _call(
+ () => client.searches.searchVideo(
+ SearchRequest(
+ queryText: query,
+ imageQuery: imageQuery,
+ mode: 'vid_file',
+ groupName: collection,
+ streamName: archiveStream,
+ searchSources: const ['image'],
+ limit: 30,
+ imageEmbScoreMin: maxDistance,
+ versionLancedb: version,
+ ),
+ cancellation: token,
),
- cancellation: token,
);
final searchMs = timer.elapsedMilliseconds;
final rows = response.data
@@ -208,14 +248,9 @@ class SearchGateway {
.toList();
// Enforce the displayed cutoff defensively on returned rows as well.
// A client-filtered result is distinct from the raw server result count.
- final allowed = allowedFilenames
- ?.map((name) => basename(name).toLowerCase())
- .toSet();
final usable = rows.where((r) {
final distance = num.tryParse('${r['score']}');
- final filename = hitFilename(r);
- return filename.isNotEmpty &&
- (allowed == null || allowed.contains(filename.toLowerCase())) &&
+ return hitFilename(r).isNotEmpty &&
distance != null &&
distance.isFinite &&
distance <= maxDistance;
@@ -223,24 +258,23 @@ class SearchGateway {
final urls = <int, String>{};
final imageBytes = <int, Uint8List>{};
if (usable.isNotEmpty) {
- final resolved = await client.images.getUrlBulk(
- usable
- .map(
- (row) => <String, Object?>{
- 'mode': 'vid_file',
- 'group_name': archiveCollection,
- 'modality': 'vid_img',
- 'stream_name':
- firstText(row, const ['stream_name', 'stream']).isEmpty
- ? archiveStream
- : firstText(row, const ['stream_name', 'stream']),
- 'filename': hitFilename(row),
- if (timestamp13(row).isNotEmpty)
- 'ts_unix_13digits': timestamp13(row),
- },
- )
- .toList(),
- cancellation: token,
+ final resolved = await _call(
+ () => client.images.getUrlBulk(
+ usable
+ .map(
+ (row) => <String, Object?>{
+ 'mode': 'vid_file',
+ 'group_name': collection,
+ 'modality': 'vid_img',
+ 'stream_name': archiveStream,
+ 'filename': hitFilename(row),
+ if (timestamp13(row).isNotEmpty)
+ 'ts_unix_13digits': timestamp13(row),
+ },
+ )
+ .toList(),
+ cancellation: token,
+ ),
);
for (var i = 0; i < resolved.records.length; i++) {
final row = resolved.records[i];
@@ -270,9 +304,11 @@ class SearchGateway {
// The beta gateway returns relative signed image routes. Its supported
// image-byte resource resolves those without guessing an absolute origin.
if (urls.isNotEmpty) {
- final downloaded = await client.images.getImageBulkFromUrls(
- urls.values.toList(),
- cancellation: token,
+ final downloaded = await _call(
+ () => client.images.getImageBulkFromUrls(
+ urls.values.toList(),
+ cancellation: token,
+ ),
);
final byUrl = <String, Uint8List>{};
for (final row in downloaded.records) {
diff --git a/example/05_framebase/lib/main.dart b/example/05_framebase_userlogin/lib/main.dart
similarity index 68%
rename from example/05_framebase/lib/main.dart
rename to example/05_framebase_userlogin/lib/main.dart
index 0aefe95..caaa5b4 100644
--- a/example/05_framebase/lib/main.dart
+++ b/example/05_framebase_userlogin/lib/main.dart
@@ -1,5 +1,4 @@
import 'dart:async';
-import 'dart:convert';
import 'dart:io';
import 'dart:ui';
import 'package:file_selector/file_selector.dart';
@@ -8,6 +7,10 @@ import 'package:flutter/services.dart';
import 'package:video_player/video_player.dart';
import 'data/archive_controller.dart';
import 'data/search_gateway.dart';
+import 'user/login_page.dart';
+import 'user/mock_firebase_auth.dart';
+import 'user/user_session_controller.dart';
+import 'user/vmodal_credential.dart';
const paper = Color(0xFFECE9E2);
const ink = Color(0xFF252C29);
@@ -27,61 +30,95 @@ void main() {
runApp(const FramebaseApp());
}
-class FramebaseApp extends StatelessWidget {
- const FramebaseApp({super.key, this.controller});
+class FramebaseApp extends StatefulWidget {
+ const FramebaseApp({super.key, this.controller, this.session});
final ArchiveController? controller;
+ final UserSessionController? session;
@override
- Widget build(BuildContext context) => MaterialApp(
- title: 'Framebase',
- debugShowCheckedModeBanner: false,
- theme: ThemeData(
- useMaterial3: true,
- fontFamily: 'Instrument Sans',
- colorScheme: ColorScheme.fromSeed(
- seedColor: green,
- surface: paper,
- brightness: Brightness.light,
- ),
- scaffoldBackgroundColor: paper,
- appBarTheme: const AppBarTheme(
- systemOverlayStyle: SystemUiOverlayStyle.dark,
- backgroundColor: Colors.transparent,
- foregroundColor: ink,
- elevation: 0,
- scrolledUnderElevation: 0,
- centerTitle: false,
- titleTextStyle: TextStyle(
- color: ink,
- fontSize: 22,
- fontWeight: FontWeight.w700,
- letterSpacing: -.6,
+ State<FramebaseApp> createState() => _FramebaseAppState();
+}
+
+class _FramebaseAppState extends State<FramebaseApp> {
+ late final ArchiveController archive;
+ late final UserSessionController session;
+ @override
+ void initState() {
+ super.initState();
+ archive = widget.controller ?? ArchiveController();
+ session =
+ widget.session ??
+ UserSessionController(
+ auth: MockFirebaseAuth(),
+ credentials: MockVmodalCredentialSource(),
+ archive: archive,
+ );
+ }
+
+ @override
+ void dispose() {
+ if (widget.session == null) session.dispose();
+ if (widget.controller == null) archive.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) => AnimatedBuilder(
+ animation: session,
+ builder: (context, _) => MaterialApp(
+ key: ValueKey('${session.state}_${session.user?.uid ?? ''}'),
+ title: 'Framebase',
+ debugShowCheckedModeBanner: false,
+ theme: ThemeData(
+ useMaterial3: true,
+ fontFamily: 'Instrument Sans',
+ colorScheme: ColorScheme.fromSeed(
+ seedColor: green,
+ surface: paper,
+ brightness: Brightness.light,
),
- ),
- textTheme: const TextTheme(
- bodyMedium: TextStyle(color: ink),
- bodySmall: TextStyle(color: secondary),
- ),
- dividerTheme: const DividerThemeData(
- color: Color(0xFFDDDFD6),
- thickness: .5,
- ),
- searchBarTheme: SearchBarThemeData(
- elevation: const WidgetStatePropertyAll(0),
- backgroundColor: const WidgetStatePropertyAll(Color(0xFFDFDCD4)),
- hintStyle: const WidgetStatePropertyAll(
- TextStyle(color: secondary, fontSize: 16),
+ scaffoldBackgroundColor: paper,
+ appBarTheme: const AppBarTheme(
+ systemOverlayStyle: SystemUiOverlayStyle.dark,
+ backgroundColor: Colors.transparent,
+ foregroundColor: ink,
+ elevation: 0,
+ scrolledUnderElevation: 0,
+ centerTitle: false,
+ titleTextStyle: TextStyle(
+ color: ink,
+ fontSize: 22,
+ fontWeight: FontWeight.w700,
+ letterSpacing: -.6,
+ ),
),
- shape: WidgetStatePropertyAll(
- RoundedRectangleBorder(borderRadius: BorderRadius.circular(18)),
+ textTheme: const TextTheme(
+ bodyMedium: TextStyle(color: ink),
+ bodySmall: TextStyle(color: secondary),
+ ),
+ dividerTheme: const DividerThemeData(
+ color: Color(0xFFDDDFD6),
+ thickness: .5,
+ ),
+ searchBarTheme: SearchBarThemeData(
+ elevation: const WidgetStatePropertyAll(0),
+ backgroundColor: const WidgetStatePropertyAll(Color(0xFFDFDCD4)),
+ hintStyle: const WidgetStatePropertyAll(
+ TextStyle(color: secondary, fontSize: 16),
+ ),
+ shape: WidgetStatePropertyAll(
+ RoundedRectangleBorder(borderRadius: BorderRadius.circular(18)),
+ ),
+ ),
+ bottomSheetTheme: const BottomSheetThemeData(
+ backgroundColor: paper,
+ showDragHandle: true,
+ modalBarrierColor: Color(0x66000000),
),
),
- bottomSheetTheme: const BottomSheetThemeData(
- backgroundColor: paper,
- showDragHandle: true,
- modalBarrierColor: Color(0x66000000),
- ),
+ home: session.state == SessionState.ready && session.canRead
+ ? LibraryPage(controller: archive, session: session)
+ : LoginPage(session: session),
),
- home: LibraryPage(controller: controller),
);
}
@@ -112,30 +149,19 @@ class Frosted extends StatelessWidget {
}
class LibraryPage extends StatefulWidget {
- const LibraryPage({super.key, this.controller});
+ const LibraryPage({super.key, this.controller, required this.session});
final ArchiveController? controller;
+ final UserSessionController session;
@override
State<LibraryPage> createState() => _LibraryPageState();
}
class _LibraryPageState extends State<LibraryPage> {
late final ArchiveController archive;
- String? selectedPlace;
-
- List<String> get places => archive.clips.map(city).toSet().toList()..sort();
-
- List<ArchiveClip> get visibleClips => selectedPlace == null
- ? archive.clips
- : archive.clips.where((clip) => city(clip) == selectedPlace).toList();
@override
void initState() {
super.initState();
archive = widget.controller ?? ArchiveController();
- unawaited(start());
- }
-
- Future<void> start() async {
- if (!archive.initialized) await archive.initialize();
}
@override
@@ -146,13 +172,12 @@ class _LibraryPageState extends State<LibraryPage> {
void openSearch() => Navigator.push(
context,
- MaterialPageRoute<void>(
- builder: (_) => SearchPage(archive: archive, place: selectedPlace),
- ),
+ MaterialPageRoute<void>(builder: (_) => SearchPage(archive: archive)),
);
Future<void> importVideo() async {
- if (archive.busy) return;
+ if (archive.busy || !widget.session.canWrite) return;
+ final uid = widget.session.user?.uid;
VideoPlayerController? player;
try {
final file = await openFile(
@@ -166,22 +191,26 @@ class _LibraryPageState extends State<LibraryPage> {
],
);
if (file == null) return;
+ if (!mounted ||
+ !widget.session.canWrite ||
+ widget.session.user?.uid != uid) {
+ return;
+ }
if (await file.length() > 100 * 1024 * 1024) {
throw const FormatException();
}
player = VideoPlayerController.file(File(file.path));
await player.initialize().timeout(const Duration(seconds: 15));
- if (!mounted) return;
- final details = await showImportDetails(context, basename(file.path));
- if (!mounted || details == null) return;
+ if (!mounted ||
+ !widget.session.canWrite ||
+ widget.session.user?.uid != uid) {
+ return;
+ }
await archive.importFile(
file.path,
player.value.duration.inMilliseconds / 1000,
- title: details.title,
- place: details.place,
);
if (mounted) {
- setState(() => selectedPlace = details.place);
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
@@ -228,14 +257,21 @@ class _LibraryPageState extends State<LibraryPage> {
IconButton(
key: const Key('import'),
tooltip: 'Add video',
- onPressed: archive.busy ? null : importVideo,
+ onPressed: archive.busy || !widget.session.canWrite
+ ? null
+ : importVideo,
icon: const Icon(Icons.add),
),
PopupMenuButton<String>(
key: const Key('library_menu'),
tooltip: 'More options',
onSelected: (value) {
- if (value == 'connection') showConnection(context, archive);
+ if (value == 'profile') {
+ showModalBottomSheet<void>(
+ context: context,
+ builder: (_) => ProfileSheet(session: widget.session),
+ );
+ }
if (value == 'history') {
Navigator.push(
context,
@@ -244,18 +280,21 @@ class _LibraryPageState extends State<LibraryPage> {
),
);
}
- if (value == 'prepare') prepareArchive(context, archive);
+ if (value == 'prepare' && widget.session.canWrite) {
+ prepareArchive(context, archive);
+ }
},
- itemBuilder: (_) => const [
- PopupMenuItem(
- value: 'connection',
- child: Text('Search settings'),
- ),
+ itemBuilder: (_) => [
+ const PopupMenuItem(value: 'profile', child: Text('Profile')),
PopupMenuItem(
value: 'prepare',
- child: Text('Prepare videos for search'),
+ enabled: widget.session.canWrite,
+ child: const Text('Prepare videos for search'),
+ ),
+ const PopupMenuItem(
+ value: 'history',
+ child: Text('Sync history'),
),
- PopupMenuItem(value: 'history', child: Text('Sync history')),
],
),
],
@@ -270,29 +309,20 @@ class _LibraryPageState extends State<LibraryPage> {
children: [
Row(
children: [
- Expanded(
+ const Expanded(
child: Text(
- selectedPlace ?? 'Travel footage',
- style: const TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w600,
- ),
+ 'Street footage',
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
),
),
Text(
- '${visibleClips.length} ${visibleClips.length == 1 ? 'video' : 'videos'}',
+ '${archive.clips.length} videos',
style: const TextStyle(color: secondary),
),
],
),
- const SizedBox(height: 10),
- PlaceRail(
- places: places,
- selected: selectedPlace,
- onSelected: (place) => setState(() => selectedPlace = place),
- ),
- const SizedBox(height: 14),
- for (final clip in visibleClips)
+ const SizedBox(height: 12),
+ for (final clip in archive.clips)
VideoRow(
clip: clip,
onTap: () => showRecording(context, archive, clip),
@@ -305,7 +335,9 @@ class _LibraryPageState extends State<LibraryPage> {
const SizedBox(height: 20),
TextButton.icon(
key: const Key('process'),
- onPressed: () => prepareArchive(context, archive),
+ onPressed: widget.session.canWrite
+ ? () => prepareArchive(context, archive)
+ : null,
icon: const Icon(Icons.cloud_upload_outlined),
label: const Text('Prepare videos for search'),
),
@@ -315,7 +347,9 @@ class _LibraryPageState extends State<LibraryPage> {
archive.clips.any((c) => !c.bundled && !c.uploaded) &&
!archive.busy)
TextButton.icon(
- onPressed: () => prepareArchive(context, archive),
+ onPressed: widget.session.canWrite
+ ? () => prepareArchive(context, archive)
+ : null,
icon: const Icon(Icons.cloud_upload_outlined),
label: const Text('Prepare added videos'),
),
@@ -333,12 +367,7 @@ class _LibraryPageState extends State<LibraryPage> {
bottomNavigationBar: SafeArea(
child: Padding(
padding: const EdgeInsets.fromLTRB(16, 8, 16, 12),
- child: SearchDock(
- label: selectedPlace == null
- ? 'Search all trips'
- : 'Search $selectedPlace',
- onTap: openSearch,
- ),
+ child: SearchDock(onTap: archive.ready ? openSearch : null),
),
),
),
@@ -386,76 +415,9 @@ class _BrandPainter extends CustomPainter {
bool shouldRepaint(covariant CustomPainter oldDelegate) => false;
}
-class PlaceRail extends StatelessWidget {
- const PlaceRail({
- super.key,
- required this.places,
- required this.selected,
- required this.onSelected,
- });
- final List<String> places;
- final String? selected;
- final ValueChanged<String?> onSelected;
-
- @override
- Widget build(BuildContext context) {
- final items = <String?>[null, ...places];
- return SizedBox(
- height: 42,
- child: ListView.separated(
- scrollDirection: Axis.horizontal,
- itemCount: items.length,
- separatorBuilder: (_, _) => const SizedBox(width: 7),
- itemBuilder: (_, index) {
- final place = items[index];
- final active = place == selected;
- return Material(
- color: active ? ink : const Color(0xFFDFDCD4),
- borderRadius: BorderRadius.circular(14),
- clipBehavior: Clip.antiAlias,
- child: InkWell(
- key: Key(place == null ? 'place_all' : 'place_$place'),
- onTap: () => onSelected(place),
- child: AnimatedPadding(
- duration: const Duration(milliseconds: 160),
- padding: EdgeInsets.symmetric(
- horizontal: active ? 16 : 14,
- vertical: 10,
- ),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- if (active) ...[
- const Icon(
- Icons.location_on_outlined,
- size: 16,
- color: Color(0xFFF2B28F),
- ),
- const SizedBox(width: 6),
- ],
- Text(
- place ?? 'All trips',
- style: TextStyle(
- color: active ? Colors.white : ink,
- fontSize: 13,
- fontWeight: FontWeight.w600,
- ),
- ),
- ],
- ),
- ),
- ),
- );
- },
- ),
- );
- }
-}
-
class SearchDock extends StatelessWidget {
- const SearchDock({super.key, required this.label, required this.onTap});
- final String label;
- final VoidCallback onTap;
+ const SearchDock({super.key, required this.onTap});
+ final VoidCallback? onTap;
@override
Widget build(BuildContext context) => DecoratedBox(
decoration: BoxDecoration(
@@ -490,12 +452,10 @@ class SearchDock extends StatelessWidget {
children: [
const Icon(Icons.search, color: Colors.white, size: 23),
const SizedBox(width: 12),
- Expanded(
+ const Expanded(
child: Text(
- label,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: const TextStyle(
+ 'Search your videos',
+ style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Colors.white,
@@ -525,103 +485,6 @@ class SearchDock extends StatelessWidget {
);
}
-class PlaceContext extends StatelessWidget {
- const PlaceContext({super.key, required this.place});
- final String place;
-
- @override
- Widget build(BuildContext context) => DecoratedBox(
- decoration: BoxDecoration(
- color: const Color(0xFFFFE2D2),
- borderRadius: BorderRadius.circular(14),
- border: Border.all(color: const Color(0x33AA4F2D)),
- ),
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 13, vertical: 10),
- child: Row(
- children: [
- const Icon(Icons.location_on_outlined, size: 18, color: green),
- const SizedBox(width: 8),
- Expanded(
- child: Text(
- 'Searching in $place',
- style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w600),
- ),
- ),
- ],
- ),
- ),
- );
-}
-
-class ReferenceImageContext extends StatelessWidget {
- const ReferenceImageContext({
- super.key,
- required this.name,
- required this.onRemove,
- });
-
- final String name;
- final VoidCallback onRemove;
-
- @override
- Widget build(BuildContext context) => DecoratedBox(
- decoration: BoxDecoration(
- color: const Color(0xFFDFDCD4),
- borderRadius: BorderRadius.circular(14),
- border: Border.all(color: const Color(0x24706F67)),
- ),
- child: Padding(
- padding: const EdgeInsets.fromLTRB(13, 8, 5, 8),
- child: Row(
- children: [
- Container(
- width: 34,
- height: 34,
- decoration: BoxDecoration(
- color: const Color(0xFFFFE2D2),
- borderRadius: BorderRadius.circular(10),
- ),
- child: const Icon(
- Icons.image_search_outlined,
- size: 19,
- color: green,
- ),
- ),
- const SizedBox(width: 10),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- const Text(
- 'Reference photo',
- style: TextStyle(fontSize: 12, color: secondary),
- ),
- const SizedBox(height: 2),
- Text(
- name,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: const TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.w600,
- ),
- ),
- ],
- ),
- ),
- IconButton(
- key: const Key('remove_reference_image'),
- tooltip: 'Remove reference photo',
- onPressed: onRemove,
- icon: const Icon(Icons.close, size: 19),
- ),
- ],
- ),
- ),
- );
-}
-
class VideoRow extends StatelessWidget {
const VideoRow({super.key, required this.clip, required this.onTap});
final ArchiveClip clip;
@@ -787,9 +650,8 @@ Map<String, List<FrameMatch>> groupMoments(List<FrameMatch> hits) {
}
class SearchPage extends StatefulWidget {
- const SearchPage({super.key, required this.archive, this.place});
+ const SearchPage({super.key, required this.archive});
final ArchiveController archive;
- final String? place;
@override
State<SearchPage> createState() => _SearchPageState();
}
@@ -797,8 +659,6 @@ class SearchPage extends StatefulWidget {
class _SearchPageState extends State<SearchPage> {
final query = TextEditingController();
bool broad = false;
- String? imageName;
- String? imageQuery;
final expandedVideos = <String>{};
ArchiveController get archive => widget.archive;
@override
@@ -817,51 +677,12 @@ class _SearchPageState extends State<SearchPage> {
expandedVideos.clear();
if (text != null) query.text = text;
FocusManager.instance.primaryFocus?.unfocus();
- if (query.text.trim().isEmpty && imageQuery == null) return;
- if (archive.connecting) return;
- if (!archive.connected) {
- await showConnection(context, archive);
- if (!mounted || !archive.connected) return;
- }
+ if (query.text.trim().isEmpty) return;
+ if (!archive.connected || !archive.canRead) return;
if (!archive.ready) {
- await prepareArchive(context, archive);
return;
}
- await archive.search(
- query.text,
- maxDistance: broad ? 1.5 : .85,
- place: widget.place,
- imageQuery: imageQuery,
- );
- }
-
- Future<void> chooseReferenceImage() async {
- final file = await openFile(
- acceptedTypeGroups: [
- const XTypeGroup(
- label: 'Reference image',
- extensions: ['jpg', 'jpeg', 'png', 'webp'],
- mimeTypes: ['image/jpeg', 'image/png', 'image/webp'],
- uniformTypeIdentifiers: ['public.image'],
- ),
- ],
- );
- if (file == null) return;
- final bytes = await file.readAsBytes();
- if (bytes.length > 10 * 1024 * 1024) {
- if (mounted) {
- ScaffoldMessenger.of(context).showSnackBar(
- const SnackBar(content: Text('Choose an image smaller than 10 MB.')),
- );
- }
- return;
- }
- if (!mounted) return;
- setState(() {
- imageName = basename(file.path);
- imageQuery = base64Encode(bytes);
- });
- archive.invalidateSearch();
+ await archive.search(query.text, maxDistance: broad ? 1.5 : .85);
}
void options() => showModalBottomSheet<void>(
@@ -920,16 +741,6 @@ class _SearchPageState extends State<SearchPage> {
onChanged: (_) => archive.invalidateSearch(),
onSubmitted: (_) => search(),
trailing: [
- IconButton(
- key: const Key('image_search'),
- tooltip: 'Search with a photo',
- onPressed: archive.searching ? null : chooseReferenceImage,
- icon: Icon(
- imageQuery == null
- ? Icons.add_photo_alternate_outlined
- : Icons.image_outlined,
- ),
- ),
IconButton(
key: const Key('run_search'),
tooltip: archive.searching ? 'Cancel search' : 'Search',
@@ -957,25 +768,6 @@ class _SearchPageState extends State<SearchPage> {
child: ListView(
padding: const EdgeInsets.fromLTRB(16, 12, 16, 32),
children: [
- if (widget.place != null)
- Padding(
- padding: const EdgeInsets.only(bottom: 14),
- child: PlaceContext(place: widget.place!),
- ),
- if (imageQuery != null)
- Padding(
- padding: const EdgeInsets.only(bottom: 14),
- child: ReferenceImageContext(
- name: imageName ?? 'Reference photo',
- onRemove: () {
- setState(() {
- imageName = null;
- imageQuery = null;
- });
- archive.invalidateSearch();
- },
- ),
- ),
if (archive.busy) WorkStatus(archive: archive),
if (batch == null && !archive.searching) ...[
const Padding(
@@ -1460,249 +1252,11 @@ class PlaybackControls extends StatelessWidget {
}
}
-class ImportDetails {
- const ImportDetails({required this.title, required this.place});
- final String title;
- final String place;
-}
-
-String readableFilename(String path) {
- final name = basename(path).replaceFirst(RegExp(r'\.[^.]+$'), '');
- if (name.isEmpty) return 'Travel recording';
- return name
- .replaceAll(RegExp(r'[_-]+'), ' ')
- .split(' ')
- .where((part) => part.isNotEmpty)
- .map((part) => '${part[0].toUpperCase()}${part.substring(1)}')
- .join(' ');
-}
-
-Future<ImportDetails?> showImportDetails(
- BuildContext context,
- String sourceName,
-) => showModalBottomSheet<ImportDetails>(
- context: context,
- isScrollControlled: true,
- useSafeArea: true,
- builder: (_) => ImportDetailsSheet(sourceName: sourceName),
-);
-
-class ImportDetailsSheet extends StatefulWidget {
- const ImportDetailsSheet({super.key, required this.sourceName});
- final String sourceName;
-
- @override
- State<ImportDetailsSheet> createState() => _ImportDetailsSheetState();
-}
-
-class _ImportDetailsSheetState extends State<ImportDetailsSheet> {
- late final TextEditingController title;
- final place = TextEditingController();
- bool showErrors = false;
-
- @override
- void initState() {
- super.initState();
- title = TextEditingController(text: readableFilename(widget.sourceName));
- }
-
- @override
- void dispose() {
- title.dispose();
- place.dispose();
- super.dispose();
- }
-
- void add() {
- final cleanTitle = title.text.trim();
- final cleanPlace = place.text.trim();
- if (cleanTitle.isEmpty || cleanPlace.isEmpty) {
- setState(() => showErrors = true);
- return;
- }
- Navigator.pop(context, ImportDetails(title: cleanTitle, place: cleanPlace));
- }
-
- @override
- Widget build(BuildContext context) => Padding(
- padding: EdgeInsets.fromLTRB(
- 20,
- 0,
- 20,
- MediaQuery.viewInsetsOf(context).bottom + 20,
- ),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- const Text(
- 'Add to a trip',
- style: TextStyle(fontSize: 22, fontWeight: FontWeight.w600),
- ),
- const SizedBox(height: 6),
- const Text(
- 'The place stays with the recording and can be used to narrow search.',
- style: TextStyle(color: secondary),
- ),
- const SizedBox(height: 20),
- TextField(
- key: const Key('import_title'),
- controller: title,
- textCapitalization: TextCapitalization.sentences,
- decoration: InputDecoration(
- labelText: 'Recording name',
- errorText: showErrors && title.text.trim().isEmpty
- ? 'Enter a name'
- : null,
- border: const OutlineInputBorder(),
- ),
- ),
- const SizedBox(height: 12),
- TextField(
- key: const Key('import_place'),
- controller: place,
- autofocus: true,
- textCapitalization: TextCapitalization.words,
- onSubmitted: (_) => add(),
- decoration: InputDecoration(
- labelText: 'City or trip',
- hintText: 'Lisbon',
- errorText: showErrors && place.text.trim().isEmpty
- ? 'Enter a place'
- : null,
- border: const OutlineInputBorder(),
- ),
- ),
- const SizedBox(height: 18),
- SizedBox(
- width: double.infinity,
- child: FilledButton(
- key: const Key('add_to_trip'),
- onPressed: add,
- child: const Text('Add recording'),
- ),
- ),
- ],
- ),
- );
-}
-
-Future<void> showConnection(BuildContext context, ArchiveController archive) =>
- showModalBottomSheet<void>(
- context: context,
- isScrollControlled: true,
- useSafeArea: true,
- builder: (_) => ConnectionSheet(archive: archive),
- );
-
-class ConnectionSheet extends StatefulWidget {
- const ConnectionSheet({super.key, required this.archive});
- final ArchiveController archive;
- @override
- State<ConnectionSheet> createState() => _ConnectionSheetState();
-}
-
-class _ConnectionSheetState extends State<ConnectionSheet> {
- final input = TextEditingController();
- @override
- void dispose() {
- input.dispose();
- super.dispose();
- }
-
- Future<void> connect() async {
- final value = input.text.trim();
- if (value.isEmpty) return;
- input.clear();
- FocusManager.instance.primaryFocus?.unfocus();
- final ok = await widget.archive.connect(value);
- if (mounted && ok) Navigator.pop(context);
- }
-
- @override
- Widget build(BuildContext context) => AnimatedBuilder(
- animation: widget.archive,
- builder: (context, _) => SafeArea(
- child: SingleChildScrollView(
- padding: EdgeInsets.fromLTRB(
- 24,
- 0,
- 24,
- MediaQuery.viewInsetsOf(context).bottom + 24,
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: [
- const Text(
- 'Search settings',
- style: TextStyle(fontSize: 22, fontWeight: FontWeight.w500),
- ),
- const SizedBox(height: 16),
- Text(
- widget.archive.connected
- ? 'Connected to the search service.'
- : 'Connect to search inside your videos.',
- ),
- const SizedBox(height: 20),
- TextField(
- key: const Key('api_key'),
- controller: input,
- obscureText: true,
- autocorrect: false,
- enableSuggestions: false,
- enableIMEPersonalizedLearning: false,
- onSubmitted: (_) => connect(),
- decoration: const InputDecoration(
- labelText: 'API key',
- border: OutlineInputBorder(),
- ),
- ),
- const SizedBox(height: 16),
- if (widget.archive.notice.isNotEmpty && !widget.archive.connected)
- Text(widget.archive.notice),
- const SizedBox(height: 8),
- Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- if (widget.archive.connected)
- TextButton(
- onPressed: widget.archive.busy || widget.archive.connecting
- ? null
- : () async {
- await widget.archive.disconnect();
- if (context.mounted) Navigator.pop(context);
- },
- child: const Text('Disconnect'),
- ),
- const SizedBox(width: 8),
- FilledButton(
- key: const Key('connect_button'),
- onPressed: widget.archive.busy || widget.archive.connecting
- ? null
- : connect,
- child: Text(
- widget.archive.connecting ? 'Connecting…' : 'Connect',
- ),
- ),
- ],
- ),
- ],
- ),
- ),
- ),
- );
-}
-
Future<void> prepareArchive(
BuildContext context,
ArchiveController archive,
) async {
- if (archive.busy) return;
- if (!archive.connected) {
- await showConnection(context, archive);
- if (!context.mounted || !archive.connected) return;
- }
+ if (archive.busy || !archive.connected || !archive.canWrite) return;
if (archive.pendingJob.isNotEmpty) {
unawaited(archive.resumeIndex());
return;
diff --git a/example/05_framebase_userlogin/lib/user/auth_adapter.dart b/example/05_framebase_userlogin/lib/user/auth_adapter.dart
new file mode 100644
index 0000000..2881199
--- /dev/null
+++ b/example/05_framebase_userlogin/lib/user/auth_adapter.dart
@@ -0,0 +1,16 @@
+/// The host application owns Firebase identity. The offline implementation
+/// emits the same nullable user state without loading Firebase packages.
+class AppUser {
+ const AppUser(this.uid, {this.email, this.label});
+ final String uid;
+ final String? email, label;
+ String get displayName => label ?? email ?? uid;
+}
+
+abstract interface class FirebaseAuthAdapter {
+ Stream<AppUser?> get users;
+ Future<void> signIn(String email, String password);
+ Future<void> signOut();
+ Future<String?> idToken(AppUser user);
+ Future<void> close();
+}
diff --git a/example/05_framebase_userlogin/lib/user/login_page.dart b/example/05_framebase_userlogin/lib/user/login_page.dart
new file mode 100644
index 0000000..1c0291f
--- /dev/null
+++ b/example/05_framebase_userlogin/lib/user/login_page.dart
@@ -0,0 +1,141 @@
+import 'package:flutter/material.dart';
+
+import 'user_session_controller.dart';
+
+class LoginPage extends StatefulWidget {
+ const LoginPage({super.key, required this.session});
+ final UserSessionController session;
+ @override
+ State<LoginPage> createState() => _LoginPageState();
+}
+
+class _LoginPageState extends State<LoginPage> {
+ final email = TextEditingController();
+ final password = TextEditingController();
+ @override
+ void dispose() {
+ email.dispose();
+ password.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) => Scaffold(
+ appBar: AppBar(title: const Text('Framebase')),
+ body: Center(
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 420),
+ child: AnimatedBuilder(
+ animation: widget.session,
+ builder: (context, _) {
+ final state = widget.session.state;
+ return Padding(
+ padding: const EdgeInsets.all(24),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ if (state == SessionState.loading ||
+ state == SessionState.resolving) ...[
+ const LinearProgressIndicator(),
+ const SizedBox(height: 16),
+ const Text('Loading your library…'),
+ ] else if (state == SessionState.denied ||
+ state == SessionState.error) ...[
+ Text(widget.session.message),
+ const SizedBox(height: 16),
+ FilledButton(
+ onPressed: widget.session.retry,
+ child: const Text('Retry'),
+ ),
+ TextButton(
+ onPressed: widget.session.signOut,
+ child: const Text('Sign out'),
+ ),
+ ] else ...[
+ const Text(
+ 'Sign in to your street library',
+ style: TextStyle(fontSize: 22),
+ ),
+ const SizedBox(height: 20),
+ TextField(
+ key: const Key('email'),
+ controller: email,
+ keyboardType: TextInputType.emailAddress,
+ decoration: const InputDecoration(labelText: 'Email'),
+ ),
+ TextField(
+ key: const Key('password'),
+ controller: password,
+ obscureText: true,
+ decoration: const InputDecoration(labelText: 'Password'),
+ ),
+ if (widget.session.message.isNotEmpty)
+ Text(widget.session.message),
+ const SizedBox(height: 16),
+ FilledButton(
+ key: const Key('sign_in'),
+ onPressed: widget.session.signingIn
+ ? null
+ : () => widget.session.signIn(
+ email.text,
+ password.text,
+ ),
+ child: Text(
+ widget.session.signingIn ? 'Signing in…' : 'Sign in',
+ ),
+ ),
+ const SizedBox(height: 12),
+ const Text(
+ 'Offline example: configure a fake account to try the signed-in flow.',
+ ),
+ ],
+ ],
+ ),
+ );
+ },
+ ),
+ ),
+ ),
+ );
+}
+
+class ProfileSheet extends StatelessWidget {
+ const ProfileSheet({super.key, required this.session});
+ final UserSessionController session;
+ @override
+ Widget build(BuildContext context) => SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.all(24),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ session.user?.displayName ?? 'Account',
+ style: const TextStyle(fontSize: 22),
+ ),
+ const SizedBox(height: 12),
+ Text(
+ session.state == SessionState.ready
+ ? 'VMODAL connected'
+ : 'VMODAL unavailable',
+ ),
+ Text('Library: ${session.canRead ? 'read' : 'unavailable'}'),
+ Text(
+ 'Upload and prepare: ${session.canWrite ? 'allowed' : 'unavailable'}',
+ ),
+ const SizedBox(height: 16),
+ FilledButton(
+ key: const Key('sign_out'),
+ onPressed: () {
+ Navigator.pop(context);
+ session.signOut();
+ },
+ child: const Text('Sign out'),
+ ),
+ ],
+ ),
+ ),
+ );
+}
diff --git a/example/05_framebase_userlogin/lib/user/mock_firebase_auth.dart b/example/05_framebase_userlogin/lib/user/mock_firebase_auth.dart
new file mode 100644
index 0000000..bd868d8
--- /dev/null
+++ b/example/05_framebase_userlogin/lib/user/mock_firebase_auth.dart
@@ -0,0 +1,57 @@
+import 'dart:async';
+
+import 'auth_adapter.dart';
+
+/// The default fixture is the intentionally empty app-defined auth response.
+const emptyAuthResponse = <String, Object?>{
+ 'user': null,
+ 'id_token': null,
+ 'vmodal': <String, Object?>{
+ 'api_token': null,
+ 'expires_at': null,
+ 'firebase_uid': null,
+ 'vmodal_user_id': null,
+ 'collection_user_id': null,
+ 'allowed': false,
+ 'permissions': <String>[],
+ },
+};
+
+class MockFirebaseAuth implements FirebaseAuthAdapter {
+ MockFirebaseAuth({AppUser? initial, Map<String, AppUser>? accounts})
+ : _user = initial,
+ accounts = accounts ?? {} {
+ scheduleMicrotask(() => _changes.add(_user));
+ }
+
+ final Map<String, AppUser> accounts;
+ final StreamController<AppUser?> _changes = StreamController.broadcast(
+ sync: true,
+ );
+ AppUser? _user;
+ @override
+ Stream<AppUser?> get users => _changes.stream;
+
+ void setUser(AppUser? user) {
+ _user = user;
+ _changes.add(user);
+ }
+
+ @override
+ Future<void> signIn(String email, String password) async {
+ final user = accounts[email];
+ if (user == null || password.isEmpty) {
+ throw StateError('Sign-in is unavailable in the offline example.');
+ }
+ setUser(user);
+ }
+
+ @override
+ Future<void> signOut() async => setUser(null);
+
+ @override
+ Future<String?> idToken(AppUser user) async => null;
+
+ @override
+ Future<void> close() => _changes.close();
+}
diff --git a/example/05_framebase_userlogin/lib/user/user_collection.dart b/example/05_framebase_userlogin/lib/user/user_collection.dart
new file mode 100644
index 0000000..905e04b
--- /dev/null
+++ b/example/05_framebase_userlogin/lib/user/user_collection.dart
@@ -0,0 +1,19 @@
+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+
+const userProject = 'framebase_streets';
+const userStream = 'street_study';
+final _validId = RegExp(r'^[A-Za-z0-9_]+$');
+
+String userCollection(String id) {
+ if (id.isEmpty || !_validId.hasMatch(id) || id.contains('__')) {
+ throw const ValidationException('Invalid collection user ID');
+ }
+ final name = 'user_$id';
+ if ('${userProject}__$name'.length > 80) {
+ throw const ValidationException('Collection user ID is too long');
+ }
+ return name;
+}
+
+String encodedUserCollection(String id) =>
+ '${userProject}__${userCollection(id)}';
diff --git a/example/05_framebase_userlogin/lib/user/user_session_controller.dart b/example/05_framebase_userlogin/lib/user/user_session_controller.dart
new file mode 100644
index 0000000..b886591
--- /dev/null
+++ b/example/05_framebase_userlogin/lib/user/user_session_controller.dart
@@ -0,0 +1,243 @@
+import 'dart:async';
+
+import 'package:flutter/foundation.dart';
+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+
+import '../data/archive_controller.dart';
+import '../data/search_gateway.dart';
+import 'auth_adapter.dart';
+import 'vmodal_credential.dart';
+
+enum SessionState { loading, signedOut, resolving, ready, denied, error }
+
+typedef GatewayFactory =
+ SearchGateway Function(
+ MutableApiKeyProvider provider,
+ String collectionUserId,
+ Future<void> Function() ensureFresh,
+ );
+
+class UserSessionController extends ChangeNotifier {
+ UserSessionController({
+ required this.auth,
+ required this.credentials,
+ required this.archive,
+ GatewayFactory? gatewayFactory,
+ DateTime Function()? clock,
+ }) : gatewayFactory =
+ gatewayFactory ??
+ ((provider, id, fresh) =>
+ SearchGateway(provider, id, ensureFresh: fresh)),
+ clock = clock ?? DateTime.now {
+ _subscription = auth.users.listen(_onUser);
+ }
+
+ final FirebaseAuthAdapter auth;
+ final VmodalCredentialSource credentials;
+ final ArchiveController archive;
+ final GatewayFactory gatewayFactory;
+ final DateTime Function() clock;
+ late final StreamSubscription<AppUser?> _subscription;
+ SessionState state = SessionState.loading;
+ AppUser? user;
+ VmodalCredential? _credential;
+ MutableApiKeyProvider? _provider;
+ SearchGateway? gateway;
+ Timer? _timer;
+ Future<void>? _refreshing;
+ String message = '';
+ bool signingIn = false;
+ int _generation = 0;
+ bool _disposed = false;
+
+ bool get canRead =>
+ state == SessionState.ready &&
+ (_credential?.permissions.contains('library:read') ?? false);
+ bool get canWrite =>
+ state == SessionState.ready &&
+ (_credential?.permissions.contains('library:write') ?? false);
+
+ void _notify() {
+ if (!_disposed) notifyListeners();
+ }
+
+ void _teardown() {
+ _generation++;
+ _timer?.cancel();
+ _timer = null;
+ archive.deactivate();
+ _provider?.clear();
+ _refreshing = null;
+ final old = gateway;
+ gateway = null;
+ _provider = null;
+ _credential = null;
+ if (old != null) unawaited(old.close());
+ }
+
+ void _onUser(AppUser? next) {
+ if (_disposed) return;
+ if (next?.uid == user?.uid && state != SessionState.loading) return;
+ _teardown();
+ user = next;
+ message = '';
+ state = next == null ? SessionState.signedOut : SessionState.resolving;
+ _notify();
+ if (next != null) unawaited(_resolve(next, _generation));
+ }
+
+ bool _current(AppUser account, int generation) =>
+ !_disposed && generation == _generation && user?.uid == account.uid;
+
+ Future<void> _resolve(AppUser account, int generation) async {
+ SearchGateway? next;
+ try {
+ final firebaseToken = await auth.idToken(account);
+ if (!_current(account, generation)) return;
+ final credential = await credentials.acquire(account, firebaseToken);
+ if (!_current(account, generation)) return;
+ credential.validate(account, clock());
+ final provider = MutableApiKeyProvider(credential.apiToken!);
+ _provider = provider;
+ _credential = credential;
+ next = gatewayFactory(
+ provider,
+ credential.collectionUserId!,
+ ensureFresh,
+ );
+ next.onAccessFailure = (status) {
+ if (_current(account, generation)) {
+ _fail(status == 403 ? SessionState.denied : SessionState.error);
+ }
+ };
+ await next.connect(credential.vmodalUserId!);
+ if (!_current(account, generation)) {
+ await next.close();
+ return;
+ }
+ gateway = next;
+ await archive.activate(
+ credential.collectionUserId!,
+ next,
+ canRead: credential.permissions.contains('library:read'),
+ canWrite: credential.permissions.contains('library:write'),
+ );
+ if (!_current(account, generation)) return;
+ state = SessionState.ready;
+ _schedule();
+ _notify();
+ } on CredentialDenied {
+ if (_current(account, generation)) _fail(SessionState.denied);
+ if (next != null && next != gateway) await next.close();
+ } on Object {
+ if (_current(account, generation)) _fail(SessionState.error);
+ if (next != null && next != gateway) await next.close();
+ }
+ }
+
+ void _fail(SessionState next) {
+ _teardown();
+ state = next;
+ message = next == SessionState.denied
+ ? 'Access to this library is unavailable.'
+ : 'Could not connect your library. Please retry.';
+ _notify();
+ }
+
+ void _schedule() {
+ _timer?.cancel();
+ final expiry = _credential?.expiresAt;
+ if (expiry == null) return;
+ final delay =
+ expiry.difference(clock().toUtc()) - const Duration(seconds: 60);
+ _timer = Timer(delay.isNegative ? Duration.zero : delay, () {
+ unawaited(ensureFresh().catchError((Object _) {}));
+ });
+ }
+
+ Future<void> ensureFresh() {
+ final account = user;
+ final credential = _credential;
+ if (account == null || credential == null || _provider == null) {
+ return Future.error(const CredentialDenied());
+ }
+ if (credential.expiresAt!.isAfter(
+ clock().toUtc().add(const Duration(seconds: 60)),
+ )) {
+ return Future.value();
+ }
+ final current = _refreshing;
+ if (current != null) return current;
+ final task = _refresh(account, _generation);
+ _refreshing = task;
+ task.then(
+ (_) {
+ if (identical(_refreshing, task)) _refreshing = null;
+ },
+ onError: (Object _) {
+ if (identical(_refreshing, task)) _refreshing = null;
+ },
+ );
+ return task;
+ }
+
+ Future<void> _refresh(AppUser account, int generation) async {
+ try {
+ final firebaseToken = await auth.idToken(account);
+ if (!_current(account, generation)) throw const CredentialDenied();
+ final renewed = await credentials.acquire(account, firebaseToken);
+ if (!_current(account, generation)) throw const CredentialDenied();
+ renewed.validate(account, clock(), previous: _credential);
+ _provider!.rotate(renewed.apiToken!);
+ _credential = renewed;
+ _schedule();
+ _notify();
+ } on Object {
+ if (_current(account, generation)) _fail(SessionState.error);
+ rethrow;
+ }
+ }
+
+ Future<void> signIn(String email, String password) async {
+ signingIn = true;
+ message = '';
+ _notify();
+ try {
+ await auth.signIn(email, password);
+ } on Object {
+ message = 'Sign-in failed. Check your details and retry.';
+ _notify();
+ } finally {
+ signingIn = false;
+ _notify();
+ }
+ }
+
+ Future<void> retry() async {
+ final account = user;
+ if (account == null) return;
+ _teardown();
+ state = SessionState.resolving;
+ message = '';
+ _notify();
+ await _resolve(account, _generation);
+ }
+
+ Future<void> signOut() async {
+ _teardown();
+ user = null;
+ state = SessionState.signedOut;
+ message = '';
+ _notify();
+ await auth.signOut();
+ }
+
+ @override
+ void dispose() {
+ _disposed = true;
+ _teardown();
+ unawaited(_subscription.cancel());
+ unawaited(auth.close());
+ super.dispose();
+ }
+}
diff --git a/example/05_framebase_userlogin/lib/user/vmodal_credential.dart b/example/05_framebase_userlogin/lib/user/vmodal_credential.dart
new file mode 100644
index 0000000..12d6e17
--- /dev/null
+++ b/example/05_framebase_userlogin/lib/user/vmodal_credential.dart
@@ -0,0 +1,94 @@
+import 'auth_adapter.dart';
+import 'user_collection.dart';
+
+class VmodalCredential {
+ const VmodalCredential({
+ required this.apiToken,
+ required this.expiresAt,
+ required this.firebaseUid,
+ required this.vmodalUserId,
+ required this.collectionUserId,
+ required this.allowed,
+ required this.permissions,
+ });
+ final String? apiToken, firebaseUid, vmodalUserId, collectionUserId;
+ final DateTime? expiresAt;
+ final bool allowed;
+ final Set<String> permissions;
+
+ factory VmodalCredential.fromJson(Map<String, Object?> data) {
+ final raw = data['expires_at'];
+ return VmodalCredential(
+ apiToken: data['api_token'] as String?,
+ expiresAt: raw is String ? DateTime.tryParse(raw)?.toUtc() : null,
+ firebaseUid: data['firebase_uid'] as String?,
+ vmodalUserId: data['vmodal_user_id'] as String?,
+ collectionUserId: data['collection_user_id'] as String?,
+ allowed: data['allowed'] == true,
+ permissions: (data['permissions'] as List? ?? [])
+ .whereType<String>()
+ .toSet(),
+ );
+ }
+
+ void validate(AppUser user, DateTime now, {VmodalCredential? previous}) {
+ if (!allowed) throw const CredentialDenied();
+ if (firebaseUid != user.uid ||
+ vmodalUserId == null ||
+ vmodalUserId!.isEmpty ||
+ collectionUserId == null ||
+ apiToken == null ||
+ apiToken!.trim().isEmpty ||
+ expiresAt == null ||
+ !expiresAt!.isAfter(now.toUtc()) ||
+ (previous != null &&
+ (previous.vmodalUserId != vmodalUserId ||
+ previous.collectionUserId != collectionUserId))) {
+ throw const CredentialDenied();
+ }
+ userCollection(collectionUserId!);
+ if (!permissions.contains('library:read')) {
+ throw const CredentialDenied();
+ }
+ }
+}
+
+class CredentialDenied implements Exception {
+ const CredentialDenied();
+ @override
+ String toString() => 'Access to this library is unavailable.';
+}
+
+abstract interface class VmodalCredentialSource {
+ Future<VmodalCredential> acquire(AppUser user, String? firebaseIdToken);
+}
+
+class MockVmodalCredentialSource implements VmodalCredentialSource {
+ MockVmodalCredentialSource([List<VmodalCredential>? responses])
+ : responses = responses ?? [];
+ final List<VmodalCredential> responses;
+ int calls = 0;
+ @override
+ Future<VmodalCredential> acquire(
+ AppUser user,
+ String? firebaseIdToken,
+ ) async {
+ calls++;
+ if (responses.isEmpty) {
+ return VmodalCredential.fromJson(
+ Map<String, Object?>.from(emptyCredential),
+ );
+ }
+ return responses.removeAt(0);
+ }
+}
+
+const emptyCredential = <String, Object?>{
+ 'api_token': null,
+ 'expires_at': null,
+ 'firebase_uid': null,
+ 'vmodal_user_id': null,
+ 'collection_user_id': null,
+ 'allowed': false,
+ 'permissions': <String>[],
+};
diff --git a/example/05_framebase_userlogin/pubspec.lock b/example/05_framebase_userlogin/pubspec.lock
new file mode 100644
index 0000000..e13653f
--- /dev/null
+++ b/example/05_framebase_userlogin/pubspec.lock
@@ -0,0 +1,616 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.7.0"
+ async:
+ dependency: transitive
+ description:
+ name: async
+ sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.13.1"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.2"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.1"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.2"
+ code_assets:
+ dependency: transitive
+ description:
+ name: code_assets
+ sha256: bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.19.1"
+ cross_file:
+ dependency: transitive
+ description:
+ name: cross_file
+ sha256: f141ea4f277af142a0356955707f6556f37b03947d39d55585981a06ca437bd6
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.3.5+5"
+ crypto:
+ dependency: transitive
+ description:
+ name: crypto
+ sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.7"
+ csslib:
+ dependency: transitive
+ description:
+ name: csslib
+ sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.2"
+ cupertino_icons:
+ dependency: "direct main"
+ description:
+ name: cupertino_icons
+ sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.9"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.3"
+ ffi:
+ dependency: transitive
+ description:
+ name: ffi
+ sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
+ file:
+ dependency: transitive
+ description:
+ name: file
+ sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.0.1"
+ file_selector:
+ dependency: "direct main"
+ description:
+ name: file_selector
+ sha256: bd15e43e9268db636b53eeaca9f56324d1622af30e5c34d6e267649758c84d9a
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ file_selector_android:
+ dependency: transitive
+ description:
+ name: file_selector_android
+ sha256: "7c76473740e33a11343c8fce88166049230850d2f19cd8a652ea935fcb8c9206"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.2+10"
+ file_selector_ios:
+ dependency: transitive
+ description:
+ name: file_selector_ios
+ sha256: "97269e5307a0ab813b1fa2430bada0a96e0afb74848417f8676f64ba5de0051c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.3+6"
+ file_selector_linux:
+ dependency: transitive
+ description:
+ name: file_selector_linux
+ sha256: da76400e7872ce7637ffdce12749ec24169c25f6195c28372208e65a24bcd2ab
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.4+1"
+ file_selector_macos:
+ dependency: transitive
+ description:
+ name: file_selector_macos
+ sha256: d57c62362766b5e7ae739448650b66c6aab7a68ba7ecc65e04018652645ae0f4
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.5+1"
+ file_selector_platform_interface:
+ dependency: transitive
+ description:
+ name: file_selector_platform_interface
+ sha256: "35e0bd61ebcdb91a3505813b055b09b79dfdc7d0aee9c09a7ba59ae4bb13dc85"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.7.0"
+ file_selector_web:
+ dependency: transitive
+ description:
+ name: file_selector_web
+ sha256: "73181fbc5257776d8ecaa6a94ab3c8e920ad143b9132a6d984a9271dfc6928d3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.5"
+ file_selector_windows:
+ dependency: transitive
+ description:
+ name: file_selector_windows
+ sha256: fbefc5fb92c6d3cbe8d284a2cd971b593bb07d2cd6da8557b81a862250b4acec
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.9.3+6"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_driver:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_lints:
+ dependency: "direct dev"
+ description:
+ name: flutter_lints
+ sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.0"
+ flutter_test:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_web_plugins:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ fuchsia_remote_debug_protocol:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ hooks:
+ dependency: transitive
+ description:
+ name: hooks
+ sha256: "9a62a50b50b769a737bc0a8ff381f333529df3ab746b2f6b02e83760231455ba"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.2"
+ html:
+ dependency: transitive
+ description:
+ name: html
+ sha256: "43b67b8f43321ab066817dfac5619596c98bb1b61624e77203bb4351785f9699"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.15.7"
+ http:
+ dependency: transitive
+ description:
+ name: http
+ sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.6.0"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.1.2"
+ integration_test:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ jni:
+ dependency: transitive
+ description:
+ name: jni
+ sha256: f038e58b4dc2c9037f50e233175086337e0b305e356d28211bf55f21c504cbd3
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.3"
+ jni_flutter:
+ dependency: transitive
+ description:
+ name: jni_flutter
+ sha256: b2310cdd4c18c65c081ab141a41efa94aa26c65431803703ece51996f174f351
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.3"
+ jni_util:
+ dependency: transitive
+ description:
+ name: jni_util
+ sha256: "1ba86da04a5f2bf18fde2edb235587e70c5b0fc5bd4ba955f46b00942c3fc35f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ leak_tracker:
+ dependency: transitive
+ description:
+ name: leak_tracker
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
+ url: "https://pub.dev"
+ source: hosted
+ version: "11.0.2"
+ leak_tracker_flutter_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_flutter_testing
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.10"
+ leak_tracker_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_testing
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.2"
+ lints:
+ dependency: transitive
+ description:
+ name: lints
+ sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.1.0"
+ logging:
+ dependency: transitive
+ description:
+ name: logging
+ sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.19"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.13.0"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.18.0"
+ objective_c:
+ dependency: transitive
+ description:
+ name: objective_c
+ sha256: b7fb95a6d9a4f009edd63dc5ac69f07420b23a16161c6dd8660290b59c602e8e
+ url: "https://pub.dev"
+ source: hosted
+ version: "9.5.0"
+ package_config:
+ dependency: transitive
+ description:
+ name: package_config
+ sha256: ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.0"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ path_provider:
+ dependency: "direct main"
+ description:
+ name: path_provider
+ sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.6"
+ path_provider_android:
+ dependency: transitive
+ description:
+ name: path_provider_android
+ sha256: "69cbd515a62b94d32a7944f086b2f82b4ac40a1d45bebfc00813a430ab2dabcd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.1"
+ path_provider_foundation:
+ dependency: transitive
+ description:
+ name: path_provider_foundation
+ sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.0"
+ path_provider_linux:
+ dependency: transitive
+ description:
+ name: path_provider_linux
+ sha256: "58c2005f147315b11e9b4a7bc889cd5203e250cba8e3f012dae259b4972b5c16"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.2"
+ path_provider_platform_interface:
+ dependency: transitive
+ description:
+ name: path_provider_platform_interface
+ sha256: "484838772624c3a4b94f1e44a3e19897fee738f2d5c4ce448443b0417f7c9dda"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.3"
+ path_provider_windows:
+ dependency: transitive
+ description:
+ name: path_provider_windows
+ sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.0"
+ platform:
+ dependency: transitive
+ description:
+ name: platform
+ sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.6"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.8"
+ process:
+ dependency: transitive
+ description:
+ name: process
+ sha256: "4242ba3508d37e01808bdf71ad1d5bb93a8d671bf2e7450e6b1b353fb0808891"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.0.6"
+ pub_semver:
+ dependency: transitive
+ description:
+ name: pub_semver
+ sha256: "261236774e8b1d69cfc6b9eabbc96c40f25e7a2d6b171f3385d4f65d5734fb24"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.1"
+ record_use:
+ dependency: transitive
+ description:
+ name: record_use
+ sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.0"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.10.2"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.12.1"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.1"
+ sync_http:
+ dependency: transitive
+ description:
+ name: sync_http
+ sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.3.1"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.2"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.7.11"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.0"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
+ video_player:
+ dependency: "direct main"
+ description:
+ name: video_player
+ sha256: "8c837b570dccb9ae6ff73d2e0b03c7e708bfefd3bd1194faa7f3e7f200dfc399"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.14.0"
+ video_player_android:
+ dependency: transitive
+ description:
+ name: video_player_android
+ sha256: d27054dea34d748a44f06d433a57005d2aac69944485b0abbaed3303dbcfa3f1
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.12.2"
+ video_player_avfoundation:
+ dependency: transitive
+ description:
+ name: video_player_avfoundation
+ sha256: "436fd029bd1c1e303b2d95ebd76948893f3c28dab286e7235ba9dd7b22533bf0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.11.1"
+ video_player_platform_interface:
+ dependency: transitive
+ description:
+ name: video_player_platform_interface
+ sha256: "92c0fbabe20c788e71fd10d26cea998d0d253282e65d145aed0818731cf593ce"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.9.0"
+ video_player_web:
+ dependency: transitive
+ description:
+ name: video_player_web
+ sha256: "9f3c00be2ef9b76a95d94ac5119fb843dca6f2c69e6c9968f6f2b6c9e7afbdeb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.0"
+ vm_service:
+ dependency: transitive
+ description:
+ name: vm_service
+ sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "15.3.0"
+ vmodal_sdk_flutter:
+ dependency: "direct main"
+ description:
+ path: "../.."
+ relative: true
+ source: path
+ version: "1.2.2"
+ web:
+ dependency: transitive
+ description:
+ name: web
+ sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ webdriver:
+ dependency: transitive
+ description:
+ name: webdriver
+ sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.0"
+ xdg_directories:
+ dependency: transitive
+ description:
+ name: xdg_directories
+ sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ yaml:
+ dependency: transitive
+ description:
+ name: yaml
+ sha256: f67cdd8e07d3c6329146aaef1ba043542b3134c12489f553ca9a7435d1068aea
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.4"
+sdks:
+ dart: ">=3.12.2 <4.0.0"
+ flutter: ">=3.44.0"
diff --git a/example/05_framebase_userlogin/pubspec.yaml b/example/05_framebase_userlogin/pubspec.yaml
new file mode 100644
index 0000000..441f535
--- /dev/null
+++ b/example/05_framebase_userlogin/pubspec.yaml
@@ -0,0 +1,107 @@
+name: framebase
+description: "A street-video archive demonstrating semantic frame search and timestamp playback with VModal."
+# The following line prevents the package from being accidentally published to
+# pub.dev using `flutter pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+# The following defines the version and build number for your application.
+# A version number is three numbers separated by dots, like 1.2.43
+# followed by an optional build number separated by a +.
+# Both the version and the builder number may be overridden in flutter
+# build by specifying --build-name and --build-number, respectively.
+# In Android, build-name is used as versionName while build-number used as versionCode.
+# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
+# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
+# Read more about iOS versioning at
+# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
+# In Windows, build-name is used as the major, minor, and patch parts
+# of the product and file versions while build-number is used as the build suffix.
+version: 1.2.1+4
+
+environment:
+ sdk: ^3.12.2
+
+# Dependencies specify other packages that your package needs in order to work.
+# To automatically upgrade your package dependencies to the latest versions
+# consider running `flutter pub upgrade --major-versions`. Alternatively,
+# dependencies can be manually updated by changing the version numbers below to
+# the latest version available on pub.dev. To see which dependencies have newer
+# versions available, run `flutter pub outdated`.
+dependencies:
+ flutter:
+ sdk: flutter
+
+ vmodal_sdk_flutter:
+ path: ../..
+
+ # The following adds the Cupertino Icons font to your application.
+ # Use with the CupertinoIcons class for iOS style icons.
+ cupertino_icons: ^1.0.8
+ file_selector: ^1.1.0
+ path_provider: ^2.1.5
+ video_player: ^2.10.0
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+ integration_test:
+ sdk: flutter
+
+ # The "flutter_lints" package below contains a set of recommended lints to
+ # encourage good coding practices. The lint set provided by the package is
+ # activated in the `analysis_options.yaml` file located at the root of your
+ # package. See that file for information about deactivating specific lint
+ # rules and activating additional ones.
+ flutter_lints: ^6.0.0
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter packages.
+flutter:
+
+ # The following line ensures that the Material Icons font is
+ # included with your application, so that you can use the icons in
+ # the material Icons class.
+ uses-material-design: true
+
+ assets:
+ - assets/videos/
+ - assets/stills/
+ - assets/fonts/OFL.txt
+
+ fonts:
+ - family: Instrument Sans
+ fonts:
+ - asset: assets/fonts/InstrumentSans.ttf
+
+ # To add assets to your application, add an assets section, like this:
+ # assets:
+ # - images/a_dot_burr.jpeg
+ # - images/a_dot_ham.jpeg
+
+ # An image asset can refer to one or more resolution-specific "variants", see
+ # https://flutter.dev/to/resolution-aware-images
+
+ # For details regarding adding assets from package dependencies, see
+ # https://flutter.dev/to/asset-from-package
+
+ # To add custom fonts to your application, add a fonts section here,
+ # in this "flutter" section. Each entry in this list should have a
+ # "family" key with the font family name, and a "fonts" key with a
+ # list giving the asset and other descriptors for the font. For
+ # example:
+ # fonts:
+ # - family: Schyler
+ # fonts:
+ # - asset: fonts/Schyler-Regular.ttf
+ # - asset: fonts/Schyler-Italic.ttf
+ # style: italic
+ # - family: Trajan Pro
+ # fonts:
+ # - asset: fonts/TrajanPro.ttf
+ # - asset: fonts/TrajanPro_Bold.ttf
+ # weight: 700
+ #
+ # For details regarding fonts from package dependencies,
+ # see https://flutter.dev/to/font-from-package
diff --git a/example/05_framebase_userlogin/readme_assets/library.png b/example/05_framebase_userlogin/readme_assets/library.png
new file mode 100644
index 0000000..0d69fe2
Binary files /dev/null and b/example/05_framebase_userlogin/readme_assets/library.png differ
diff --git a/example/05_framebase_userlogin/readme_assets/playback.png b/example/05_framebase_userlogin/readme_assets/playback.png
new file mode 100644
index 0000000..cadae38
Binary files /dev/null and b/example/05_framebase_userlogin/readme_assets/playback.png differ
diff --git a/example/05_framebase_userlogin/readme_assets/search.png b/example/05_framebase_userlogin/readme_assets/search.png
new file mode 100644
index 0000000..00dc5a4
Binary files /dev/null and b/example/05_framebase_userlogin/readme_assets/search.png differ
diff --git a/example/05_framebase_userlogin/test/archive_controller_test.dart b/example/05_framebase_userlogin/test/archive_controller_test.dart
new file mode 100644
index 0000000..5652fd3
--- /dev/null
+++ b/example/05_framebase_userlogin/test/archive_controller_test.dart
@@ -0,0 +1,46 @@
+import 'dart:io';
+
+import 'package:flutter_test/flutter_test.dart';
+import 'package:framebase/data/archive_controller.dart';
+import 'package:framebase/data/search_gateway.dart';
+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+
+void main() {
+ test(
+ 'archive manifests and imported files stay with their account',
+ () async {
+ final root = await Directory.systemTemp.createTemp('framebase_test_');
+ addTearDown(() => root.delete(recursive: true));
+ final a = SearchGateway(MutableApiKeyProvider('fixture-a'), 'alice');
+ final b = SearchGateway(MutableApiKeyProvider('fixture-b'), 'bob');
+ final c = ArchiveController(supportDirectory: root);
+ await c.activate('alice', a, canRead: true, canWrite: true);
+ c.clips.first.uploaded = true;
+ c.pendingJob = 'alice-job';
+ c.record('Alice upload', 'done');
+ final src = File('${root.path}/sample.mp4');
+ await src.writeAsBytes([1, 2, 3]);
+ await c.importFile(src.path, 3);
+ await c.save();
+ expect(c.clips.last.path, startsWith('${root.path}/accounts/alice/'));
+ c.deactivate();
+ expect(c.events, isEmpty);
+ expect(c.pendingJob, isEmpty);
+ await c.activate('bob', b, canRead: true, canWrite: true);
+ expect(c.clips, hasLength(3));
+ expect(c.clips.first.uploaded, isFalse);
+ expect(c.pendingJob, isEmpty);
+ expect(c.events, isEmpty);
+ await c.activate('alice', a, canRead: true, canWrite: true);
+ expect(c.clips, hasLength(4));
+ expect(c.clips.first.uploaded, isTrue);
+ expect(c.pendingJob, 'alice-job');
+ expect(c.events.any((e) => e.title == 'Alice upload'), isTrue);
+ final manifest = File('${root.path}/accounts/alice/archive.json');
+ expect(await manifest.readAsString(), isNot(contains('fixture-a')));
+ await a.close();
+ await b.close();
+ c.dispose();
+ },
+ );
+}
diff --git a/example/05_framebase_userlogin/test/search_gateway_test.dart b/example/05_framebase_userlogin/test/search_gateway_test.dart
new file mode 100644
index 0000000..c14af44
--- /dev/null
+++ b/example/05_framebase_userlogin/test/search_gateway_test.dart
@@ -0,0 +1,220 @@
+import 'dart:convert';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:framebase/data/search_gateway.dart';
+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+import 'package:framebase/user/user_collection.dart';
+
+final accountCollection = encodedUserCollection('alice');
+SearchGateway testGateway(QueueTransport transport) => SearchGateway(
+ MutableApiKeyProvider('test-only-placeholder'),
+ 'alice',
+ transport: transport,
+);
+
+class QueueTransport implements VmodalTransport {
+ QueueTransport(this.responses);
+ final List<Map<String, Object?>> responses;
+ final List<VmodalRequest> requests = [];
+ bool closed = false;
+ @override
+ Future<VmodalResponse> send(VmodalRequest request) async {
+ request.cancellation.throwIfCanceled();
+ requests.add(request);
+ final data = responses.removeAt(0);
+ return VmodalResponse(
+ statusCode: data['__status'] as int? ?? 200,
+ body: Stream.value(utf8.encode(jsonEncode(data))),
+ );
+ }
+
+ @override
+ Future<void> close() async {
+ closed = true;
+ }
+}
+
+void main() {
+ test(
+ 'connect resolves the account and discovers the current index',
+ () async {
+ final transport = QueueTransport([
+ {'user_id': 'account-1'},
+ {
+ 'total': 1,
+ 'data': [
+ {
+ 'mode': 'vid_file',
+ 'group_name': accountCollection,
+ 'lancedb_versions': ['v2', 'v4'],
+ },
+ ],
+ },
+ {'data': [], 'total': 0},
+ ]);
+ final gateway = testGateway(transport);
+
+ await gateway.connect('account-1');
+
+ expect(gateway.accountId, 'account-1');
+ expect(gateway.version, 4);
+ expect(transport.requests, hasLength(3));
+ await gateway.close();
+ },
+ );
+
+ test(
+ 'bulk frames retain search order and tolerate partial missing images',
+ () async {
+ const route = '/api/external/v1/image/get_image';
+ final transport = QueueTransport([
+ {
+ 'data': [
+ {'title': 'first', 'ts_unix': '0000000006000', 'score': .71},
+ {'title': 'second', 'ts_unix': '0000000008000', 'score': .76},
+ {'title': 'missing', 'ts_unix': '0000000010000', 'score': .80},
+ ],
+ 'cnt_total': 3,
+ 'execution_time_ms': 42.5,
+ },
+ {
+ 'records': [
+ {
+ 'input_index': 1.0,
+ 'found': true,
+ 'url_pre_signed': '$route?test=second',
+ },
+ {
+ 'input_index': '0',
+ 'found': true,
+ 'url_pre_signed': '$route?test=first',
+ },
+ {'input_index': 2, 'found': false},
+ {
+ 'input_index': -1,
+ 'found': true,
+ 'url_pre_signed': 'http://invalid.test',
+ },
+ ],
+ },
+ {
+ 'records': [
+ {
+ 'url_pre_signed': '$route?test=first',
+ 'content_base64': base64Encode([1, 2, 3]),
+ },
+ {
+ 'url_pre_signed': '$route?test=second',
+ 'content_base64': base64Encode([4, 5, 6]),
+ },
+ ],
+ },
+ ]);
+ final gateway = testGateway(transport);
+ gateway.version = 2;
+ final result = await gateway.search('crosswalk', maxDistance: .85);
+ expect(result.matches.map((m) => m.filename), [
+ 'first',
+ 'second',
+ 'missing',
+ ]);
+ expect(result.matches[0].imageBytes, [1, 2, 3]);
+ expect(result.matches[1].imageBytes, [4, 5, 6]);
+ expect(result.matches[2].imageBytes, isNull);
+ expect(result.matches[0].imageUrl, isNull);
+ expect(result.matches[0].seconds, 6);
+ expect(result.serverMs, 42.5);
+ final body = transport.requests.first.jsonBody as Map;
+ expect(body['group_name'], accountCollection);
+ expect(body['stream_name'], archiveStream);
+ expect(body['image_emb_score_min'], .85);
+ expect(
+ transport.requests[1].jsonBody.toString(),
+ contains(accountCollection),
+ );
+ expect(
+ transport.requests[1].jsonBody.toString(),
+ contains(archiveStream),
+ );
+ await gateway.close();
+ expect(transport.closed, isTrue);
+ expect(() => gateway.keys.current(), throwsA(isA<AuthException>()));
+ },
+ );
+
+ test('empty search does not request invented images', () async {
+ final transport = QueueTransport([
+ {'data': [], 'cnt_total': 0},
+ ]);
+ final gateway = testGateway(transport);
+ final result = await gateway.search('a dog on a beach');
+ expect(result.matches, isEmpty);
+ expect(transport.requests, hasLength(1));
+ await gateway.close();
+ });
+
+ test(
+ 'client cutoff rejects out-of-threshold beta results before downloading',
+ () async {
+ final transport = QueueTransport([
+ {
+ 'data': [
+ {'title': 'street', 'score': .926, 'ts_unix': '0000000006000'},
+ ],
+ 'cnt_total': 1,
+ },
+ ]);
+ final gateway = testGateway(transport);
+ final result = await gateway.search('a dog on a beach', maxDistance: .85);
+ expect(result.matches, isEmpty);
+ expect(result.total, 1); // Raw server count is not rewritten.
+ expect(transport.requests, hasLength(1));
+ await gateway.close();
+ },
+ );
+
+ test('canceled search never reaches transport', () async {
+ final transport = QueueTransport([]);
+ final gateway = testGateway(transport);
+ final token = CancellationToken()..cancel();
+ await expectLater(
+ gateway.search('bus', cancellation: token),
+ throwsA(isA<OperationCanceled>()),
+ );
+ expect(transport.requests, isEmpty);
+ await gateway.close();
+ });
+
+ test(
+ 'index creation uses the user scope and status uses returned ID',
+ () async {
+ final transport = QueueTransport([
+ {'job_id': 'job-123', 'status': 'queued'},
+ {'job_id': 'job-123', 'status': 'success'},
+ ]);
+ final gateway = testGateway(transport);
+ final token = CancellationToken();
+ final job = await gateway.createIndex(token);
+ final status = await gateway.indexStatus(job.jobId, token);
+ expect(job.jobId, 'job-123');
+ expect(status.status, 'success');
+ final body = transport.requests.first.jsonBody as Map;
+ expect(body['group_name'], accountCollection);
+ expect(body['stream_name'], archiveStream);
+ expect(transport.requests.last.uri.path, contains('job-123'));
+ await gateway.close();
+ },
+ );
+
+ test('401 reports auth failure without replaying the search', () async {
+ final transport = QueueTransport([
+ {'__status': 401, 'detail': 'expired'},
+ ]);
+ final gateway = testGateway(transport);
+ var status = 0;
+ gateway.onAccessFailure = (value) => status = value;
+ await expectLater(gateway.search('bus'), throwsA(isA<AuthException>()));
+ expect(status, 401);
+ expect(transport.requests, hasLength(1));
+ await gateway.close();
+ });
+}
diff --git a/example/05_framebase_userlogin/test/user_collection_test.dart b/example/05_framebase_userlogin/test/user_collection_test.dart
new file mode 100644
index 0000000..2a69136
--- /dev/null
+++ b/example/05_framebase_userlogin/test/user_collection_test.dart
@@ -0,0 +1,27 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:framebase/user/user_collection.dart';
+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+
+void main() {
+ test('stable project and user scope', () {
+ expect(userCollection('A_9'), 'user_A_9');
+ expect(encodedUserCollection('A_9'), 'framebase_streets__user_A_9');
+ expect(encodedUserCollection('A_9'), encodedUserCollection('A_9'));
+ });
+ test('invalid IDs cannot collide or exceed the backend limit', () {
+ for (final id in ['', 'a-b', 'a.b', 'a b', 'a__b', ' a', 'é']) {
+ expect(
+ () => userCollection(id),
+ throwsA(isA<ValidationException>()),
+ reason: 'invalid ID: $id',
+ );
+ }
+ const prefix = 'framebase_streets__user_';
+ final maxId = 'a' * (80 - prefix.length);
+ expect(encodedUserCollection(maxId).length, 80);
+ expect(
+ () => userCollection('${maxId}a'),
+ throwsA(isA<ValidationException>()),
+ );
+ });
+}
diff --git a/example/05_framebase_userlogin/test/user_session_controller_test.dart b/example/05_framebase_userlogin/test/user_session_controller_test.dart
new file mode 100644
index 0000000..25b0a13
--- /dev/null
+++ b/example/05_framebase_userlogin/test/user_session_controller_test.dart
@@ -0,0 +1,279 @@
+import 'dart:async';
+import 'dart:io';
+
+import 'package:flutter_test/flutter_test.dart';
+import 'package:framebase/data/archive_controller.dart';
+import 'package:framebase/data/search_gateway.dart';
+import 'package:framebase/user/auth_adapter.dart';
+import 'package:framebase/user/mock_firebase_auth.dart';
+import 'package:framebase/user/user_session_controller.dart';
+import 'package:framebase/user/vmodal_credential.dart';
+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+
+class SessionGateway extends SearchGateway {
+ SessionGateway(super.keys, super.collectionUserId, this.owner);
+ final String owner;
+ @override
+ Future<void> connect(String expectedUserId) async {
+ if (expectedUserId != owner) throw const AuthException('Wrong owner');
+ accountId = owner;
+ }
+}
+
+class QueueCredentials implements VmodalCredentialSource {
+ QueueCredentials(this.items);
+ final List<Future<VmodalCredential>> items;
+ int calls = 0;
+ @override
+ Future<VmodalCredential> acquire(AppUser user, String? firebaseIdToken) {
+ calls++;
+ return items.removeAt(0);
+ }
+}
+
+VmodalCredential credential(
+ String uid,
+ DateTime expiry, {
+ String? token,
+ String? owner,
+ bool allowed = true,
+ Set<String> grants = const {'library:read', 'library:write'},
+}) => VmodalCredential(
+ apiToken: token ?? 'placeholder-$uid',
+ expiresAt: expiry,
+ firebaseUid: uid,
+ vmodalUserId: owner ?? 'vm-$uid',
+ collectionUserId: uid,
+ allowed: allowed,
+ permissions: grants,
+);
+
+Future<void> settle() => Future<void>.delayed(const Duration(milliseconds: 20));
+
+void main() {
+ test('credential rejects expiry, wrong UID, and missing grants', () {
+ final now = DateTime.utc(2030);
+ const user = AppUser('alice');
+ expect(
+ () => credential('alice', now).validate(user, now),
+ throwsA(isA<CredentialDenied>()),
+ );
+ expect(
+ () => credential(
+ 'bob',
+ now.add(const Duration(hours: 1)),
+ ).validate(user, now),
+ throwsA(isA<CredentialDenied>()),
+ );
+ expect(
+ () => credential(
+ 'alice',
+ now.add(const Duration(hours: 1)),
+ grants: {'library:write'},
+ ).validate(user, now),
+ throwsA(isA<CredentialDenied>()),
+ );
+ });
+ test('empty default and denied credential issue no gateway calls', () async {
+ final archive = ArchiveController(
+ persist: false,
+ supportDirectory: Directory.systemTemp,
+ );
+ final auth = MockFirebaseAuth();
+ final source = MockVmodalCredentialSource();
+ var gateways = 0;
+ final session = UserSessionController(
+ auth: auth,
+ credentials: source,
+ archive: archive,
+ gatewayFactory: (key, id, fresh) {
+ gateways++;
+ return SessionGateway(key, id, 'vm-$id');
+ },
+ );
+ expect(session.state, SessionState.loading);
+ await settle();
+ expect(session.state, SessionState.signedOut);
+ expect(source.calls, 0);
+ auth.setUser(const AppUser('alice'));
+ await settle();
+ expect(session.state, SessionState.denied);
+ expect(gateways, 0);
+ expect(archive.connected, isFalse);
+ session.dispose();
+ archive.dispose();
+ });
+
+ test('owner mismatch and missing read grant fail closed', () async {
+ final now = DateTime.utc(2030);
+ for (final grants in [
+ <String>{'library:write'},
+ <String>{'library:read'},
+ ]) {
+ final archive = ArchiveController(
+ persist: false,
+ supportDirectory: Directory.systemTemp,
+ );
+ final auth = MockFirebaseAuth();
+ final source = QueueCredentials([
+ Future.value(
+ credential(
+ 'alice',
+ now.add(const Duration(hours: 1)),
+ grants: grants,
+ ),
+ ),
+ ]);
+ final session = UserSessionController(
+ auth: auth,
+ credentials: source,
+ archive: archive,
+ clock: () => now,
+ gatewayFactory: (key, id, fresh) =>
+ SessionGateway(key, id, 'different'),
+ );
+ await settle();
+ auth.setUser(const AppUser('alice'));
+ await settle();
+ expect(
+ session.state,
+ grants.contains('library:read')
+ ? SessionState.error
+ : SessionState.denied,
+ );
+ expect(archive.connected, isFalse);
+ session.dispose();
+ archive.dispose();
+ }
+ });
+
+ test(
+ 'refresh is single flight, rotates key, and failure clears it',
+ () async {
+ var now = DateTime.utc(2030);
+ final pending = Completer<VmodalCredential>();
+ final failed = Completer<VmodalCredential>();
+ final source = QueueCredentials([
+ Future.value(credential('alice', now.add(const Duration(minutes: 2)))),
+ pending.future,
+ failed.future,
+ ]);
+ final archive = ArchiveController(
+ persist: false,
+ supportDirectory: Directory.systemTemp,
+ );
+ final auth = MockFirebaseAuth();
+ final session = UserSessionController(
+ auth: auth,
+ credentials: source,
+ archive: archive,
+ clock: () => now,
+ gatewayFactory: (key, id, fresh) => SessionGateway(key, id, 'vm-alice'),
+ );
+ await settle();
+ auth.setUser(const AppUser('alice'));
+ await settle();
+ expect(session.state, SessionState.ready);
+ final provider = session.gateway!.keys;
+ now = now.add(const Duration(seconds: 70));
+ final a = session.ensureFresh();
+ final b = session.ensureFresh();
+ await settle();
+ expect(source.calls, 2);
+ pending.complete(
+ credential(
+ 'alice',
+ now.add(const Duration(minutes: 2)),
+ token: 'rotated',
+ ),
+ );
+ await Future.wait([a, b]);
+ expect(provider.current(), 'rotated');
+ now = now.add(const Duration(seconds: 70));
+ final renewal = expectLater(
+ session.ensureFresh(),
+ throwsA(isA<CredentialDenied>()),
+ );
+ failed.completeError(const CredentialDenied());
+ await renewal;
+ expect(session.state, SessionState.error);
+ expect(() => provider.current(), throwsA(isA<AuthException>()));
+ session.dispose();
+ archive.dispose();
+ },
+ );
+
+ test('late account A response cannot replace account B', () async {
+ final now = DateTime.utc(2030);
+ final delayed = Completer<VmodalCredential>();
+ final source = QueueCredentials([
+ delayed.future,
+ Future.value(credential('bob', now.add(const Duration(hours: 1)))),
+ ]);
+ final archive = ArchiveController(
+ persist: false,
+ supportDirectory: Directory.systemTemp,
+ );
+ final auth = MockFirebaseAuth();
+ final session = UserSessionController(
+ auth: auth,
+ credentials: source,
+ archive: archive,
+ clock: () => now,
+ gatewayFactory: (key, id, fresh) => SessionGateway(key, id, 'vm-$id'),
+ );
+ await settle();
+ auth.setUser(const AppUser('alice'));
+ await settle();
+ auth.setUser(const AppUser('bob'));
+ await settle();
+ expect(session.gateway?.collection, 'framebase_streets__user_bob');
+ delayed.complete(credential('alice', now.add(const Duration(hours: 1))));
+ await settle();
+ expect(session.gateway?.collection, 'framebase_streets__user_bob');
+ await session.signOut();
+ expect(session.state, SessionState.signedOut);
+ expect(archive.clips.any((c) => c.uploaded), isFalse);
+ session.dispose();
+ archive.dispose();
+ });
+
+ test('late account A refresh cannot reopen after switching to B', () async {
+ var now = DateTime.utc(2030);
+ final delayed = Completer<VmodalCredential>();
+ final source = QueueCredentials([
+ Future.value(credential('alice', now.add(const Duration(minutes: 2)))),
+ delayed.future,
+ Future.value(credential('bob', now.add(const Duration(hours: 1)))),
+ ]);
+ final archive = ArchiveController(
+ persist: false,
+ supportDirectory: Directory.systemTemp,
+ );
+ final auth = MockFirebaseAuth();
+ final session = UserSessionController(
+ auth: auth,
+ credentials: source,
+ archive: archive,
+ clock: () => now,
+ gatewayFactory: (key, id, fresh) => SessionGateway(key, id, 'vm-$id'),
+ );
+ await settle();
+ auth.setUser(const AppUser('alice'));
+ await settle();
+ now = now.add(const Duration(seconds: 70));
+ final old = expectLater(
+ session.ensureFresh(),
+ throwsA(isA<CredentialDenied>()),
+ );
+ await settle();
+ auth.setUser(const AppUser('bob'));
+ await settle();
+ expect(session.gateway?.collection, 'framebase_streets__user_bob');
+ delayed.complete(credential('alice', now.add(const Duration(hours: 1))));
+ await old;
+ expect(session.gateway?.collection, 'framebase_streets__user_bob');
+ session.dispose();
+ archive.dispose();
+ });
+}
diff --git a/example/05_framebase_userlogin/test/widget_test.dart b/example/05_framebase_userlogin/test/widget_test.dart
new file mode 100644
index 0000000..57df2d7
--- /dev/null
+++ b/example/05_framebase_userlogin/test/widget_test.dart
@@ -0,0 +1,210 @@
+import 'dart:io';
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:framebase/main.dart';
+import 'package:framebase/data/archive_controller.dart';
+import 'package:framebase/data/search_gateway.dart';
+import 'package:framebase/user/auth_adapter.dart';
+import 'package:framebase/user/mock_firebase_auth.dart';
+import 'package:framebase/user/user_session_controller.dart';
+import 'package:framebase/user/vmodal_credential.dart';
+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+
+class FakeGateway extends SearchGateway {
+ FakeGateway(super.keys, super.collectionUserId);
+ @override
+ Future<void> connect(String expectedUserId) async {
+ accountId = expectedUserId;
+ version = 1;
+ }
+}
+
+VmodalCredential fixture() => VmodalCredential(
+ apiToken: 'test-only-placeholder',
+ expiresAt: DateTime.now().toUtc().add(const Duration(hours: 1)),
+ firebaseUid: 'alice',
+ vmodalUserId: 'vmodal-alice',
+ collectionUserId: 'alice',
+ allowed: true,
+ permissions: {'library:read', 'library:write'},
+);
+
+void main() {
+ testWidgets(
+ 'search starts with two moments per video and expands on request',
+ (tester) async {
+ final c = ArchiveController(persist: false);
+ c.batch = SearchBatch(
+ matches: [
+ for (final second in [0, 10, 20, 30, 40])
+ FrameMatch(
+ row: const {'score': .7},
+ filename: 'neighborhood_crossing',
+ timestamp: '$second',
+ seconds: second.toDouble(),
+ ),
+ ],
+ total: 5,
+ serverMs: 10,
+ roundTripMs: 20,
+ imageMs: 0,
+ );
+ await tester.pumpWidget(MaterialApp(home: SearchPage(archive: c)));
+ await tester.pumpAndSettle();
+ expect(find.byType(MomentTile), findsNWidgets(2));
+ await tester.tap(find.byKey(const Key('expand_neighborhood_crossing')));
+ await tester.pumpAndSettle();
+ expect(find.byType(MomentTile), findsNWidgets(5));
+ expect(find.textContaining('ms'), findsNothing);
+ c.dispose();
+ },
+ );
+ testWidgets('empty mock opens signed out without requests', (tester) async {
+ final c = ArchiveController(persist: false);
+ final auth = MockFirebaseAuth();
+ final source = MockVmodalCredentialSource();
+ final session = UserSessionController(
+ auth: auth,
+ credentials: source,
+ archive: c,
+ );
+ expect(session.state, SessionState.loading);
+ await tester.pumpWidget(FramebaseApp(controller: c, session: session));
+ await tester.pumpAndSettle();
+ expect(session.state, SessionState.signedOut);
+ expect(source.calls, 0);
+ expect(find.byKey(const Key('sign_in')), findsOneWidget);
+ expect(find.byType(VideoRow), findsNothing);
+ expect(find.byKey(const Key('api_key')), findsNothing);
+ session.dispose();
+ c.dispose();
+ });
+ testWidgets('sign in exposes library and sign out clears it', (tester) async {
+ final c = ArchiveController(
+ persist: false,
+ supportDirectory: Directory.systemTemp,
+ );
+ final auth = MockFirebaseAuth(
+ accounts: {
+ '[email protected]': const AppUser('alice', email: '[email protected]'),
+ },
+ );
+ final source = MockVmodalCredentialSource([fixture()]);
+ final session = UserSessionController(
+ auth: auth,
+ credentials: source,
+ archive: c,
+ gatewayFactory: (provider, id, fresh) => FakeGateway(provider, id),
+ );
+ await tester.pumpWidget(FramebaseApp(controller: c, session: session));
+ await tester.pumpAndSettle();
+ await tester.enterText(find.byKey(const Key('email')), '[email protected]');
+ await tester.enterText(find.byKey(const Key('password')), 'password');
+ await tester.tap(find.byKey(const Key('sign_in')));
+ for (var i = 0; i < 200 && session.state == SessionState.resolving; i++) {
+ await tester.pump(const Duration(milliseconds: 10));
+ }
+ await tester.pumpAndSettle();
+ expect(session.state, SessionState.ready);
+ expect(find.text('Framebase'), findsOneWidget);
+ expect(find.byType(VideoRow), findsWidgets);
+ expect(c.clips.length, 3);
+ for (final label in [
+ 'LIVE',
+ 'COLLECTION / 01',
+ 'STREET ARCHIVE',
+ 'Activity',
+ 'Connected',
+ 'Distance ≤ 0.85',
+ ]) {
+ expect(find.text(label), findsNothing);
+ }
+ expect(find.byType(NavigationBar), findsNothing);
+ await tester.tap(find.byKey(const Key('library_menu')));
+ await tester.pumpAndSettle();
+ await tester.tap(find.text('Profile'));
+ await tester.pumpAndSettle();
+ expect(find.text('VMODAL connected'), findsOneWidget);
+ final keys = session.gateway!.keys;
+ await tester.tap(find.byKey(const Key('sign_out')));
+ await tester.pumpAndSettle();
+ expect(find.byKey(const Key('sign_in')), findsOneWidget);
+ expect(find.byType(VideoRow), findsNothing);
+ expect(c.connected, isFalse);
+ expect(session.gateway, isNull);
+ expect(() => keys.current(), throwsA(isA<AuthException>()));
+ session.dispose();
+ c.dispose();
+ });
+ testWidgets('search screen preserves grouped results', (tester) async {
+ final c = ArchiveController(persist: false);
+ await tester.pumpWidget(MaterialApp(home: SearchPage(archive: c)));
+ await tester.pumpAndSettle();
+ expect(find.text('Try a search'), findsOneWidget);
+ expect(find.byType(MomentTile), findsNothing);
+ c.dispose();
+ });
+ testWidgets('320px layout and secondary history route', (tester) async {
+ tester.view.physicalSize = const Size(320, 680);
+ tester.view.devicePixelRatio = 1;
+ addTearDown(tester.view.resetPhysicalSize);
+ addTearDown(tester.view.resetDevicePixelRatio);
+ final c = ArchiveController(persist: false);
+ final session = UserSessionController(
+ auth: MockFirebaseAuth(),
+ credentials: MockVmodalCredentialSource(),
+ archive: c,
+ );
+ await tester.pumpWidget(
+ MaterialApp(
+ home: LibraryPage(controller: c, session: session),
+ ),
+ );
+ await tester.pumpAndSettle();
+ expect(tester.takeException(), isNull);
+ await tester.tap(find.byKey(const Key('library_menu')));
+ await tester.pumpAndSettle();
+ await tester.tap(find.text('Sync history'));
+ await tester.pumpAndSettle();
+ expect(find.text('No uploads or searches yet.'), findsOneWidget);
+ expect(tester.takeException(), isNull);
+ session.dispose();
+ c.dispose();
+ });
+ test(
+ 'nearby moments collapse per video while relevance order is preserved',
+ () {
+ FrameMatch hit(String name, double time) => FrameMatch(
+ row: const {'score': .7},
+ filename: name,
+ timestamp: '$time',
+ seconds: time,
+ );
+ final grouped = groupMoments([
+ hit('one', 35),
+ hit('one', 36),
+ hit('two', 35),
+ hit('one', 22),
+ hit('one', 23),
+ ]);
+ expect(grouped.keys, ['one', 'two']);
+ expect(grouped['one']!.map((m) => m.seconds), [35, 22]);
+ expect(grouped['two'], hasLength(1));
+ },
+ );
+ test('relative video timestamps and score meaning', () {
+ expect(timestamp13({'ts_unix': '0000000035000'}), '0000000035000');
+ expect(hitSeconds({'ts_unix': '0000000035000'}), 35);
+ expect(hitSeconds({'ts_unix': '1788510000000'}), isNull);
+ expect(hitSeconds({'ts_unix': '-5'}), isNull);
+ const hit = FrameMatch(
+ row: {'score': .92, 'score_ui': 1.0},
+ filename: 'test',
+ timestamp: '0',
+ );
+ expect(hit.distance, .92);
+ expect(timeLabel(75), '01:15');
+ expect(indexDone('success'), isTrue);
+ expect(indexFailed('failed'), isTrue);
+ });
+}
diff --git a/example/readme.md b/example/readme.md
index db394fa..359888c 100644
--- a/example/readme.md
+++ b/example/readme.md
@@ -23,7 +23,6 @@ upload, cancellation, and error handling.
| [`02_users`](02_users/README.md) | Content organization patterns | Shared global search, private per-user collections, multiple streams per user, and business/product catalog layouts. |
| [`03_cctv`](03_cctv/README.md) | Timestamped surveillance media | CCTV filename and timestamp metadata, searchable tags/text, image indexing, and absolute-time metadata search. |
| [`04_example`](04_example/README.md) | Searchable-video demo app | Traffic-camera moment search and multi-video visual discovery in one Android/iOS application. |
-| [`05_framebase`](05_framebase/README.md) | Product-style street archive | Runtime authentication, bundled and picked video upload, visual indexing, grouped semantic results, and local playback at the returned timestamp. |
## SDK capabilities
@@ -85,7 +84,7 @@ upload, cancellation, and error handling.
### Search and retrieval
- Search video and image-derived moments with natural-language queries.
-- Select search sources such as image, ASR, or OCR when supported by the
+- Select search sources such as image, AUDIO, or TEXT when supported by the
backend collection.
- Apply limits, metadata-text filters, and a specific index version.
- Search within paired absolute date/time bounds; the start is inclusive and
diff --git a/readme_assets/app1.png b/readme_assets/app1.png
new file mode 100644
index 0000000..202e89c
Binary files /dev/null and b/readme_assets/app1.png differ
diff --git a/readme_assets/app2.png b/readme_assets/app2.png
new file mode 100644
index 0000000..006a695
Binary files /dev/null and b/readme_assets/app2.png differ
diff --git a/readme_assets/app3.png b/readme_assets/app3.png
new file mode 100644
index 0000000..520e2af
Binary files /dev/null and b/readme_assets/app3.png differ
diff --git a/readme_assets/app5.png b/readme_assets/app5.png
new file mode 100644
index 0000000..79a872c
Binary files /dev/null and b/readme_assets/app5.png differ
diff --git a/security_check.sh b/security_check.sh
index 3d629f4..95c4c66 100755
--- a/security_check.sh
+++ b/security_check.sh
@@ -26,7 +26,8 @@ sdk_security_workflow() {
grep -Eq 'environment:[[:space:]]+pub\.dev' "$public"
grep -Eq 'environment:[[:space:]]+sdk-flutter-production' "$internal"
grep -Eq 'persist-credentials:[[:space:]]+false' "$internal" "$public"
- grep -Fq -- '--source "$WORKDIR"' "$internal"
+ grep -Fq 'run: bash security_check.sh secrets' "$internal"
+ ! grep -Fq 'Security scan disabled for development' "$internal"
! grep -Fq -- '--log-opts=' "$internal"
grep -Fq 'RELEASE_TOKEN: ${{ secrets.GH_TOKEN }}' "$internal"
! grep -Fq 'FLUTTER_SDK_APP_' "$internal"
diff --git a/test/regression_manifest_test.dart b/test/regression_manifest_test.dart
index 25ed9a0..9a9257f 100644
--- a/test/regression_manifest_test.dart
+++ b/test/regression_manifest_test.dart
@@ -68,6 +68,10 @@ void main() {
'example/04_example/README.md',
'example/04_example/lib/main.dart',
'example/04_example/test/widget_test.dart',
+ 'example/05_framebase_userlogin/README.md',
+ 'example/05_framebase_userlogin/lib/main.dart',
+ 'example/05_framebase_userlogin/lib/user/user_session_controller.dart',
+ 'example/05_framebase_userlogin/test/user_session_controller_test.dart',
'test/new_api_surface_test.dart',
];
for (final path in files) {
@@ -182,6 +186,11 @@ void main() {
'example/04_example/README.md',
'example/04_example/lib/main.dart',
'example/04_example/test/widget_test.dart',
+ 'example/05_framebase_userlogin/README.md',
+ 'example/05_framebase_userlogin/pubspec.lock',
+ 'example/05_framebase_userlogin/lib/main.dart',
+ 'example/05_framebase_userlogin/lib/user/user_session_controller.dart',
+ 'example/05_framebase_userlogin/test/user_session_controller_test.dart',
'doc/search_app.md',
'doc/sdk_doc.md',
'doc/manage_api_key.md',
@@ -215,6 +224,9 @@ void main() {
'example/02_users/build',
'example/03_cctv/.dart_tool',
'example/03_cctv/build',
+ 'example/05_framebase_userlogin/.dart_tool',
+ 'example/05_framebase_userlogin/build',
+ 'example/05_framebase_userlogin/android/local.properties',
'doc/todo/sdk_doc.md',
'docs_sdk',
'docs.py',
diff --git a/test/workflow_layout_test.dart b/test/workflow_layout_test.dart
index 0cf42ce..52e5b81 100644
--- a/test/workflow_layout_test.dart
+++ b/test/workflow_layout_test.dart
@@ -85,6 +85,10 @@ void checkWorkflow(String main, String tagged) {
expect(main, contains('environment: sdk-flutter-production'));
expect(main, contains('gitleaks_'));
expect(main, contains('--source "\$WORKDIR"'));
+ expect(main, contains('run: bash security_check.sh secrets'));
+ expect(main, contains('cd example/05_framebase_userlogin'));
+ expect(main, contains('flutter_bin)" analyze'));
+ expect(main, contains('flutter_bin)" test'));
expect(main, isNot(contains('--log-opts=')));
expect(main, contains('SHA256SUMS'));
expect(main, contains('SOURCE_MANIFEST.sha256'));
@@ -104,6 +108,16 @@ void checkWorkflow(String main, String tagged) {
),
);
expect(main, contains("find example/01_full_app/build/ios -name '*.app'"));
+ expect(
+ main,
+ contains(
+ 'sha256sum example/05_framebase_userlogin/build/app/outputs/flutter-apk/app-debug.apk',
+ ),
+ );
+ expect(
+ main,
+ contains("find example/05_framebase_userlogin/build/ios -name '*.app'"),
+ );
expect(main, isNot(contains('sha256sum example/build/')));
expect(main, isNot(contains('find example/build/ios')));
expect(main, contains('RELEASE_TOKEN: \${{ secrets.GH_TOKEN }}'));
@@ -183,6 +197,13 @@ void checkWorkflow(String main, String tagged) {
'example/02_users/pubspec.lock example/03_cctv/pubspec.lock',
),
);
+ expect(
+ main,
+ contains(
+ 'git add -f example/05_framebase_userlogin/lib '
+ 'example/05_framebase_userlogin/pubspec.lock',
+ ),
+ );
final actions = RegExp(
r'uses:\s+[^\s]+@([^\s]+)',