49 lines
1.3 KiB
Dart
49 lines
1.3 KiB
Dart
import 'structs.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
|
|
|
|
class CollapsableEmails extends StatefulWidget {
|
|
final List<String> thread; // email id's in the form xyz@gmail.com
|
|
final List<String> threadHTML;
|
|
final String threadIDs;
|
|
|
|
CollapsableEmails(
|
|
{required this.thread,
|
|
required this.threadHTML,
|
|
required this.threadIDs});
|
|
|
|
@override
|
|
State<CollapsableEmails> createState() => _CollapsableEmailsState();
|
|
}
|
|
|
|
class _CollapsableEmailsState extends State<CollapsableEmails> {
|
|
List<String> emailsHTML = []; //html of the emails in the thread
|
|
// build attachments with the forldar name and id
|
|
Set<int> _expandedEmails = {}; //open emails
|
|
List viewtypeIDs = []; //IDs of the viewtypes, order matters
|
|
List heightOfViewTypes = []; //the height of each viewtype
|
|
List<SerializableMessage> emailsInThread = [];
|
|
bool _isLoaded = false;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
//html
|
|
}
|
|
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: ListView(
|
|
children: [
|
|
HtmlWidget(
|
|
widget.threadHTML[0],
|
|
// renderMode: RenderMode.listView,
|
|
)
|
|
]
|
|
)
|
|
);
|
|
}
|
|
}
|