Add super editor
This commit is contained in:
parent
cb007edd27
commit
8414ae8620
|
|
@ -182,14 +182,16 @@ class _InvoiceEmailViewState extends State<InvoiceEmailView>
|
||||||
DropdownButtonHideUnderline(
|
DropdownButtonHideUnderline(
|
||||||
child: DropdownButton<EmailTemplate>(
|
child: DropdownButton<EmailTemplate>(
|
||||||
value: selectedTemplate,
|
value: selectedTemplate,
|
||||||
onChanged: (template) {
|
onChanged: _isLoading
|
||||||
setState(() {
|
? null
|
||||||
_subjectController.text = '';
|
: (template) {
|
||||||
_bodyController.text = '';
|
setState(() {
|
||||||
selectedTemplate = template;
|
_subjectController.text = '';
|
||||||
_loadTemplate();
|
_bodyController.text = '';
|
||||||
});
|
selectedTemplate = template;
|
||||||
},
|
_loadTemplate();
|
||||||
|
});
|
||||||
|
},
|
||||||
items: [
|
items: [
|
||||||
DropdownMenuItem<EmailTemplate>(
|
DropdownMenuItem<EmailTemplate>(
|
||||||
child: Text(localization.initialEmail),
|
child: Text(localization.initialEmail),
|
||||||
|
|
@ -306,12 +308,20 @@ class _InvoiceEmailViewState extends State<InvoiceEmailView>
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: ExampleEditor(
|
child: Stack(
|
||||||
value: _rawBodyPreview,
|
children: [
|
||||||
onChanged: (value) {
|
if (_isLoading) LinearProgressIndicator(),
|
||||||
_bodyController.text = value;
|
ExampleEditor(
|
||||||
_onChanged();
|
value: _rawBodyPreview,
|
||||||
},
|
onChanged: (value) {
|
||||||
|
_bodyController.text = value;
|
||||||
|
// TODO remove check once browser is supported
|
||||||
|
if (!isDesktopOS()) {
|
||||||
|
_onChanged();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue