-
Notifications
You must be signed in to change notification settings - Fork 390
Expand file tree
/
Copy pathai_controller.dart
More file actions
26 lines (21 loc) · 1.02 KB
/
ai_controller.dart
File metadata and controls
26 lines (21 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2026 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
import 'package:devtools_app_shared/utils.dart';
import 'ai_message_types.dart';
class AiController extends DisposableController
with AutoDisposeControllerMixin {
AiController();
Future<ChatMessage> sendMessage(ChatMessage _) async {
await Future.delayed(const Duration(seconds: 3));
return const ChatMessage(text: _loremIpsum, isUser: false);
}
}
const _loremIpsum = '''
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
''';