This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NoticeList extends StatefulWidget{ | |
final state = new _NoticeListPageState(); | |
@override | |
_NoticeListPageState createState() => state; | |
} | |
class _NoticeListPageState extends State<NoticeList>{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id":"23658", | |
"tittle":"Tite recebe convocados nesta segunda e tem 27 dias de preparação para estreia", | |
"description":"As ausências certas são de Casemiro e Marcelo, do Real Madrid, e Roberto Firmino, do Liverpool, que disputarão a final da Liga dos Campeões", | |
"url_img":"http://104.131.18.84/notice/uploads/news/1fd055d2a109fe18af4414bf87293575.jpg", | |
"link":"https://www.otempo.com.br/superfc/tite-recebe-convocados-nesta-segunda-e-tem-27-dias-de-prepara%C3%A7%C3%A3o-para-estreia-1.1789078", | |
"origin":"Otempo.com.br", | |
"category":"sports", | |
"date":"2018-05-21 11:37:50" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'widgets/home.dart'; | |
import 'NoticeList.dart' | |
void main() => runApp(new NewsApp()); | |
class NewsApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:convert'; | |
class NewsApi{ | |
Future <List> loadNews() async{ | |
String json = "[ \n" + | |
" { \n" + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NoticeList extends StatefulWidget{ | |
final state = new _NoticeListPageState(); | |
@override | |
_NoticeListPageState createState() => state; | |
} | |
class _NoticeListPageState extends State<NoticeList>{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Material( | |
borderRadius: new BorderRadius.circular(6.0), | |
elevation: 2.0, | |
child: new Row( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
//Adicionamos aqui FadeInImage que é uma variande do widget Image. Ela nos possibilita carregar image de uma URL | |
new FadeInImage.assetNetwork( | |
placeholder: '', | |
image: _img, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Notice extends StatelessWidget{ | |
var _img; | |
var _title; | |
var _date; | |
var _description; | |
Notice(this._img,this._title,this._date,this._description); | |
BuildContext _context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'Notice.dart'; | |
import 'NewsApi.dart'; | |
class NoticeList extends StatefulWidget{ | |
final state = new _NoticeListPageState(); | |
@override | |
_NoticeListPageState createState() => state; |
OlderNewer