Skip to content

Commit

Permalink
Improved text display update behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Nov 24, 2023
1 parent 9fb5f6a commit c32e8cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/widgets/nt4_widgets/single_topic/text_display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ class TextDisplay extends StatelessWidget with NT4Widget {
stream: subscription?.periodicStream(),
initialData: nt4Connection.getLastAnnouncedValue(topic),
builder: (context, snapshot) {
Object data = snapshot.data ?? '';
Object data = snapshot.data ?? Object();

if (data.toString() != _previousValue.toString()) {
if (data.toString() != _previousValue.toString() &&
!data.isExactType<Object>()) {
// Needed to prevent errors
Future(() async {
_controller.text = data.toString();
Expand Down

0 comments on commit c32e8cf

Please sign in to comment.