comp
This commit is contained in:
@@ -32,89 +32,116 @@ class _SignScreenState extends State<SignScreen> with TickerProviderStateMixin {
|
||||
Widget build(BuildContext context) {
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
return BlocListener<AuthenticationBloc, AuthenticationState>(
|
||||
listener: (context, state) {
|
||||
if (state.status == AuthenticationStatus.authenticated) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
listener: (context, state) {
|
||||
if (state.status == AuthenticationStatus.authenticated) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
// Text('${context.read<SignInBloc>().state}'),
|
||||
Container(
|
||||
color: Theme.of(context).colorScheme.tertiary,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
color: Theme.of(context).colorScheme.tertiary,
|
||||
padding: const EdgeInsets.only(bottom: 20.0),
|
||||
child: Center(
|
||||
child: Image(
|
||||
width: width * 0.7,
|
||||
image: const AssetImage('images/logo_prosapp.png'),
|
||||
),
|
||||
),
|
||||
),
|
||||
// TabBar(
|
||||
// controller: tabController,
|
||||
// unselectedLabelColor:
|
||||
// Theme.of(context).colorScheme.onBackground,
|
||||
// labelColor: Theme.of(context).colorScheme.onBackground,
|
||||
// tabs: const [
|
||||
// Padding(
|
||||
// padding: EdgeInsets.all(12.0),
|
||||
// child: Text(
|
||||
// 'Inicia sesión',
|
||||
// style: TextStyle(
|
||||
// fontSize: 18,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: EdgeInsets.all(12.0),
|
||||
// child: Text(
|
||||
// 'Registrate',
|
||||
// style: TextStyle(
|
||||
// fontSize: 18,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TabBarView(controller: tabController, children: [
|
||||
BlocProvider<SignInBloc>(
|
||||
create: (context) =>
|
||||
Injector.appInstance.get<SignInBloc>(),
|
||||
child: SignInScreen(),
|
||||
),
|
||||
BlocProvider<SignUpBloc>(
|
||||
create: (context) =>
|
||||
Injector.appInstance.get<SignUpBloc>(),
|
||||
child: SignUpScreen(),
|
||||
),
|
||||
]),
|
||||
)
|
||||
],
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: Center(
|
||||
child: Image(
|
||||
width: width * 0.7,
|
||||
image: const AssetImage('images/logo_prosapp.png'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(60),
|
||||
topRight: Radius.circular(60),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 30, vertical: 15),
|
||||
child: SingleChildScrollView(
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height - 200,
|
||||
child: TabBarView(
|
||||
controller: tabController,
|
||||
children: [
|
||||
BlocProvider<SignInBloc>(
|
||||
create: (context) =>
|
||||
Injector.appInstance.get<SignInBloc>(),
|
||||
child: SignInScreen(),
|
||||
),
|
||||
BlocProvider<SignUpBloc>(
|
||||
create: (context) =>
|
||||
Injector.appInstance.get<SignUpBloc>(),
|
||||
child: SignUpScreen(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
// Scaffold(
|
||||
// // appBar: AppBar(
|
||||
// // backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||
// // ),
|
||||
// body: Column(
|
||||
// children: [
|
||||
// // Text('${context.read<SignInBloc>().state}'),
|
||||
// Container(
|
||||
// color: Theme.of(context).colorScheme.tertiary,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Container(
|
||||
// color: Theme.of(context).colorScheme.tertiary,
|
||||
// padding: const EdgeInsets.only(bottom: 20.0),
|
||||
// child: Center(
|
||||
// child: Image(
|
||||
// width: width * 0.7,
|
||||
// image: const AssetImage('images/logo_prosapp.png'),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: SingleChildScrollView(
|
||||
// child: SizedBox(
|
||||
// height: MediaQuery.of(context).size.height,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: TabBarView(controller: tabController, children: [
|
||||
// BlocProvider<SignInBloc>(
|
||||
// create: (context) =>
|
||||
// Injector.appInstance.get<SignInBloc>(),
|
||||
// child: SignInScreen(),
|
||||
// ),
|
||||
// BlocProvider<SignUpBloc>(
|
||||
// create: (context) =>
|
||||
// Injector.appInstance.get<SignUpBloc>(),
|
||||
// child: SignUpScreen(),
|
||||
// ),
|
||||
// ]),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user