Просмотр исходного кода

another placeholder to avoid confusion

juan 1 месяц назад
Родитель
Сommit
b19005585d
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      lib/home_page.dart

+ 6 - 6
lib/home_page.dart

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