import 'package:flutter/widgets.dart'; /// The browser client's rename wording, kept verbatim. const runTitleActionLabel = 'Rename'; const runTitleDialogTitle = 'Rename'; const runTitleFieldLabel = 'Run title'; const runTitleSaveLabel = 'Save'; const runTitleCancelLabel = 'Cancel'; /// Stable test/semantics keys shared by the action and its prompt. const runTitleActionKey = ValueKey('rename-run-action'); const runTitleFieldKey = ValueKey('rename-run-field'); const runTitleSaveKey = ValueKey('rename-run-save'); const runTitleCancelKey = ValueKey('rename-run-cancel'); const runTitleErrorKey = ValueKey('rename-run-error'); /// The server's refusal, verbatim. Only a blank error gets a generic sentence /// so the prompt never claims a rename that did not happen. String describeTitleError(Object error) { final message = '$error'; return message.trim().isEmpty ? 'The server did not rename the run.' : message; }