diff --git a/images/symbol_boxed_white.png b/images/symbol_boxed_white.png new file mode 100644 index 0000000..87feabc Binary files /dev/null and b/images/symbol_boxed_white.png differ diff --git a/lib/core/langtool_images.dart b/lib/core/langtool_images.dart new file mode 100644 index 0000000..e37e92f --- /dev/null +++ b/lib/core/langtool_images.dart @@ -0,0 +1,7 @@ +/// Class [LangToolImages] for managing the images used in LanguageTool. +class LangToolImages { + /// LanguageTool logo + static const logo = 'images/symbol_boxed_white.png'; + + LangToolImages._(); +} diff --git a/lib/utils/mistake_popup.dart b/lib/utils/mistake_popup.dart index 84b9545..00270b2 100644 --- a/lib/utils/mistake_popup.dart +++ b/lib/utils/mistake_popup.dart @@ -2,6 +2,7 @@ import 'dart:math'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:languagetool_textfield/core/langtool_images.dart'; import 'package:languagetool_textfield/domain/typedefs.dart'; import 'package:languagetool_textfield/languagetool_textfield.dart'; import 'package:languagetool_textfield/utils/extensions/string_extension.dart'; @@ -48,6 +49,7 @@ class LanguageToolMistakePopup extends StatelessWidget { static const double _defaultVerticalMargin = 25.0; static const double _defaultHorizontalMargin = 10.0; static const double _defaultMaxWidth = 250.0; + static const _iconSize = 25.0; /// Renderer used to display this window. final PopupOverlayRenderer popupRenderer; @@ -138,7 +140,22 @@ class LanguageToolMistakePopup extends StatelessWidget { padding: const EdgeInsets.only(left: 4), child: Row( children: [ - const Expanded(child: Text('Correct')), + Expanded( + child: Row( + children: [ + Padding( + padding: const EdgeInsets.only(right: 5.0), + child: Image.asset( + LangToolImages.logo, + width: _iconSize, + height: _iconSize, + package: 'languagetool_textfield', + ), + ), + const Text('Correct'), + ], + ), + ), IconButton( icon: const Icon( Icons.close, diff --git a/pubspec.yaml b/pubspec.yaml index ca99614..33dc43f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,3 +20,5 @@ dev_dependencies: flutter: uses-material-design: true + assets: + - images/symbol_boxed_white.png