migração flutter 2.2.1

This commit is contained in:
Renan
2021-06-01 16:52:01 -03:00
parent c44fcdddea
commit dd6bbb650b
25 changed files with 568 additions and 469 deletions
+8 -7
View File
@@ -219,7 +219,7 @@ class _YouTubeVideosScreenState extends State<YouTubeVideosScreen> with Automati
// child: this._buildListTile(index)
// );
} else if (index > 1) {
if (!GetUtils.isNullOrBlank(c.results.value.nextPageToken)) {
if (!GetUtils.isNullOrBlank(c.results.value.nextPageToken)!) {
c.getChannelVideosBloc();
return Center(child: CircularProgressIndicator(),);
} else {
@@ -248,7 +248,7 @@ class _YouTubeVideosScreenState extends State<YouTubeVideosScreen> with Automati
Widget listItem(YouTubeItems item) {
return InkWell(
onTap: (){
if(GetUtils.isNullOrBlank(item.id.videoId)){
if(GetUtils.isNullOrBlank(item.id!.videoId)!){
Get.rawSnackbar(message: 'Não foi possível reproduzir o vídeo');
}
else{
@@ -281,21 +281,21 @@ class _YouTubeVideosScreenState extends State<YouTubeVideosScreen> with Automati
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
item.snippet.title,
item.snippet!.title!,
softWrap: true,
maxLines: 2,
style: TextStyle(fontSize: 13.0,fontWeight: FontWeight.bold),
),
Padding(padding: EdgeInsets.only(bottom: 1.5)),
Text(
item.snippet.description,
item.snippet!.description!,
softWrap: true,
maxLines: 3,
style: TextStyle(fontSize: 11.0,fontWeight: FontWeight.w400),
),
Padding(padding: EdgeInsets.only(bottom: 3.0)),
Text(
c.getDateFormatada(item.snippet.publishedAt),
c.getDateFormatada(item.snippet!.publishedAt!),
softWrap: true,
maxLines: 1,
style: TextStyle(fontSize: 9.0,fontWeight: FontWeight.w300),
@@ -315,8 +315,9 @@ class _YouTubeVideosScreenState extends State<YouTubeVideosScreen> with Automati
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'),)
],
),
);