Skip to content

Commit 3498ffa

Browse files
committed
minor fixes
1 parent 96d104a commit 3498ffa

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.2.11+1 - 10-June-2022
2+
* Minor fixes
3+
14
## 0.2.11 - 10-June-2022
25
* Breaking: MarkdownFormField is now MarkdownAutoPreview
36
* Added SplittedMarkdown FormField

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ packages:
115115
path: ".."
116116
relative: true
117117
source: path
118-
version: "0.2.11"
118+
version: "0.2.11+1"
119119
matcher:
120120
dependency: transitive
121121
description:

lib/widgets/markdown_auto_preview.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class MarkdownAutoPreview extends StatefulWidget {
1818
this.minLines,
1919
this.emojiConvert = false,
2020
this.enableToolBar = true,
21+
this.showEmojiSelection = true,
2122
this.autoCloseAfterSelectEmoji = true,
2223
this.textCapitalization = TextCapitalization.sentences,
2324
this.readOnly = false,
@@ -30,6 +31,11 @@ class MarkdownAutoPreview extends StatefulWidget {
3031
/// if false, toolbar widget will not display
3132
final bool enableToolBar;
3233

34+
/// Enable Emoji options
35+
///
36+
/// if false, Emoji selection widget will not be displayed
37+
final bool showEmojiSelection;
38+
3339
/// Controls the text being edited.
3440
///
3541
/// If null, this widget will create its own [TextEditingController].
@@ -263,6 +269,7 @@ class _MarkdownAutoPreviewState extends State<MarkdownAutoPreview> {
263269
unfocus: () {
264270
_internalFocus.unfocus();
265271
},
272+
showEmojiSelection: widget.showEmojiSelection,
266273
emojiConvert: widget.emojiConvert,
267274
toolbarBackground: widget.toolbarBackground,
268275
expandableBackground: widget.expandableBackground,

lib/widgets/splitted_markdown_form_field.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class SplittedMarkdownFormField extends StatefulWidget {
2222
this.expands = false,
2323
this.emojiConvert = false,
2424
this.enableToolBar = true,
25+
this.showEmojiSelection = true,
2526
this.autoCloseAfterSelectEmoji = true,
2627
this.textCapitalization = TextCapitalization.sentences,
2728
this.decoration = const InputDecoration(isDense: true),
@@ -32,6 +33,11 @@ class SplittedMarkdownFormField extends StatefulWidget {
3233
/// if false, toolbar widget will not display
3334
final bool enableToolBar;
3435

36+
/// Enable Emoji options
37+
///
38+
/// if false, Emoji selection widget will not be displayed
39+
final bool showEmojiSelection;
40+
3541
/// Controls the text being edited.
3642
///
3743
/// If null, this widget will create its own [TextEditingController].
@@ -169,7 +175,7 @@ class SplittedMarkdownFormField extends StatefulWidget {
169175
/// When a [controller] is specified, [initialValue] must be null (the default). If [controller] is null, then a [TextEditingController] will be constructed automatically and its text will be initialized to [initialValue] or the empty string.
170176
///
171177
/// For documentation about the various parameters, see the [TextField] class and [TextField.new], the constructor.
172-
final Function(String?)? onSaved;
178+
final void Function(String?)? onSaved;
173179

174180
@override
175181
State<SplittedMarkdownFormField> createState() =>
@@ -224,6 +230,8 @@ class _SplittedMarkdownFormFieldState extends State<SplittedMarkdownFormField> {
224230
onSaved: widget.onSaved,
225231
),
226232
),
233+
// Some padding
234+
const SizedBox(width: 8.0),
227235
Expanded(
228236
child: MarkdownBody(
229237
// key: const ValueKey<String>("zmarkdown-parse-body"),
@@ -251,6 +259,7 @@ class _SplittedMarkdownFormFieldState extends State<SplittedMarkdownFormField> {
251259
onActionCompleted: () {
252260
setState(() {});
253261
},
262+
showEmojiSelection: widget.showEmojiSelection,
254263
)
255264
],
256265
);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: markdown_editor_plus
22
description: A TextField Widget that allow you to convert easily what's in the
33
TextField to Markdown with custom toolbar support.
44

5-
version: 0.2.11
5+
version: 0.2.11+1
66
homepage: https://github.com/OmkarDabade/markdown_editor_plus
77
repository: https://github.com/OmkarDabade/markdown_editor_plus
88

0 commit comments

Comments
 (0)