for some reason the sign up allows users to enter information but the sign in section doesn't any ideas

import 'package:flutter/material.dart';
import 'package:ionicons/ionicons.dart';
import 'package:personal_fitness_app/components/widgets/input_text.dart';
class SignUpView extends StatefulWidget {
final double keyboardsize;
final AnimationController parent_controller;
final AnimationController sign_up_controller;
final VoidCallback onLoginClicked;
const SignUpView(this.keyboardsize, this.parent_controller, this.sign_up_controller, this.onLoginClicked) : super();
@override
SignUpViewState createState() => SignUpViewState(keyboardsize, parent_controller, sign_up_controller,onLoginClicked);
}
class SignUpViewState extends State<SignUpView> with SingleTickerProviderStateMixin {
final double keyboardsize;
final AnimationController parent_controller;
final AnimationController sign_up_controller;
final VoidCallback onLoginClicked;
SignUpViewState(this.keyboardsize, this.parent_controller, this.sign_up_controller, this.onLoginClicked);
@override
Widget build(BuildContext context) {
final _signUpAnimation = Tween<Offset>(begin: Offset(0,-2), end: Offset(-0,0)).animate(
CurvedAnimation(
parent: parent_controller,
curve: const Interval(0.5, 1.0, curve: Curves.fastOutSlowIn)
)
);
final _change_to_login = Tween<Offset>(begin: Offset(0,0), end: Offset(0,2)).animate(
CurvedAnimation(
parent: sign_up_controller,
curve: const Interval(0.0, 1.0, curve: Curves.fastOutSlowIn)
));
final _login_coming_in = Tween<Offset>(begin: Offset(2,0), end:Offset(0,0)).animate(
CurvedAnimation(
parent: sign_up_controller,
curve: const Interval(0.0, 1.0, curve: Curves.fastOutSlowIn)
)
);
const statusBarHeight = 24;
const marginBottom = 30;
const bottomPosition = 28;
return Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
bottom: 0,
child: Container(
height: 50,
width: MediaQuery.of(context).size.width * .74,
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor.withOpacity(.2),
borderRadius: BorderRadius.circular(10)
),
),
),
Positioned(
bottom: 14,
child: Container(
height: 50,
width: MediaQuery.of(context).size.width * .83,
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor.withOpacity(.2),
borderRadius: BorderRadius.circular(10)
),
),
),
Positioned(
bottom: 28,
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight:
MediaQuery.of(context).size.height
- statusBarHeight
- keyboardsize
- marginBottom
- bottomPosition
),
child: Container(
width: MediaQuery.of(context).size.width * .9,
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor,
borderRadius: BorderRadius.circular(10)
),
child: Stack(children: [
SlideTransition(position:_signUpAnimation,child:SingleChildScrollView(
child:Opacity(opacity:parent_controller.value,child:Container(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
child: SlideTransition(position:_login_coming_in,
child:Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_SignInTitle(),
_Subtitle(),
SizedBox(height: 30),
_SignInForm(parent_controller),
SizedBox(height: 20),
_DontHaveAccount(parent_controller, onLoginClicked),
]
),
)
)
),
)),
SlideTransition(position:_signUpAnimation,child:SingleChildScrollView(
child:Container(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 25),
child: SlideTransition(position:_change_to_login,
child:Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_SignUpTitle(),
_Subtitle(),
SizedBox(height: 30),
_SignUpForm(parent_controller),
SizedBox(height: 20),
_HaveAccount(parent_controller, onLoginClicked),
]
),
)
),
)
)
],),
),
),
)
],
);
}
}
class _SignUpTitle extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Text(
'SIGN UP',
style: Theme.of(context)
.textTheme
.headline5!
.copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold
),
);
}
}
class _SignInTitle extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Text(
'SIGN IN',
style: Theme.of(context)
.textTheme
.headline5!
.copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold
),
);
}
}
class _Subtitle extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Text(
'Come on!',
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
color: Theme.of(context).primaryColor
),
);
}
}
class _SignUpForm extends StatelessWidget {
final AnimationController animationController;
const _SignUpForm(this.animationController);
@override
Widget build(BuildContext context) {
return Form(
child: Column(
children: <Widget>[
Column(children: <Widget>[
InputText(label: 'Username', icon: Ionicons.person),
InputText(label: 'Email Address', icon: Ionicons.phone_landscape),
InputText(label: 'Password', icon: Ionicons.key,),
SizedBox(height: 40),
_SignUpSubmitButton(),
],
),
],
)
);
}
}
class _SignInForm extends StatelessWidget {
final AnimationController animationController;
const _SignInForm(this.animationController);
@override
Widget build(BuildContext context) {
return Form(
child: Column(
children: <Widget>[
Column(children: <Widget>[
InputText(label: 'Username', icon: Ionicons.person),
InputText(label: 'Password', icon: Ionicons.key,),
SizedBox(height: 40),
_SignInSubmitButton(),
],
),
],
)
);
}
}
class _SignUpSubmitButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RaisedButton(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(100.0)),
padding: const EdgeInsets.symmetric(vertical: 17, horizontal: 80),
onPressed: () {
print("sign up button pressed");
},
child: Text(
'SIGN UP',
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
color: Colors.white,
fontWeight: FontWeight.bold
),
),
color: Theme.of(context).primaryColor
);
}
}
class _SignInSubmitButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RaisedButton(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(100.0)),
padding: const EdgeInsets.symmetric(vertical: 17, horizontal: 80),
onPressed: () {
print("sign in button pressed");
},
child: Text(
'SIGN IN',
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
color: Colors.white,
fontWeight: FontWeight.bold
),
),
color: Theme.of(context).primaryColor
);
}
}
class _HaveAccount extends StatelessWidget {
final AnimationController animationController;
final VoidCallback onLoginClicked;
const _HaveAccount(this.animationController, this.onLoginClicked);
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => onLoginClicked(),
child: Container(
width: double.infinity,
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
text: 'Already have an account? ',
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
color: Colors.grey
),
children: <TextSpan>[
TextSpan(
text: 'Sign In',
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold
)
),
],
),
),
),
);
}
}
class _DontHaveAccount extends StatelessWidget {
final AnimationController animationController;
final VoidCallback onLoginClicked;
const _DontHaveAccount(this.animationController, this.onLoginClicked);
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => {print(animationController.value)},
child: Container(
width: double.infinity,
child: RichText(
textAlign: TextAlign.center,
text: TextSpan(
text: 'Don\'t have an account? ',
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
color: Colors.grey
),
children: <TextSpan>[
TextSpan(
text: 'Sign Up',
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold
)
),
],
),
),
),
);
}
}
input_text.dart
import 'package:flutter/material.dart';
class InputText extends StatelessWidget {
final String label;
final IconData icon;
const InputText({ required this.label, required this.icon}) : super();
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.symmetric(vertical: 10),
child: TextFormField(
cursorColor: Theme.of(context).primaryColor,
decoration: InputDecoration(
labelText: this.label,
fillColor: Colors.grey[200],
filled: true,
border: const OutlineInputBorder(
borderSide: BorderSide(
width: 0,
style: BorderStyle.none,
),
borderRadius: BorderRadius.all(
Radius.circular(5.0),
),
),
prefixIcon: Icon(
this.icon,
color: Theme.of(context).primaryColor,
),
),
),
);
}
}
the main problem i am having is that the already have an account goes to the sign up animation successfully but the dont have an acccount button doesnt work neither does the input fields and the button. all help is appreciated