Snippets Collections
class LogOutButton extends StatelessWidget {
    final String title;
    static final HexColor basicColor = HexColor('#E02B2B');
    const LogOutButton({Key? key, required this.title}) : super(key: key);

    @override
    Widget build(BuildContext context) {
        return Container(
            padding: EdgeInsets.symmetric(vertical: 20.0),
            alignment: Alignment.center,
            child: OutlinedButton(
                onPressed: (){},
                child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
           
                    children: [
                        SizedBox(width: 24, height: 24,),
                        Text(
                            title,
                            style: GoogleFonts.roboto(
                                fontWeight: FontWeight.w500,
                                fontSize: 20.0,
                                color: basicColor,
                            ),
                        ),
                        Icon(
                            Icons.logout,
                            color: basicColor,
                        )
                    ],
                ),
                style: ButtonStyle(
                    maximumSize: MaterialStateProperty.all(Size(300.0, 50.0)),
                    minimumSize: MaterialStateProperty.all(Size(200.0, 50.0)),
                    overlayColor: MaterialStateProperty.all(Colors.transparent),
                    side: MaterialStateProperty.all(
                        BorderSide(
                            color: basicColor,
                            width: 2.0,
                        )
                    ),
                    shape: MaterialStateProperty.all(
                        RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(20.0),
                        )
                    )
                    
                )
            ),
        );
    }
}
star

Tue Dec 28 2021 10:26:07 GMT+0000 (Coordinated Universal Time)

#dart #listtile

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension