Answers for "switch page flutter"

16

flutter navigate to new screen

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

flutter switch

bool isChecked = false;
Switch(
            value: isChecked,
            onChanged: (bool value) { 
              setState(() {
                isChecked = value;
              });
             }, 
            ),
Posted by: Guest on August-28-2021

Browse Popular Code Answers by Language