Files
buzz/mobile/lib/shared/widgets/duo_workspace_scaffold.dart
klopez4212 5bd9d2c5d2 Transcribe Bestie hold recordings into text on device (#9645)
Hold Bestie to record with the waveform and slide-up cancel interaction
from #8665, then release to send an on-device transcript as a normal
text message. Stay on Home with a loader inside Bestie until delivery
succeeds, then open chat. Failures expose Retry/Discard; saved
recordings and signed messages remain recoverable without duplicate
sends. Saved audio is excluded from OS backup. Existing composer voice
notes are unchanged.

Separate exploration from #8665. Transcription requires iOS 26 and a
supported language. Android reports unavailable before capture because
its generic recognizer cannot guarantee saved-file input.

Validation: at `b5dc83bbf5`, 5,046 Flutter tests (71 skipped), 27 crypto
tests, analysis and required push checks pass. Prior native changes at
`30a397f83c`: Android build and 33 tests pass; iOS simulator compilation
and backup-exclusion test pass, with one unchanged document-picker
timeout passing on isolated rerun. Earlier iPhone preview was tested
with saved profile preserved; these latest fixes have not been installed
on the physical phone.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Co-authored-by: corey <2dafccf60ea6d431a568f6d67fc600160d92a51e415e09dc8b213b8e360663d5@buzz.block.builderlab.xyz>
2026-11-19 10:32:12 +00:00

56 lines
1.6 KiB
Dart

import 'dart:math' as math;
import 'package:duo_kit/duo_kit.dart';
import 'package:flutter/material.dart';
/// Keeps route surfaces full width; each pane reserves its controls separately.
class DuoWorkspaceScaffold extends StatelessWidget {
const DuoWorkspaceScaffold({
required this.body,
required this.navigationBuilder,
this.navigationOverflow = 0,
super.key,
});
final double navigationOverflow;
final Widget body;
final FoldNavigationBuilder navigationBuilder;
@override
Widget build(BuildContext context) {
final strip = FoldGeometry.of(context).strip;
final placement = switch (strip?.side) {
FoldStripSide.left => FoldNavigationPlacement.left,
FoldStripSide.right => FoldNavigationPlacement.right,
null => FoldNavigationPlacement.bottom,
};
return Stack(
fit: StackFit.expand,
children: [
body,
if (strip != null)
Positioned.fromRect(
rect: Rect.fromLTRB(
strip.rect.left - navigationOverflow,
strip.rect.top,
strip.rect.right + navigationOverflow,
strip.rect.bottom,
),
child: MediaQuery(
data: MediaQuery.of(context).copyWith(
padding: EdgeInsets.only(
top: strip.topClearance,
bottom: math.max(
strip.bottomClearance,
MediaQuery.viewPaddingOf(context).bottom,
),
),
),
child: navigationBuilder(context, placement),
),
),
],
);
}
}