skip to Main Content

Flutter add AlertDialog to ElevatedButton.onPressed

I have a login button on my app with this code: class PublicHomePage extends StatelessWidget { const PublicHomePage({super.key}); @override Widget build(BuildContext context) { final userDataNotifier = Provider.of<UserDataNotifier>(context); return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( 'Please login', style: Theme.of(context).textTheme.headlineMedium,…

VIEW QUESTION

Flutter – creating dynamic style elevated button widget

I am trying to create a dynamic elevated button widget. class CustomeElevatedBtn extends StatelessWidget { const CustomeElevatedBtn( {required this.child_, required this.onPressed_, required this.style_}); final Widget child_; final VoidCallback onPressed_; final ??? style_; @override Widget build(BuildContext context) { return ElevatedButton( onPressed:…

VIEW QUESTION
Back To Top
Search