Skip to content

Commit

Permalink
fix: make class public to resolve visibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-i committed Jan 18, 2024
1 parent 028c0e4 commit bfe5625
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
13 changes: 9 additions & 4 deletions app/lib/views/screens/chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import '../../utils/text_to_speech.dart'; // Import the new TextToSpeech class
import '../dialogs/api_key_dialog.dart';
import '../../utils/timestamp.dart'; // Import the ApiKeyDialog widget
import 'package:async/async.dart';
import 'package:flutter/foundation.dart';

class ChatScreen extends StatefulWidget {
final List<Map<String, Object>> _questions;
Expand Down Expand Up @@ -44,10 +45,10 @@ class ChatScreen extends StatefulWidget {
{super.key});

@override
_ChatScreenState createState() => _ChatScreenState();
ChatScreenState createState() => ChatScreenState();
}

class _ChatScreenState extends State<ChatScreen> {
class ChatScreenState extends State<ChatScreen> {
var _autonomousMode = false;
bool _loading = false;
bool _voiceEnabled = true;
Expand Down Expand Up @@ -102,7 +103,9 @@ class _ChatScreenState extends State<ChatScreen> {
language: GlobalSettings().selectedLanguage);
}
} catch (e) {
print('Error in text-to-speech: $e');
if (kDebugMode) {
print('Error in text-to-speech: $e');
}
}
}
}
Expand Down Expand Up @@ -216,7 +219,9 @@ class _ChatScreenState extends State<ChatScreen> {

tasks.add(response.substring(startIndex).trim());
} catch (e) {
print('Error getting tasks: $e');
if (kDebugMode) {
print('Error getting tasks: $e');
}
}

setState(() {
Expand Down
4 changes: 2 additions & 2 deletions app/lib/views/screens/magical_loading_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ class MagicalLoadingView extends StatefulWidget {
const MagicalLoadingView({super.key});

@override
_MagicalLoadingViewState createState() => _MagicalLoadingViewState();
MagicalLoadingViewState createState() => MagicalLoadingViewState();
}

class _MagicalLoadingViewState extends State<MagicalLoadingView>
class MagicalLoadingViewState extends State<MagicalLoadingView>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
final Random _random = Random();
Expand Down
4 changes: 2 additions & 2 deletions app/lib/views/widgets/messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Messages extends StatefulWidget {
const Messages(this._messages, {super.key});

@override
_MessagesState createState() => _MessagesState();
MessagesState createState() => MessagesState();
}

class _MessagesState extends State<Messages> {
class MessagesState extends State<Messages> {
late ScrollController _controller;

@override
Expand Down
4 changes: 2 additions & 2 deletions app/lib/views/widgets/new_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class NewMessage extends StatefulWidget {
{super.key, required this.onAutonomousModeMessage});

@override
_NewMessageState createState() => _NewMessageState();
NewMessageState createState() => NewMessageState();
}

class _NewMessageState extends State<NewMessage> {
class NewMessageState extends State<NewMessage> {
late Ai ai;

final _controller = TextEditingController();
Expand Down
4 changes: 2 additions & 2 deletions app/lib/views/widgets/paint_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class PaintWindow extends StatefulWidget {
const PaintWindow({super.key});

@override
_PaintWindowState createState() => _PaintWindowState();
PaintWindowState createState() => PaintWindowState();
}

class _PaintWindowState extends State<PaintWindow> {
class PaintWindowState extends State<PaintWindow> {
final int width = 600;
final int height = 450;

Expand Down
11 changes: 6 additions & 5 deletions app/lib/views/widgets/tasks_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ class TasksView extends StatefulWidget {
final Function onBackButtonPressed;

const TasksView(
{super.key, required this.tasks,
{super.key,
required this.tasks,
required this.name,
required this.onImplementPlanButtonPressed,
required this.onRequestNewPlanButtonPressed,
required this.onBackButtonPressed});

@override
_TasksViewState createState() => _TasksViewState();
TasksViewState createState() => TasksViewState();
}

class _TasksViewState extends State<TasksView>
class TasksViewState extends State<TasksView>
with SingleTickerProviderStateMixin {
List<String> _tasks = [];
final TextEditingController _newTaskController = TextEditingController();
Expand Down Expand Up @@ -175,8 +176,8 @@ class _TasksViewState extends State<TasksView>
},
),
ElevatedButton(
child:
const Text('Implement Plan', style: TextStyle(color: Colors.white)),
child: const Text('Implement Plan',
style: TextStyle(color: Colors.white)),
onPressed: () {
widget.onImplementPlanButtonPressed();
},
Expand Down

0 comments on commit bfe5625

Please sign in to comment.