migração flutter 2.2.1
This commit is contained in:
@@ -71,7 +71,7 @@ class NotificacoesScreen extends StatelessWidget {
|
||||
// child: this._buildListTile(index)
|
||||
// );
|
||||
} else if (index > 1) {
|
||||
if(c.loadMore == null || c.loadMore){
|
||||
if(c.loadMore){
|
||||
c.getNotificacoesBloc();
|
||||
return Container(
|
||||
height: 40,
|
||||
@@ -113,8 +113,9 @@ class NotificacoesScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(c.errorMessage),
|
||||
RaisedButton(onPressed: c.refresh, child: Text('Atualizar'),)
|
||||
Text(c.errorMessage!),
|
||||
ElevatedButton(onPressed: c.refresh, child: Text('Atualizar'))
|
||||
//RaisedButton(onPressed: c.refresh, child: Text('Atualizar'),)
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -123,12 +124,12 @@ class NotificacoesScreen extends StatelessWidget {
|
||||
Widget _buildListTile(int index) {
|
||||
if(c.notificacoesResults[index].tipoConteudo == 'L'){
|
||||
return this._buildListTileTile(index: index,onTap: (){
|
||||
c.notificacaoLidaBloc(c.notificacoesResults[index].iD).then((value) => launch(c.notificacoesResults[index].conteudo));
|
||||
c.notificacaoLidaBloc(c.notificacoesResults[index].iD).then((value) => launch(c.notificacoesResults[index].conteudo!));
|
||||
});
|
||||
}
|
||||
return OpenContainer<bool>(
|
||||
//openColor: Colors.transparent,
|
||||
closedColor: Colors.black87.withOpacity(0.2),
|
||||
closedColor: Get.theme.primaryColor.withOpacity(0.2),
|
||||
transitionType: ContainerTransitionType.fadeThrough,
|
||||
openBuilder: (BuildContext _, VoidCallback openContainer) {
|
||||
c.notificacoesResults[index].visualizado = true;
|
||||
@@ -136,7 +137,7 @@ class NotificacoesScreen extends StatelessWidget {
|
||||
//return _DetailsPage();
|
||||
return NotificacaoDetail();
|
||||
},
|
||||
onClosed: (bool isMarkedAsDone) {
|
||||
onClosed: (bool? isMarkedAsDone) {
|
||||
c.notificacaoLidaBloc(c.notificacoesResults[index].iD);
|
||||
if (isMarkedAsDone ?? false)
|
||||
Get.rawSnackbar(message: 'Marked as done!');
|
||||
@@ -150,21 +151,21 @@ class NotificacoesScreen extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildListTileTile({Function onTap,@required int index}){
|
||||
Widget _buildListTileTile({Function? onTap,required int index}){
|
||||
return ListTile(
|
||||
leading: CircleAvatar(
|
||||
backgroundImage: GetUtils.isNullOrBlank(c.notificacoesResults[index].imageUrl) ? AssetImage(
|
||||
backgroundImage: (GetUtils.isNullOrBlank(c.notificacoesResults[index].imageUrl)! ? AssetImage(
|
||||
'assets/images/logo.png',
|
||||
) : NetworkImage(c.notificacoesResults[index].imageUrl),
|
||||
) : NetworkImage(c.notificacoesResults[index].imageUrl!)) as ImageProvider<Object>?,
|
||||
// child: Image.asset(
|
||||
// 'assets/images/logo.png',
|
||||
// width: 40,
|
||||
// ),
|
||||
),
|
||||
onTap: onTap,
|
||||
trailing: c.notificacoesResults[index].visualizado ? Text('') : Text('●',style: TextStyle(color: Colors.blue),),
|
||||
title: Text(c.notificacoesResults[index].titulo),
|
||||
subtitle: Text(c.getDateFormatada(c.notificacoesResults[index].dataNotificacao)),
|
||||
onTap: onTap as void Function()?,
|
||||
trailing: c.notificacoesResults[index].visualizado! ? Text('') : Text('●',style: TextStyle(color: Colors.blue),),
|
||||
title: Text(c.notificacoesResults[index].titulo!),
|
||||
subtitle: Text(c.getDateFormatada(c.notificacoesResults[index].dataNotificacao!)),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user