mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-02 04:47:01 +08:00
Move MarkdownToolbar to its own file
This commit is contained in:
33
lib/widgets/markdown_toolbar.dart
Normal file
33
lib/widgets/markdown_toolbar.dart
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MarkdownToolBar extends StatelessWidget {
|
||||||
|
final Function onHeader1;
|
||||||
|
final Function onItallics;
|
||||||
|
final Function onBold;
|
||||||
|
|
||||||
|
MarkdownToolBar({
|
||||||
|
@required this.onHeader1,
|
||||||
|
@required this.onItallics,
|
||||||
|
@required this.onBold,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
IconButton(
|
||||||
|
icon: const Text('H1'),
|
||||||
|
onPressed: onHeader1,
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: const Text('I'),
|
||||||
|
onPressed: onItallics,
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
icon: const Text('B'),
|
||||||
|
onPressed: onBold,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user