iamshaunjp / flutter-firebase

All course files for the Flutter & Firebase tutorial playlist on The Net Ninja YouTube channel
578 stars 440 forks source link

else part in Authenticate.dart is not working #8

Closed himal-rawal closed 4 years ago

himal-rawal commented 4 years ago

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 } }