Add API Server (Go/PocketBase), Web App (Go BFF + Vue), Fly App (Flutter/DJI MSDK), Adobe Plugin, and Docker/Docker AIO deployment configs. Design assets and build artifacts are gitignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
1.0 KiB
Dart
30 lines
1.0 KiB
Dart
import 'package:flutter/foundation.dart'
|
|
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
/// Live DJI primary video feed, rendered by the native `DjiVideoView`
|
|
/// [PlatformView] (Android only). Used as the full-bleed background of the
|
|
/// Flight Control HUD.
|
|
///
|
|
/// On non-Android targets (or when the SDK has no active feed) the native side
|
|
/// simply renders black, so callers gate this behind a real connection and fall
|
|
/// back to a placeholder otherwise.
|
|
class DjiVideoView extends StatelessWidget {
|
|
const DjiVideoView({super.key});
|
|
|
|
/// Must match `DjiVideoView.VIEW_TYPE` on the native side.
|
|
static const String _viewType = 'dji_msdk/video';
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
if (kIsWeb || defaultTargetPlatform != TargetPlatform.android) {
|
|
return const SizedBox.shrink();
|
|
}
|
|
return const AndroidView(
|
|
viewType: _viewType,
|
|
creationParamsCodec: StandardMessageCodec(),
|
|
);
|
|
}
|
|
}
|