Skip to content

Commit

Permalink
Merge pull request #5 from RafaelBarbosatec/adicionaBSEV
Browse files Browse the repository at this point in the history
Adiciona bsev
  • Loading branch information
RafaelBarbosatec authored May 18, 2019
2 parents 23a5596 + 61da684 commit 142eded
Show file tree
Hide file tree
Showing 45 changed files with 710 additions and 771 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ News application developed for practice, learning and testing the potential of t

-Architecture: [Bloc](https://www.didierboelens.com/2018/12/reactive-programming---streams---bloc---practical-use-cases/)

-Libs: [Url_laucher](https://pub.dartlang.org/packages/url_launcher), [PageTransformer](https://github.com/FlutterRocks/page-transformer)
-Libs: [Url_laucher](https://pub.dartlang.org/packages/url_launcher), [PageTransformer](https://github.com/FlutterRocks/page-transformer), [BSEV](https://pub.dev/packages/bsev)


## Tutorial
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ android {
applicationId "com.rafaelbarbosatec.newsflutter"
minSdkVersion 16
targetSdkVersion 27
versionCode 4
versionName "1.2.0"
versionCode 5
versionName "1.5.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand Down
19 changes: 0 additions & 19 deletions lib/conection/repository.dart

This file was deleted.

41 changes: 0 additions & 41 deletions lib/injection/injector.dart

This file was deleted.

15 changes: 10 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import 'package:FlutterNews/injection/injector.dart';
import 'package:FlutterNews/localization/MyLocalizationsDelegate.dart';
import 'package:FlutterNews/support/di/inject_bloc.dart';
import 'package:FlutterNews/support/di/inject_repository.dart';
import 'package:FlutterNews/support/localization/MyLocalizationsDelegate.dart';
import 'package:bsev/bsev.dart';
import 'package:bsev/flavors.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter/material.dart';
import 'package:FlutterNews/pages/home/home.dart';
import 'package:FlutterNews/pages/home/home_view.dart';

void main() => runApp(new NewsApp());

Expand All @@ -12,7 +15,9 @@ class NewsApp extends StatelessWidget {
MyLocalizationsDelegate myLocation = const MyLocalizationsDelegate();

NewsApp(){
Injector.configure(Flavor.PRO);
Flavors.configure(Flavor.PROD);
injectRepository(Injector.appInstance);
injectBloc(Injector.appInstance);
}

// This widget is the root of your application.
Expand All @@ -35,7 +40,7 @@ class NewsApp extends StatelessWidget {
GlobalWidgetsLocalizations.delegate,
],
localeResolutionCallback: myLocation.resolution,
home: HomePage.create(),
home: HomeView().create(),
);
}

Expand Down
29 changes: 12 additions & 17 deletions lib/pages/datail/detail.dart
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
import 'dart:async';
import 'dart:io';

import 'package:FlutterNews/localization/MyLocalizations.dart';
import 'package:FlutterNews/util/date_util.dart';
import 'package:FlutterNews/util/functions.dart';
import 'package:FlutterNews/support/util/StringsLocation.dart';
import 'package:FlutterNews/support/util/date_util.dart';
import 'package:FlutterNews/support/util/functions.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:share/share.dart';

class DetailPage extends StatelessWidget{

var _img;
var _title;
var _date;
var _description;
var _link;
var _category;
var _origin;
final _img;
final _title;
final _date;
final _description;
final _link;
final _category;
final _origin;

DetailPage(this._img,this._title,this._date,this._description,this._category,this._link,this._origin);

MyLocalizations strl;

@override
Widget build(BuildContext context) {

strl = MyLocalizations.of(context);

return new Scaffold(
appBar: new AppBar(
title: new Text(_origin),
Expand Down Expand Up @@ -195,11 +190,11 @@ class DetailPage extends StatelessWidget{
builder: (BuildContext context) {
// return object of type Dialog
return AlertDialog(
content: new Text(strl.trans("text_copy")),
content: new Text(getString("text_copy")),
actions: <Widget>[
// usually buttons at the bottom of the dialog
new FlatButton(
child: new Text(strl.trans("text_fechar")),
child: new Text(getString("text_fechar")),
onPressed: () {
Navigator.of(context).pop();
},
Expand Down
10 changes: 0 additions & 10 deletions lib/pages/featured/FeaturedEvents.dart

This file was deleted.

155 changes: 0 additions & 155 deletions lib/pages/featured/content_featured.dart

This file was deleted.

Loading

0 comments on commit 142eded

Please sign in to comment.