Email templates

This commit is contained in:
Hillel Coren 2018-08-13 09:12:26 -07:00
parent 33cbaacf7c
commit 0aaf3aa6df
3 changed files with 74 additions and 57 deletions

View File

@ -23,5 +23,7 @@
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Flutter for Android" level="project" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
</module>

View File

@ -43,67 +43,82 @@ class _EmailInvoiceViewState extends State<EmailInvoiceView> {
padding: const EdgeInsets.all(16.0),
child: Row(
children: <Widget>[
Expanded(
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
value: selectedTemplate,
onChanged: (value) {
setState(() {
final localization = AppLocalization.of(context);
final company = widget.viewModel.company;
selectedTemplate = value;
DropdownButtonHideUnderline(
child: DropdownButton<String>(
value: selectedTemplate,
onChanged: (value) {
setState(() {
final localization = AppLocalization.of(context);
final company = widget.viewModel.company;
selectedTemplate = value;
switch (value) {
//case const :
}
selectedTemplate = localization.initialEmail;
emailSubject = company.emailSubjectInvoice;
emailBody = company.emailBodyInvoice;
});
},
items: [
DropdownMenuItem<String>(
child: Text(localization.initialEmail),
value: localization.initialEmail,
),
DropdownMenuItem<String>(
child: Text(localization.firstReminder),
value: localization.firstReminder,
),
DropdownMenuItem<String>(
child: Text(localization.secondReminder),
value: localization.secondReminder,
),
DropdownMenuItem<String>(
child: Text(localization.thirdReminder),
value: localization.thirdReminder,
),
],
),
switch (value) {
//case const :
}
selectedTemplate = localization.initialEmail;
emailSubject = company.emailSubjectInvoice;
emailBody = company.emailBodyInvoice;
});
},
items: [
DropdownMenuItem<String>(
child: Text(localization.initialEmail),
value: localization.initialEmail,
),
DropdownMenuItem<String>(
child: Text(localization.firstReminder),
value: localization.firstReminder,
),
DropdownMenuItem<String>(
child: Text(localization.secondReminder),
value: localization.secondReminder,
),
DropdownMenuItem<String>(
child: Text(localization.thirdReminder),
value: localization.thirdReminder,
),
],
),
),
Expanded(
child: Container(),
),
SizedBox(
width: 10.0,
),
ElevatedButton(
label: localization.send,
color: Colors.orange,
onPressed: () {
},
onPressed: () {},
)
],
),
),
SingleChildScrollView(
child: Container(
color: Colors.white,
child: HtmlView(
//data: widget.viewModel.company.emailBodyInvoice,
data: emailBody,
ListView(
shrinkWrap: true,
children: <Widget>[
Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(13.0),
child: Text(
emailSubject,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 16.0,
),
),
),
),
),
Container(
color: Colors.white,
child: HtmlView(
//data: widget.viewModel.company.emailBodyInvoice,
data: emailBody,
),
),
],
),
],
);

View File

@ -112,14 +112,14 @@ packages:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.3+2"
code_builder:
dependency: transitive
description:
name: code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
version: "3.1.2"
collection:
dependency: transitive
description:
@ -154,7 +154,7 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
version: "1.1.3"
file:
dependency: transitive
description:
@ -168,7 +168,7 @@ packages:
name: fixnum
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.7"
version: "0.10.8"
flutter:
dependency: "direct main"
description: flutter
@ -258,7 +258,7 @@ packages:
name: graphs
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
version: "0.1.2+1"
html:
dependency: transitive
description:
@ -508,7 +508,7 @@ packages:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.3"
version: "0.8.3+1"
source_map_stack_trace:
dependency: transitive
description:
@ -550,7 +550,7 @@ packages:
name: stream_transform
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.14"
version: "0.0.14+1"
string_scanner:
dependency: transitive
description:
@ -592,7 +592,7 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
version: "3.0.3"
utf:
dependency: transitive
description:
@ -650,5 +650,5 @@ packages:
source: hosted
version: "2.1.15"
sdks:
dart: ">=2.0.0-dev.62.0 <=2.0.0-dev.69.5.flutter-eab492385c"
dart: ">=2.0.0-dev.65 <=2.0.0-dev.69.5.flutter-eab492385c"
flutter: ">=0.2.5 <2.0.0"