filmopen_support
Generated by scripts/package_digest.py; regenerate, never edit.
A recording that can be sent to FilmOpen support (Software Specification §6.8): the flash at every picture the issue recorder takes, what the person says beside the pictures, and the description at the stop. The recorder (filmopen_recorder) writes the report and sends nothing.
Flutter. 20 files, 3,599 lines under lib/; 149 tests in 12 files. Barrel: lib/filmopen_support.dart.
Depends on
Section titled “Depends on”- filmopen_dictation — uses
DictateButton,DictationController,DictationPhase,DictationSetup,DictationStretch,DictationTarget,dictationCreditSetupProvider,dictationSetupProvider - filmopen_format — uses
ExactDecimal,Money,UsagePurpose - filmopen_l10n — uses nothing by name the digest could see
- filmopen_platform — uses
canRevealFiles,reportsDirectory,revealInFileManager - filmopen_recorder — uses
Recorder,ReportFolder,hasReportFolders,isReportPath,isReportStamp,isSnapshotPath,kTapeFile,reportFolderName,reportWord,stampTime - filmopen_state — uses
Settings,SpeechProvider,appVersionProvider,kFilmOpenSiteUrl,runningPlatformName,settingsProvider,sharedPreferencesProvider,speechProviderOf - filmopen_store — uses
AppLog,LogLevel,MemoryLogSink - filmopen_ui — uses
kLongMessage,showMessage - filmopen_test_support (dev) — uses nothing by name the digest could see
Third-party: archive, crypto, http, intl, flutter_riverpod.
Used by
Section titled “Used by”filmopen_app
Public API
Section titled “Public API”What the barrel exports, file by file. A name is class, enum, mixin, extension, typedef, a top-level function, getter, setter or variable; under a class, its public constructors, fields, getters, setters and methods.
lib/src/commentary.dart
Section titled “lib/src/commentary.dart”- variable
const String kCommentaryFile— The file a commentary writes, at the report folder’s top. - enum
CommentaryPhase— Where a recording’s commentary is.- values:
off,connecting,listening,stopping
- values:
- class
RecordingCommentary— Transcribes what the person says beside a recording’s pictures (Software Specification §6.8).RecordingCommentary({ Recorder? recorder, this.lineLimit = 2000, this.textLimit = 1000, this.noSpeechLimit = const Duration(minutes: 20), this.sett…— Creates commentary with its deadlines for the last words and for the microphone’s stop.static RecordingCommentary instance— The commentary the rail’s button and the rail’s stop share.final int lineLimit— The most lines a recording’s commentary holds; reaching the limit ends further publication.final int textLimit— The most characters of text a line holds; a longer stretch is written as several lines with the samet, cut at a space.final Duration noSpeechLimit— How long a session may hear no speech before it ends: a person recording is often silent.final Duration settleLimit— How long the last words are waited for when the microphone goes off: longer than a dictation’s own three seconds, since the last stretch of a recording is often the one that says what went wrong.final Duration captureStopLimit— How long the microphone’s stop is waited for before it is logged as failed and the microphone released.CommentaryPhase get phase— Where the commentary is.String? get code— The session’s end reason in its own recording.String? get microphoneBusyOwner— The refusing capture kind while this recording retains a microphone-busy reason.String? get providerName— The name of the speech provider the session’s effective setup is bound to, which aproviderrefusal names (§6.7).bool get full— Whether this recording’s commentary is full, so that nothing starts it again.Duration get spoken— The audio sent over the session in use.Money? get cost— What the session in use has cost so far, at the speech service’s price.bool get costUnknown— Whether the session in use is on FilmOpen credit, whose cost no one knows before its receipt (§6.6).String get live— The words being said now, for the person to see as they come (the caption): those of the turn in progress, or of the last one said, as the speech service gives them.Future<void> start(ProviderContainer container, {required String language})— Turns the microphone on for the recording that runs, on the person’s press or the box they ticked, in [language] (the app’s).Future<void> stop()— Turns the microphone off on the person’s press, writing the last words first.Future<void> finish()— Writes the last words and turns the microphone off before the recording stops (the rail’s stop).
lib/src/commentary_button.dart
Section titled “lib/src/commentary_button.dart”- class
CommentaryButton— The rail’s commentary microphone, drawn while a recording runs.const CommentaryButton({super.key, this.commentary, this.recorder})— Places the shared commentary’s microphone on the rail.final RecordingCommentary? commentary— The commentary it drives; [RecordingCommentary.instance] where null.final Recorder? recorder— The recorder whose recording it belongs to; [Recorder.instance] where null.
- variable
final commentaryChoiceProvider— Whether the person asked, in the support dialog, for what they say to be transcribed with a recording: off until they tick it, and remembered in the preferences (support.voice). - class
CommentaryChoice— The person’s choice of [commentaryChoiceProvider].static const String preference— Where the choice is remembered.void set(bool value)— Ticks or unticks the box, for this recording and the ones after it.
- class
CommentaryChoiceBox— The support dialog’s box Transcribe what I say: ticked, the recording starts with the microphone on ([RecordingCommentary]).const CommentaryChoiceBox({super.key})
lib/src/describe_dialog.dart
Section titled “lib/src/describe_dialog.dart”- enum
DescribeChoice— What the person chose in [DescribeDialog].- values:
keep,save,signIn,send,sendWithoutWords,cancel
- values:
- variable
final consentSeenProvider— Whether the person asked, below the consent’s text, not to be shown it again: remembered in the preferences (support.consentSeen). - class
ConsentSeen— The choice of [consentSeenProvider].static const String preference— Where the choice is remembered.void set(bool value)— Ticks or unticks Don’t show this again.
- class
DescribeDialog— The dialog Describe the problem (Software Specification §6.8), at every stop that wrote a folder and from the list of recordings not sent.const DescribeDialog({ super.key, required this.files, required this.account, this.sendWords = true, this.onSendWords, this.reveal = revealInFileMa…final ReportFiles files— The recording’s files.final SupportAccount account— The person’s account, as the rail handed it in.final bool sendWords— Whether Send what I said is ticked as the dialog opens: the recording’s own choice, ticked until the person unticks it.final ValueChanged<bool>? onSendWords— Told of every tick and untick of Send what I said, so that the recording keeps the choice however the dialog closes.final Future<bool> Function(String path) reveal— Opens a folder in the device’s file browser: Review files before sending’s door, the one Show in folder uses.final bool? canReveal— Whether this platform’s file browser can open the recording’s folder — not a phone’s, whose folder is the app’s own (§6.8); null asks the platform.
lib/src/receipts.dart
Section titled “lib/src/receipts.dart”- enum
ReceiptState— What became of a recording after its stop (Software Specification §6.8).- values:
kept,saved,pending,sent
- values:
- class
Receipt— A recording’s receipt: its folder’s stamp, what became of it, and, once sent, the ticket’s id and number where the website gave them and the zip’s hash.const Receipt({required this.stamp, required this.state, this.words = true, this.id, this.number, this.sha256})final String stamp— The recording’s folder name ([isReportStamp]).final ReceiptState state— What became of it.final bool words— Whether what the person said goes with it: Send what I said, ticked until they untick it.final String? id— The ticket’s id, where the website gave one.final int? number— The ticket’s number, where the website gave one.final String? sha256— The zip’s SHA-256, hex, once one was made.Receipt copyWith({ReceiptState? state, bool? words, String? id, int? number, String? sha256})— This receipt with the fields given changed.Map<String, Object?> toJson()— The receipt as the preferences keep it.static Receipt? fromJson(Object? json)— The receipt [json] keeps, or null for anything that is not one, so that an unreadable entry is dropped.
- function
String ticketNumberText(int number)— A ticket’s [number] as people read it: its digits grouped by threes with commas, from the right — 8,877, 1,234,567 — in both languages, as the website writes it on its pages and in its mails (itsnumberText). - variable
final receiptsProvider— Every recording’s receipt, each in the place its recording was first given, remembered in the preferences (support.receipts). - class
Receipts— The receipts of [receiptsProvider].static const String preference— Where the receipts are remembered.Receipt? of(String stamp)— The receipt of the recording [stamp], or null.void put(Receipt receipt)— Puts [receipt] in its recording’s place, or last where the recording has none yet.void remove(String stamp)— Forgets the recording [stamp]’s receipt: its folder is gone.
lib/src/recording_caption.dart
Section titled “lib/src/recording_caption.dart”- class
RecordingCaption— What the person says while a recording’s microphone is on, shown as it comes in, near the bottom of the window (Software Specification §6.8): Listening… until the first words, then the words of the turn in progress,…const RecordingCaption({super.key, this.commentary})final RecordingCommentary? commentary— The commentary whose words show; [RecordingCommentary.instance] where null.static double liftAt(TextScaler scaler)— How far above the window’s bottom edge the caption stands at [scaler]: clear of an app’s message of up to two lines, which floats 10 px above that edge with 14 px above and below its lines of 20 px, as tall as the tex…static const int shown— The most characters shown: the end of the words, the latest said.static const Key captionKey— The caption’s key, by which a test finds it; it is built only while it shows.static String endOf(String words)— The end of [words], at most [shown] characters from a word’s start, after an ellipsis.static String endThatFits(String words, bool Function(String text) fits)— The end of [words] that [fits]: [endOf] where it does, else the longest stretch after it that does from a word’s start — or, where the last word alone is too long, from a whole character in it — so that the latest wor…
lib/src/recording_flash.dart
Section titled “lib/src/recording_flash.dart”- class
RecordingFlash— A white flash over the whole window at every picture a recording takes, like a camera’s, so that the person sees the screen was captured (Software Specification §6.8).const RecordingFlash({super.key, required this.child, this.recorder, this.commentary, this.captionStart = 0})final Widget child— The window: in the app, the boundaryAutomationHost.windowKeypaints.final Recorder? recorder— The recorder whose pictures flash; [Recorder.instance] where null.final RecordingCommentary? commentary— The commentary whose words the caption shows; [RecordingCommentary.instance] where null.final double captionStart— How far from the window’s start edge the caption’s room begins: the width of what it must never cover there — in the app, the rail, whose microphone and stop stay in sight.static const double peakLight— How white the flash starts over a light window, where a lighter one hardly shows.static const double peakDark— How white the flash starts over a dark window, where less is already bright.static const Duration hold— How long the flash holds at its peak before it fades.static const Duration length— How long a flash lasts, its hold and its fade.static const double still— How white the still layer is where animations are off.static const Duration stillFor— How long the still layer shows where animations are off.static double peakFor(Brightness brightness)— How white the flash starts over a window of [brightness].static const Key layerKey— The layer’s key, by which a test finds it; the layer is built only while it shows.
lib/src/report_files.dart
Section titled “lib/src/report_files.dart”- variable
const bool hasReportFiles— Whether this platform keeps report folders a person can describe and send: where the recorder writes them. - variable
const String kDescriptionFile— The file of the person’s description, at the report folder’s top. - variable
const int kDescriptionLimit— The most characters a description holds. - class
ReportFiles— One recording’s files.String get stamp— The folder’s name,YYMMDDHHMMSS(with-2for a second recording in one second): what a receipt names it by.String? get path— The folder’s path on disk; null for one in memory.String? readText(String name)— The text of the file [name] at the folder’s top, or null where there is none or it cannot be read (not UTF-8, or the system refusing it, which a folder on disk logs).void writeText(String name, String text)— Writes [text] as the file [name] at the folder’s top, UTF-8, as it is.void delete(String name)— Deletes the file [name] at the folder’s top, where there is one.List<String> list()— Every file the folder holds, as paths relative to it with/; a link is left out.int? size(String path)— The size in bytes of the file at [path] (relative, with/), or null where there is none or it cannot be weighed: what a zip weighs before it reads a byte.List<int>? readBytes(String path)— The bytes of the file at [path] (relative, with/), or null where there is none or it cannot be read.bool readEach(String path, void Function() opened, void Function(List<int> piece) each)— Reads the file at [path] (relative, with/) a piece at a time into [each], once [opened] has been called; false, neither called, where there is none or it cannot be opened.ZipOut openZip()— Where the recording’s zip is built: a temporary file beside the folder, which [ZipOut.close] makes<stamp>.zip; for a folder in memory, memory.void deleteZip()— Deletes the recording’s zip, where there is one.Future<bool> discard()— Deletes the recording: its folder with everything in it, never what a link there leads to, and its zip; true where nothing of it is left.
- class
MemoryReportFiles— A recording’s files in memory, for the tests.MemoryReportFiles(this.stamp, [Map<String, String>? texts, Map<String, List<int>>? binaries])final Map<String, String> texts— Every text file, by its path.final Map<String, List<int>> binaries— Every other file, by its path.List<int>? zip— The zip, once written.
- class
ZipOut— A recording’s zip as it is built (Software Specification §6.8): written a piece at a time, an entry’s header written over once its entry is done, read back for its hash, and, closed, the recording’s zip.int get length— The bytes written so far.void add(List<int> bytes)— Adds [bytes] at the end.void patch(int at, List<int> bytes)— Writes [bytes] over what was written at [at].void readBack(void Function(List<int> piece) each)— Everything written, a piece at a time, into [each].void close()— Done: the zip is the recording’s, at [path] on disk, or [bytes] in memory.void discard()— Abandoned: what was written is removed.String? get path— Where the closed zip is on disk; null in memory.Uint8List? get bytes— The closed zip in memory; null on disk.
- function
List<String> commentaryWords(ReportFiles files)— The words ofcommentary.jsonl, line by line, as they were written; a line that is not one of the commentary’s is left out.
lib/src/report_files_stub.dart
Section titled “lib/src/report_files_stub.dart”- function
Future<ReportFiles?> reportFilesFor(String stamp)— No report folders here. - function
Future<void> forgetReportZip(String stamp)— No zips here. - function
ReportFiles reportFilesAt(String path)— No report folders here.
lib/src/report_flow.dart
Section titled “lib/src/report_flow.dart”- enum
SendOutcome— What came of asking to send a recording.- values:
sent,notNow,signIn,tooLarge
- values:
- class
SendAnswer— What a sender answers: what came of it, the receipt as it now stands, and whether a box took the recording in this attempt.const SendAnswer(this.outcome, this.receipt, {this.uploaded = false})final SendOutcome outcome— What came of it.final Receipt receipt— The receipt: the ticket’s id and number once the website gave them.final bool uploaded— Whether a box took the recording’s bytes in this attempt — its2xxto the upload — which alone lets the recording go from this device (§6.8).
- class
ReportSender— What sends a recording: the ticket and the upload.const ReportSender()Future<SendAnswer> send(ReportZip zip, SupportAccount account, { required Receipt receipt, required String locale, void Function(Receipt ticket)? o…— Sends [zip], the recording’s, which holds what the person said where they left it ticked, for a person who speaks [locale], telling [onTicket] of a ticket as soon as the website makes one; it never throws.
- class
NoReportSender— Sends nothing: the recording waits on this device.const NoReportSender()
- function
Future<ReportZip> zipReport(ReportFiles files, bool commentary)— Zips [files] — on another isolate where they are a folder on disk, since a long recording’s folder takes a while — with what the person said where [commentary]. - class
ReportFlow— What happens to a recording after its stop (Software Specification §6.8): the person describes it, and keeps it on this device, saves it to send once signed in, or sends it.ReportFlow({ this.sender = const NoReportSender(), ReportFiles Function(String path)? filesAt, Future<ReportFiles?> Function(String stamp)? filesFo…static ReportFlow instance— The flow the rail and the support dialog share.static bool get available— Whether this platform keeps recordings to describe and send: not the web.ReportSender sender— What sends a recording.final ReportFiles Function(String path) filesAt— The files of the recording the recorder wrote at a path.final Future<ReportFiles?> Function(String stamp) filesFor— The files of the recording with a stamp, or null where they are gone.final Future<ReportZip> Function(ReportFiles files, bool commentary) zipper— Makes a recording’s zip, with what the person said or without it.final Future<void> Function(String stamp) forgetZip— Deletes the zip of a recording whose folder is gone.final int zipLimit— The most bytes a zip may have and be sent: [kReportZipLimit], lower in a test.Future<void> afterStop(BuildContext context, String folder, SupportAccount account)— The one call the rail makes after a stop that wrote [folder]: the recording is listed as not sent from here on, so that a window closed on the dialog loses nothing, and the person describes it.Future<void> sendLater(BuildContext context, String stamp, SupportAccount account)— The support dialog’s Send on a recording not sent: its dialog again, with its description.Future<void> describe(BuildContext context, ReportFiles files, SupportAccount account)— The dialog for the recording [files], and what the person chose there.ValueListenable<Set<String>> get sending— The recordings being sent now, by stamp: a second press on one of them sends nothing more, and the list of recordings not sent shows its Send disabled, saying why.void markSending(String stamp)— Marks [stamp] as being sent, as a send does: for a test of what shows it.
lib/src/report_sender.dart
Section titled “lib/src/report_sender.dart”- class
ReportFacts— The build that sends, as a ticket names it: the app’s version with its build number, the CI run, the commit (Software Specification §6.8).const ReportFacts({required this.app, required this.build, required this.commit})final String app—appVersionWithBuildNumber.final String build—kAppBuild.final String commit—kAppCommit.
- class
HttpReportSender— Sends a recording to FilmOpen support (Software Specification §6.8): a ticket from the website, then the zip to one of the support boxes the website names, in the order it names them.HttpReportSender({ required this.site, required this.facts, http.Client Function()? client, this.siteTimeout = const Duration(seconds: 30), this.pr…final Uri site— The website:kFilmOpenSiteUrl.final ReportFacts facts— The build that sends.final Duration siteTimeout— How long the website may take to answer.final Duration progressTimeout— How long an upload may go without progress.final Duration tokenTimeout— How long the session’s token may take, a refresh included.
lib/src/report_zip.dart
Section titled “lib/src/report_zip.dart”- variable
const int kReportZipLimit— The most bytes a report’s zip may have and still be sent (Software Specification §6.8): the one bound, far above two busy runs’ logs zipped, against a runaway upload. - function
String reportMegabytes(int bytes, String locale)— [bytes] in megabytes of 1 048 576 bytes, rounded up — a zip over the limit never reads as at it — to one place where there is a fraction, written as [locale] writes numbers. - class
ReportZipRules— What a report’s zip may hold, and nothing else (Software Specification §6.8, the seam with the support box): the tape, the environment, the log, the person’s description and what they said at the top; the pictures as…static const List<String> top— The files at the top, in the zip’s order.static final RegExp shot— A picture: four digits.static const List<String> trees— The folders of text files, in the zip’s order.static const int maxEntries— The most entries a support box takes.static bool allows(String path, {required bool commentary})— Whether the zip may hold [path] — a path the recorder could have written ([isReportPath]), a file of [trees] a text file its snapshot copies ([isSnapshotPath]); [commentary] says whether what the person said goes.static (int, String) order(String path)— Where [path] stands in the zip: the top in its order, the pictures, then each tree.
- class
ReportZip— A report’s zip: the bytes a ticket announces and a box receives, the same for the same folder (Software Specification §6.8); on disk<stamp>.zipbeside the folder, never held whole.final List<String> entries— What it holds, in its order.final List<String> left— What the folder held that it may hold but that went over a box’s count of entries, by path.final int size— Its size in bytes; for one stopped past its bound, the size it had reached.final String sha256— Its SHA-256, hex: made once, with the zip, where the zip is made; empty for one stopped past its bound.final String? path— Where it is on disk; null in memory, and for one stopped past its bound, which is not kept.final Uint8List? bytes— The zip of a folder in memory; null on disk.Stream<List<int>> read()— The zip a piece at a time: what an upload sends.static Sink<List<int>> Function(void Function(List<int> piece) out)? deflater— The deflater in place of this platform’s, for a test of another platform’s; null for this platform’s.static ReportZip of(ReportFiles files, {required bool commentary, int bound = kReportZipLimit})— The zip of [files]: only what [ReportZipRules] allows, whatever else the folder holds, in a fixed order and with a fixed time on every entry, so that the same folder gives the same bytes; withoutcommentary.jsonlun…
lib/src/support_account.dart
Section titled “lib/src/support_account.dart”- class
SupportAccount— The person’s filmopen.ai account as the support flow needs it (Software Specification §6.8): whether they are signed in, the session’s token for the ticket, and the way to sign in.const SupportAccount({ required this.signedIn, required this.accessToken, required this.signIn, this.openReports, this.isAdmin = _notAdmin, })final bool signedIn— Whether the person is signed in: one who is not can save a recording, and send it once signed in.final Future<String?> Function() accessToken— The session’s access token, refreshed where it has expired; null where there is no session.final Future<void> Function({String? reason}) signIn— Takes the person to where they sign in, saying [reason] there where one is given: why they are asked.final Future<void> Function({String? ticket, bool admin})? openReports— Opens a sent recording’s ticket on the website — its own page, or with [admin] the administrators’ page of it — or the person’s support page where [ticket] is null; null where there is none to open.final bool Function() isAdmin— Whether the signed-in account is an administrator, as the session says: it only chooses whether Open as administrator is offered, and the website decides who may see the page.
- function
Uri supportTicketUrl(String site, {String? ticket, bool admin = false})— The website’s page of a sent recording’s [ticket], itsR-…id: the person’s/account/support/?ticket=…, or with [admin] the administrators’/admin/support/?ticket=…; without a ticket, the person’s support page (…
lib/src/unsent_reports.dart
Section titled “lib/src/unsent_reports.dart”- class
UnsentReports— The support dialog’s list of the recordings kept, saved or not yet sent, newest first by when each was made, each with Send, which opens Describe the problem again with its description (Software Specification §6.8).const UnsentReports({super.key, required this.onSend, this.sending})final void Function(String stamp) onSend— Opens the recording’s dialog; called once the support dialog has closed.final ValueListenable<Set<String>>? sending— The recordings being sent now: their Send is disabled, saying that they are being sent.
Internal
Section titled “Internal”Files under lib/ the barrel does not reach; nothing outside the package may import them.
lib/src/report_client.dartlib/src/report_client_io.dart:reportClientlib/src/report_client_stub.dart:reportClientlib/src/report_files_io.dart:DiskReportFiles,_deleteZip,_piece,_DiskZipOut,reportFilesFor,forgetReportZip,reportFilesAtlib/src/zip_deflate_io.dart:rawDeflater,readZipFile,_Pieceslib/src/zip_deflate_stub.dart:rawDeflater,readZipFile,_Whole