Add super editor

This commit is contained in:
Hillel Coren 2022-03-23 11:21:41 +02:00
parent cb007edd27
commit 8414ae8620
1 changed files with 24 additions and 14 deletions

View File

@ -182,7 +182,9 @@ class _InvoiceEmailViewState extends State<InvoiceEmailView>
DropdownButtonHideUnderline(
child: DropdownButton<EmailTemplate>(
value: selectedTemplate,
onChanged: (template) {
onChanged: _isLoading
? null
: (template) {
setState(() {
_subjectController.text = '';
_bodyController.text = '';
@ -306,13 +308,21 @@ class _InvoiceEmailViewState extends State<InvoiceEmailView>
Expanded(
child: Material(
color: Colors.white,
child: ExampleEditor(
child: Stack(
children: [
if (_isLoading) LinearProgressIndicator(),
ExampleEditor(
value: _rawBodyPreview,
onChanged: (value) {
_bodyController.text = value;
// TODO remove check once browser is supported
if (!isDesktopOS()) {
_onChanged();
}
},
),
],
),
),
),
],