Home > Software engineering >  Adding a trailing icon to a TextButton?
Adding a trailing icon to a TextButton?

Time:11-23

Is there a way to add a trailing icon to a TextButton?

Here's my code:

  TextButton(
           child: Center(
             child: Text ('Dummy', style: GoogleFonts.openSans (
                 color: Colors.white, fontWeight: FontWeight.w400,
                 fontSize: 28),),
           ),
           onPressed: () {
             Navigator.push(
               context,
               MaterialPageRoute(builder: (context) => FourteenthRoute(),),);
           }
       ),

CodePudding user response:

you can use TextButton.icon() :)

CodePudding user response:

Try out this package : result

CodePudding user response:

TextButton doesn't support trailing icon yet. But you can create your custom TextButton by slightly modifying the source code. See CustomTextButton.icon

  • Related