'How do I add onTap to text button inside this custom Tab

Hello I am new to flutter, I am learning to implement a custom Tab, I copied this code, how do I add ontap to the texts inside the array in the code below.

  Container(
                  width: double.infinity,
                  color: Colors.white,
                  child: Column(
                    children: \[
                      CustomTabBar(
                        titles: const \["Account", "Store Apps"\],
                        selectedIndex: selectedIndex,
                        onTap: (index) {
                          setState(() {
                            selectedIndex = index;
                          });
                        },
                      ),
                      const SizedBox(
                        height: 16,
                      ),
                      Column(
                        children: ((selectedIndex == 0)

                                ? \[
                                  ListTile(
                                    title: const Text('Account Settings'),
                                    onTap: () {
                                      showDialog(
                                          context: context,
                                          builder: (\_) =\> Dialog(
                                            child: PersonellD(),
                                          ));
                                    },
                                  ),
                                    'Subscription History',
                                    'Business Information',
                                    'Dashboard'
                                  \]
                                : \[
                                    'Rate App',
                                    'Help Center',
                                    'Privacy & Policy',
                                    'Term & Condition'
                                  \])
                            .map((e) =\> Padding(
                                  padding: const EdgeInsets.only(
                                      bottom: 16,
                                      left: defaultMargin,
                                      right: defaultMargin),
                                  child: Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    children: \[
                                      Text(
                                        e,
                                        style: blackFontStyle3,
                                      ),
                                      SizedBox(
                                        height: 24,
                                        width: 24,
                                        child: Image.asset(
                                          'assets/right_arrow.png',
                                          fit: BoxFit.contain,
                                        ),
                                      )
                                    \],
                                  ),
                                ))
                            .toList(),
                      )
                    \],
                  ),
                ),

I tried adding



Solution 1:[1]

This might help you.

According to the documentation, To be accessible, tappable leading and trailing widgets have to be at least 48x48 in size. read here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alberto Azinar