Skip to content

Commit

Permalink
fix: only print error messages in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-i committed Jan 18, 2024
1 parent 70e40d1 commit d3bb85d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/lib/views/widgets/paint_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import 'package:flutter/material.dart';
import 'package:flutter_image_compress/flutter_image_compress.dart';
import 'package:glowby/views/html/html_view_screen.dart';
import 'dart:ui' as ui;
import 'dart:typed_data';

import 'package:glowby/services/openai_api.dart';
import 'package:glowby/utils/utils.dart';
import 'package:flutter/foundation.dart';

class PaintWindow extends StatefulWidget {
const PaintWindow({super.key});
Expand Down Expand Up @@ -59,7 +59,9 @@ class PaintWindowState extends State<PaintWindow> {
await image.toByteData(format: ui.ImageByteFormat.rawRgba);

if (byteData == null) {
print("Failed to obtain byte data from image");
if (kDebugMode) {
print("Failed to obtain byte data from image");
}
return '';
}

Expand Down

0 comments on commit d3bb85d

Please sign in to comment.