Skip to content

Commit ae2b46b

Browse files
committed
formatting
1 parent 013822f commit ae2b46b

File tree

1 file changed

+3
-14
lines changed
  • packages/firebase_vertexai/firebase_vertexai/example/lib/pages

1 file changed

+3
-14
lines changed

packages/firebase_vertexai/firebase_vertexai/example/lib/pages/audio_page.dart

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,12 @@ class _AudioPageState extends State<AudioPage> {
4646
chat = widget.model.startChat();
4747
}
4848

49-
void _scrollDown() {
50-
WidgetsBinding.instance.addPostFrameCallback(
51-
(_) => _scrollController.animateTo(
52-
_scrollController.position.maxScrollExtent,
53-
duration: const Duration(
54-
milliseconds: 750,
55-
),
56-
curve: Curves.easeOutCirc,
57-
),
58-
);
59-
}
60-
6149
Future<void> recordAudio() async {
6250
if (await record.hasPermission()) {
6351
final dir = Directory(
6452
'${(await getApplicationDocumentsDirectory()).path}/libs/recordings');
6553

54+
// ignore: avoid_slow_async_io
6655
if (!await dir.exists()) {
6756
await dir.create(recursive: true);
6857
}
@@ -108,7 +97,7 @@ class _AudioPageState extends State<AudioPage> {
10897
try {
10998

11099
String textPrompt = 'What is in the audio recording?';
111-
final prompt = TextPart("What is in the audio recording?");
100+
final prompt = TextPart('What is in the audio recording?');
112101
setState(() {
113102
_messages.add(MessageData(text: textPrompt, fromUser: true));
114103
});
@@ -182,7 +171,7 @@ class _AudioPageState extends State<AudioPage> {
182171
const SizedBox.square(
183172
dimension: 15,
184173
),
185-
const Text('Tap the mic to record, tap again to submit')
174+
const Text('Tap the mic to record, tap again to submit'),
186175
],
187176
),
188177
),

0 commit comments

Comments
 (0)