Skip to content

Instantly share code, notes, and snippets.

Avatar
😁
I may be slow to respond.

Rafael Almeida Barbosa RafaelBarbosatec

😁
I may be slow to respond.
View GitHub Profile
View Open pdf
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:open_file/open_file.dart';
import 'package:path_provider/path_provider.dart';
void main() {
runApp(MyApp());
}
View class_notice_complet.dart
import 'package:flutter/material.dart';
class Notice extends StatelessWidget{
var _img;
var _title;
var _date;
var _description;
Notice(this._img,this._title,this._date,this._description);
View item_list_help.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
View NoticeComplete.dart
import 'package:flutter/material.dart';
import 'package:flutter_tutorial_medium/Detail.dart';
class Notice extends StatelessWidget {
var _img;
var _title;
var _date;
var _description;
Notice(this._img, this._title, this._date, this._description);
View NoticeInkWell.dart
@override
Widget build(BuildContext context) {
this._context = context;
//Foi adicionado dentro de Container para adicionar margem no item
return new Container(
margin: const EdgeInsets.only(
left: 10.0, right: 10.0, bottom: 10.0, top: 0.0),
child: new Material(
borderRadius: new BorderRadius.circular(6.0),
View detail.dart
import 'package:flutter/material.dart';
class Detail extends StatelessWidget{
var _img;
var _title;
var _date;
var _description;
Detail(this._img,this._title,this._date,this._description);
View set_category.dart
void setCategorys() {
_categorys.add("Geral");
_categorys.add("Esporte");
_categorys.add("Tecnologia");
_categorys.add("Entretenimento");
_categorys.add("Saúde");
_categorys.add("Negócios");
}
View NoticeList_category.dart
import 'package:flutter/material.dart';
import 'Notice.dart';
import 'NewsApi.dart';
class NoticeList extends StatefulWidget{
final state = new _NoticeListPageState();
@override
_NoticeListPageState createState() => state;
View scafold_list_category.dart
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(),
body: new Container(
child: new Column(
children: <Widget>[
_getListCategory(),
new Expanded(
View build_item_categoria.dart
Widget _buildCategoryItem(index){
return new GestureDetector(
onTap: (){
onTabCategory(index);
},
child: new Center(
child: new Container(
margin: new EdgeInsets.only(left: 10.0),
child: new Material(