Created
December 23, 2025 08:55
-
-
Save jehuamanna/b81834ad2af5fbe14738550aa44509d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:convert'; | |
| import 'dart:async'; | |
| /// ---------------- MOCK API ---------------- | |
| Future<String> mockApiResponse() async { | |
| await Future.delayed(const Duration(milliseconds: 500)); | |
| return jsonEncode({ | |
| "meta": {"v": "1.2", "ts": "2025-12-23T14:20:00Z"}, | |
| "system": { | |
| "chains": [ | |
| { | |
| "name": "boot_chain", | |
| "flow": { | |
| "stage": "spl", | |
| "next": { | |
| "stage": "bl31", | |
| "secure": true, | |
| "next": { | |
| "stage": "kernel", | |
| "handoff": { | |
| "init": { | |
| "root": { | |
| "type": "block", | |
| "paths": { | |
| "primary": "/dev/mmcblk0p5", | |
| "fallback": ["/dev/mmcblk1p5", "/dev/mmcblk2p5"], | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| { | |
| "name": "recovery_chain", | |
| "flow": { | |
| "stage": "spl", | |
| "next": { | |
| "stage": "bl31", | |
| "secure": true, | |
| "next": { | |
| "stage": "recovery", | |
| "handoff": { | |
| "init": { | |
| "root": { | |
| "type": "block", | |
| "paths": { | |
| "primary": "/dev/mmcblk0p6", | |
| "fallback": ["/dev/mmcblk1p6", "/dev/mmcblk2p6"], | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| }, | |
| ], | |
| }, | |
| }); | |
| } | |
| /// Extract and print: | |
| /// Chain Name -> Primary Root Device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment