Skip to content

Commit 5ab7b6a

Browse files
committed
fix on chat uuid this removes the error
1 parent 68d7ac5 commit 5ab7b6a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

app/lib/presentation/ui/pages/geminichat/geminichat_page.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
33
import 'package:flutter/material.dart';
44
import 'package:flutter_chat_ui/flutter_chat_ui.dart';
55
import 'package:flutter_chat_types/flutter_chat_types.dart' as types;
6+
import 'package:uuid/uuid.dart';
67

78
class GeminiChatPage extends StatefulWidget {
89
const GeminiChatPage({super.key});
@@ -40,7 +41,7 @@ class _GeminiChatState extends State<GeminiChatPage> {
4041
final textMessage = types.TextMessage(
4142
author: _user,
4243
text: text.text,
43-
id: "testId",
44+
id: const Uuid().v4(),
4445
);
4546

4647
_addMessage(textMessage);
@@ -70,7 +71,7 @@ class _GeminiChatState extends State<GeminiChatPage> {
7071
final textMessage = types.TextMessage(
7172
author: _agent,
7273
text: text,
73-
id: "testIdAgent",
74+
id: const Uuid().v4(),
7475
);
7576

7677
_addMessage(textMessage);

app/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ dependencies:
6060
dev: ^1.0.0
6161
flutter_chat_ui: ^1.6.13
6262
firebase_vertexai: ^0.1.1
63+
uuid: ^4.4.0
6364

6465
dev_dependencies:
6566
bloc_test: ^9.0.2

modules/data/lib/network/config/network_constants.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ class NetworkConstants {
44
static const baseUrl = String.fromEnvironment('API_URL', defaultValue: "https://dummyjson.com");
55
//static const baseUrl = String.fromEnvironment('API_URL', defaultValue: "NA");
66
static const productsPath = "/products";
7-
static const baseUrl = "http://www.example.com"; // To get started: comment this and uncomment line 4
87
}

0 commit comments

Comments
 (0)