mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 19:36:25 +08:00
MarkdownToolbar: Add buttons for creating lists
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
class MarkdownToolBar extends StatelessWidget {
|
class MarkdownToolBar extends StatelessWidget {
|
||||||
final TextEditingController textController;
|
final TextEditingController textController;
|
||||||
|
|
||||||
@ -30,6 +32,21 @@ class MarkdownToolBar extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(0.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
onPressed: () => _modifyCurrentWord('**'),
|
onPressed: () => _modifyCurrentWord('**'),
|
||||||
),
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: const FaIcon(FontAwesomeIcons.listUl),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
|
onPressed: () => _modifyCurrentLine('- '),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: const FaIcon(FontAwesomeIcons.listOl),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
|
onPressed: () => _modifyCurrentLine('1. '),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: const FaIcon(FontAwesomeIcons.tasks),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
|
onPressed: () => _modifyCurrentLine('- [ ] '),
|
||||||
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 20,
|
height: 20,
|
||||||
child: const VerticalDivider(),
|
child: const VerticalDivider(),
|
||||||
|
Reference in New Issue
Block a user