|
@@ -18,7 +18,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|
bool _isSidebarOpen = true;
|
|
bool _isSidebarOpen = true;
|
|
bool querySearches = false;
|
|
bool querySearches = false;
|
|
|
|
|
|
- List<String> _tabs = ['INBOX'];
|
|
|
|
|
|
+ List<String> _tabs = ['Emails'];
|
|
Map<String, Widget> _tabWidgets = {};
|
|
Map<String, Widget> _tabWidgets = {};
|
|
TabController? _tabController;
|
|
TabController? _tabController;
|
|
|
|
|
|
@@ -26,7 +26,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|
void initState() {
|
|
void initState() {
|
|
super.initState();
|
|
super.initState();
|
|
_tabController = TabController(length: _tabs.length, vsync: this);
|
|
_tabController = TabController(length: _tabs.length, vsync: this);
|
|
- _tabWidgets['INBOX'] = EmailPage(
|
|
|
|
|
|
+ _tabWidgets['Emails'] = EmailPage(
|
|
key: _emailPageKey,
|
|
key: _emailPageKey,
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -45,7 +45,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|
|
|
|
|
// Remove a tab
|
|
// Remove a tab
|
|
void _removeTab(int index) {
|
|
void _removeTab(int index) {
|
|
- if (_tabs[index] != 'INBOX') {
|
|
|
|
|
|
+ if (_tabs[index] != 'Emails') {
|
|
setState(() {
|
|
setState(() {
|
|
String tabToRemove = _tabs[index];
|
|
String tabToRemove = _tabs[index];
|
|
_tabs.removeAt(index);
|
|
_tabs.removeAt(index);
|
|
@@ -99,8 +99,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|
trailing: Text(email.date.toString()),
|
|
trailing: Text(email.date.toString()),
|
|
onTap: () async {
|
|
onTap: () async {
|
|
// print('tapped');
|
|
// print('tapped');
|
|
- String emailContent = await apiService
|
|
|
|
- .fetchEmailContent([email.id]);
|
|
|
|
|
|
+ String emailContent =
|
|
|
|
+ await apiService.fetchEmailContent([email.id]);
|
|
// print('content below');
|
|
// print('content below');
|
|
// print(emailContent);
|
|
// print(emailContent);
|
|
Navigator.push(
|
|
Navigator.push(
|
|
@@ -278,7 +278,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|
child: Row(
|
|
child: Row(
|
|
children: [
|
|
children: [
|
|
Text(entry.value),
|
|
Text(entry.value),
|
|
- if (entry.value != 'INBOX')
|
|
|
|
|
|
+ if (entry.value != 'Emails')
|
|
GestureDetector(
|
|
GestureDetector(
|
|
onTap: () => _removeTab(entry.key),
|
|
onTap: () => _removeTab(entry.key),
|
|
child: Icon(Icons.close, size: 16),
|
|
child: Icon(Icons.close, size: 16),
|