You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been killing my head with this problem, I do not know why it is happening, the worst thing is that it happens to me in a single sequence, here is my code
I have been killing my head with this problem, I do not know why it is happening, the worst thing is that it happens to me in a single sequence, here is my code
class FaltasEstudiante extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
// TODO: implement build
return BlocProvider(
child: Scaffold(
body: ListFaltas(),
floatingActionButton: FloatingActionButton(
backgroundColor: Colors.white,
foregroundColor: Colors.blue,
child: Icon(
Icons.add,
size: 29.0,
),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return InputsFaltaScreen();
}));
},
),
),
bloc: FaltasBloc());
}
}
class ListFaltas extends StatefulWidget {
ListFaltas({Key key}) : super(key: key);
@OverRide
_ListaFaltas createState() => _ListaFaltas();
}
class _ListaFaltas extends State {
SessionBloc estebloc;
FaltasBloc faltasBloc;
EstudiantesBloc estudiantesBloc;
@OverRide
Widget build(BuildContext context) {
estebloc = BlocProvider.of(context);
faltasBloc = BlocProvider.of(context);
estudiantesBloc = BlocProvider.of(context);
faltasBloc.initE(estudiantesBloc.modelEstudiante.identificacion, 0);
return StreamBuilder(
stream: faltasBloc.counterStreamE,
builder:
(BuildContext context, AsyncSnapshot<List> snapshot) {
if (estebloc.isOffline) {
return SinConxion(); //construir pantalla sin conexión
} else {
if (snapshot.data != null) {
if (snapshot.data.length == 0) {
return Center(child: Text("No hay datos para mostrar"));
}
return ListView.builder(
itemBuilder: (context, index) {
return ReviewFaltasEstudiante(snapshot.data[index]);
},
itemCount: snapshot.data.length);
} else {
return carga();
}
}
});
}
}
class ReviewFaltasEstudiante extends StatelessWidget {
FaltaModel faltaModel;
FaltasBloc faltasBloc;
ReviewFaltasEstudiante(this.faltaModel);
@OverRide
Widget build(BuildContext context) {
faltasBloc = BlocProvider.of(context);
// TODO: implement build
return InkWell(
onTap: () {
print('${faltasBloc.fal[0].idNovedad} esto es prueba de que si cogio el Bloc'); /// HERE DOES WORK
Navigator.push(context,
new MaterialPageRoute(
builder: (context) => new VerDetalle(detallefalta))
);
},
child: Card(
color: Colors.blueAccent,
margin: EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0, bottom: 3.0),
elevation: 5,
child: Container(
padding:
EdgeInsets.only(left: 5.0, right: 3.0, top: 10.0, bottom: 5.0),
child: Column(
children: [
Container(
margin: EdgeInsets.only(
left: 25.0, right: 10.0, top: 5.0, bottom: 3.0),
child: Row(
children: [
Text(
"TIPO ${faltaModel.tipo}",
style: TextStyle(
color: Colors.white.withOpacity(1.0),
fontSize: 18,
fontFamily: 'Jost',
fontWeight: FontWeight.bold),
),
],
),
),
Container(
margin: EdgeInsets.only(
left: 25.0, right: 10.0, top: 5.0, bottom: 3.0),
child: Row(
children: [
Text(
"Fecha ${faltaModel.fecha} ",
style: TextStyle(
color: Colors.white.withOpacity(1.0),
fontSize: 14,
fontFamily: 'Jost',
),
),
],
)),
Container(
color: Colors.black12,
margin: EdgeInsets.only(
left: 15.0, right: 15.0, top: 5.0, bottom: 5.0),
padding: EdgeInsets.only(top: 0.8, bottom: 0.8),
),
Container(
color: Colors.blueAccent,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
child: Column(
children: [
Text(
"${faltaModel.diligenciador} ",
style: TextStyle(
color: Colors.white.withOpacity(1.0),
fontSize: 16,
fontFamily: 'Jost',
fontWeight: FontWeight.bold),
),
Text(
"${faltaModel.sede}",
style: TextStyle(
color: Colors.white.withOpacity(1.0),
fontSize: 16,
fontFamily: 'Jost',
),
)
],
)),
Container(
margin: EdgeInsets.only(
left: 10.0, right: 5.0, top: 5.0, bottom: 5.0),
height: 85,
width: 85,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
),
],
),
)
],
),
),
}
}
class VerDetalle extends StatelessWidget {
FaltaModel detallefalta;
VerDetalle(this.detallefalta) ;
SessionBloc sessionBloc;
FaltasBloc faltasBloc;
@OverRide
Widget build(BuildContext context) {
}
}
The text was updated successfully, but these errors were encountered: