class _AuthenticateState extends State {
bool showSignIn=false;
void toggleview(){
setState(() => showSignIn = !showSignIn);
}
@override
Widget build(BuildContext context) {
if(showSignIn){
return SignIn(toggleview:toggleview);
} else{
return Register(toggleview:toggleview); / @/this part is not working.
} //page is not changing while clicking but when we change value
//to false manually then only page changes .but donot respond to
//click
}
}
import 'package:flutter/material.dart'; import 'package:flutter_app1/Screens/Authenticate/register.dart'; import 'package:flutter_app1/Screens/Authenticate/sign_in.dart'; class Authenticate extends StatefulWidget { @override _AuthenticateState createState() => _AuthenticateState(); }
class _AuthenticateState extends State {
bool showSignIn=false;
void toggleview(){
setState(() => showSignIn = !showSignIn);
}
@override
Widget build(BuildContext context) {
if(showSignIn){
return SignIn(toggleview:toggleview);
} else{
return Register(toggleview:toggleview); / @/this part is not working.
} //page is not changing while clicking but when we change value
//to false manually then only page changes .but donot respond to
//click
}
}