Answers for "button to a page flutter"

16

how to open page with button flutter

// Within the `FirstRoute` widget
onPressed: () {
  Navigator.push(
    context,
    MaterialPageRoute(builder: (context) => SecondRoute()),
  );
}
Posted by: Guest on March-25-2020
1

flutter button

TextButton(
onPressed: () {
print('I got clicked');
},
child: Text('Button'),
style: TextButton.styleFrom(
primary: Colors.white,
textStyle: TextStyle(fontSize: 20.0),
backgroundColor: Colors.red),
),
Posted by: Guest on September-18-2021

Code answers related to "button to a page flutter"

Browse Popular Code Answers by Language