carga inicial

This commit is contained in:
2021-05-05 15:52:09 -03:00
parent dbf070041b
commit 129abeccf6
58 changed files with 385 additions and 133 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# appcardsstarter
# decpisos
A new Flutter project.
+1 -1
View File
@@ -44,7 +44,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.hightechx.mobile.appcardsstarter"
applicationId "com.hightechx.mobile.decpisos"
minSdkVersion 17
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
+52
View File
@@ -57,6 +57,58 @@
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:661329313113:android:fa13e72a45f3595175a048",
"android_client_info": {
"package_name": "com.hightechx.mobile.decpisos"
}
},
"oauth_client": [
{
"client_id": "661329313113-fd8lhsa9fmv1t59a9a15saeejl7j2l8o.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.hightechx.mobile.decpisos",
"certificate_hash": "64cead3173785642d31904f0f7d5036aba3a82e1"
}
},
{
"client_id": "661329313113-u743q7e6p7c2jhbv2nn3rk7aforpjf75.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.hightechx.mobile.decpisos",
"certificate_hash": "ce5f6fbc5eae2dc39f5e4a36ff2f85ea2c269676"
}
},
{
"client_id": "661329313113-blgbjmo9853q56n6ilgr1e8a8hhh3k2j.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCwdjw-NID4KGmJpb9QsDPZAcHVU6DUxpw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "661329313113-blgbjmo9853q56n6ilgr1e8a8hhh3k2j.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "661329313113-3hcmlgoji7hpqkmceptvor56m2us1blc.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.hightechx.mobile.iconnectstarter"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:661329313113:android:ff30051390d15f2375a048",
+1 -1
View File
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hightechx.mobile.appcardsstarter">
package="com.hightechx.mobile.decpisos">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
+2 -2
View File
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hightechx.mobile.appcardsstarter">
package="com.hightechx.mobile.decpisos">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
@@ -8,7 +8,7 @@
<application
android:usesCleartextTraffic="true"
android:name="io.flutter.app.FlutterApplication"
android:label="appcardsstarter"
android:label="Decpisos"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
@@ -1,4 +1,4 @@
package com.hightechx.mobile.appcardsstarter
package com.hightechx.mobile.decpisos
import io.flutter.embedding.android.FlutterActivity
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
<item android:drawable="@color/splash_color"/>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
</item>
</layer-list>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splash_color">#A1A1A1</color>
</resources>
+2 -1
View File
@@ -5,6 +5,7 @@
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowFullscreen">false</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
@@ -15,4 +16,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@android:color/white</item>
</style>
</resources>
</resources>
+1 -1
View File
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hightechx.mobile.appcardsstarter">
package="com.hightechx.mobile.decpisos">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Binary file not shown.

Before

Width:  |  Height:  |  Size: 949 KiB

After

Width:  |  Height:  |  Size: 82 KiB

+4 -4
View File
@@ -367,7 +367,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hightechx.mobile.appcardsstarter;
PRODUCT_BUNDLE_IDENTIFIER = com.hightechx.mobile.decpisos;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -499,7 +499,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hightechx.mobile.appcardsstarter;
PRODUCT_BUNDLE_IDENTIFIER = com.hightechx.mobile.decpisos;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -526,7 +526,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.hightechx.mobile.appcardsstarter;
PRODUCT_BUNDLE_IDENTIFIER = com.hightechx.mobile.decpisos;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -560,4 +560,4 @@
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "background.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

@@ -1,23 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 60 KiB

+13 -6
View File
@@ -16,13 +16,19 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
<constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
</constraints>
</view>
</viewController>
@@ -32,6 +38,7 @@
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
<image name="LaunchImage" width="1024" height="1024"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources>
</document>
</document>
+44 -42
View File
@@ -1,45 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>appcardsstarter</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>decpisos</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<false/>
</dict>
</plist>
+8 -7
View File
@@ -8,10 +8,10 @@ import 'default_response_api.dart';
class FuncoesGerais{
//static const String urlLexLiteApi = "https://apis.lexstation.com/api/v1/";
static const String tokenPadrao = "XW3Y21GZWD9HIB8XOME4UE2APLPG3J";
static const String tokenPadrao = "0GR7IE9OLII2UAUPJI80P1UHUK87WU";
static const String urlBaseNewCore = "https://newcore.services/newcore/";
static const int appMobileCodigo = 18;
static const String nomeApp = "App Cards Starter";
static const String nomeApp = "Decpisos";
static const int versaoAtual = 100;
static const String youtubeApiKey = "AIzaSyAmqjP0MxgASbt98Px1_hqaIvcsqeHO15k";//"AIzaSyA8jo3qsr-JJRm40iSHfkrzaMZXdMjo9v4";
static const String channelId = "UCJ_EUoswNTvRGotJ-ROxaKw";
@@ -76,8 +76,9 @@ class FuncoesGerais{
try {
var body = json.encode(objPost);
//var response = await http.post(url, body: body,headers: heads);
var r = await http.post(url, body: body,headers: heads);
print(r);
await http.post(url, body: body,headers: heads);
//var r = await http.post(url, body: body,headers: heads);
//print(r);
// if (response != null) {
// if (response.statusCode == 200) {
// var data = jsonDecode(response.body);
@@ -89,9 +90,9 @@ class FuncoesGerais{
}
}
else{
print('Nada');
}
// else{
// print('Nada');
// }
}
static Future<VersaoMinimaResponse> checkVersaoMinimaOk() async{
+1 -1
View File
@@ -1,4 +1,4 @@
import 'package:appcardsstarter/funcoes_gerais.dart';
import 'package:decpisos/funcoes_gerais.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:webview_flutter/webview_flutter.dart';
+44 -39
View File
@@ -1,55 +1,60 @@
import 'package:appcardsstarter/home/home.dart';
import 'package:appcardsstarter/notificacoes/notificacoes.dart';
import 'package:appcardsstarter/videos/youtube_videos.dart';
//import 'package:decpisos/home/home.dart';
import 'package:decpisos/index/index_controller.dart';
//import 'package:decpisos/notificacoes/notificacoes.dart';
//import 'package:decpisos/videos/youtube_videos.dart';
import 'package:convex_bottom_bar/convex_bottom_bar.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class IndexScreen extends StatefulWidget {
@override
_IndexScreenState createState() => _IndexScreenState();
}
class _IndexScreenState extends State<IndexScreen> with SingleTickerProviderStateMixin{
TabController _tabController;
class _IndexScreenState extends State<IndexScreen> {
// TabController _tabController;
@override
void initState() {
super.initState();
_tabController = TabController(length: 3, vsync: this);
_tabController.index = 1;
}
// @override
// void initState() {
// super.initState();
// _tabController = TabController(length: 3, vsync: this);
// _tabController.index = 1;
// }
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
// @override
// void dispose() {
// _tabController.dispose();
// super.dispose();
// }
final IndexController c = Get.put(IndexController());
@override
Widget build(BuildContext context) {
return Scaffold(
body: TabBarView(
controller: _tabController,
physics: NeverScrollableScrollPhysics(),
children: [
YouTubeVideosScreen(),
HomeScreen(),
NotificacoesScreen()
]
),
bottomNavigationBar: ConvexAppBar(
items: [
TabItem(icon: Icons.video_collection, title: 'Vídeos'),
TabItem(icon: Icons.home, title: 'Home'),
TabItem(icon: Icons.notifications, title: 'Notificações'),
],
style: TabStyle.flip,
backgroundColor: Theme.of(context).primaryColor,
controller: _tabController,
// onTap: (int i){
// print(i);
// },
),
body: Obx(() => TabBarView(
controller: c.tabController,
physics: NeverScrollableScrollPhysics(),
// children: [
// YouTubeVideosScreen(),
// HomeScreen(),
// NotificacoesScreen()
// ]
children: c.childrenTabs.map((element) => element).toList(),
)),
bottomNavigationBar: Obx(() => ConvexAppBar(
// items: [
// TabItem(icon: Icons.video_collection, title: 'Vídeos'),
// TabItem(icon: Icons.home, title: 'Home'),
// TabItem(icon: Icons.notifications, title: 'Notificações'),
// ],
items: c.tabs.map((element) => element).toList(),
style: TabStyle.flip,
backgroundColor: Theme.of(context).primaryColor,
controller: c.tabController,
// onTap: (int i){
// print(i);
// },
)),
);
}
}
}
+46
View File
@@ -0,0 +1,46 @@
import 'package:decpisos/home/home.dart';
import 'package:decpisos/notificacoes/notificacoes.dart';
import 'package:decpisos/videos/youtube_videos.dart';
import 'package:convex_bottom_bar/convex_bottom_bar.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class IndexController extends GetxController with SingleGetTickerProviderMixin{
TabController tabController;
var tabs = List<TabItem>().obs;
var childrenTabs = List<Widget>().obs;
@override
void onInit() {
super.onInit();
this.initTabs();
this.tabController.index = 1;
}
@override
void onClose() {
this.tabController.dispose();
super.onClose();
}
void initTabs(){
this.childrenTabs.add(YouTubeVideosScreen());
this.childrenTabs.add(HomeScreen());
this.childrenTabs.add(NotificacoesScreen());
this.tabs.add(TabItem(icon: Icons.video_collection, title: 'Vídeos'));
this.tabs.add(TabItem(icon: Icons.home, title: 'Home'));
this.tabs.add(TabItem(icon: Icons.notifications, title: 'Notificações'));
this.tabController = TabController(vsync: this, length: this.tabs.length);
}
void tabsWithoutVideos(){
this.childrenTabs.clear();
this.tabs.clear();
this.childrenTabs.add(HomeScreen());
this.childrenTabs.add(NotificacoesScreen());
this.tabs.add(TabItem(icon: Icons.home, title: 'Home'));
this.tabs.add(TabItem(icon: Icons.notifications, title: 'Notificações'));
this.tabController = new TabController(vsync: this, length: this.tabs.length);
Get.rawSnackbar(message: 'Vídeos temporariamente indisponível');
}
}
+2 -1
View File
@@ -1,3 +1,4 @@
import 'package:decpisos/funcoes_gerais.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:get/get.dart';
@@ -6,7 +7,7 @@ import 'splash/splash.dart';
void main() {
runApp(GetMaterialApp(
title: 'LEX Station Lite',
title: FuncoesGerais.nomeApp,
localizationsDelegates: [
// ... app-specific localization delegate[s] here
GlobalMaterialLocalizations.delegate,
+2 -2
View File
@@ -1,4 +1,4 @@
import 'package:appcardsstarter/funcoes_gerais.dart';
import 'package:decpisos/funcoes_gerais.dart';
import 'package:flutter/material.dart';
import 'package:animated_splash_screen/animated_splash_screen.dart';
import 'package:get/get.dart';
@@ -32,7 +32,7 @@ class SplashScreen extends StatelessWidget {
splashIconSize: Get.size.height,
splashTransition: SplashTransition.slideTransition,
pageTransitionType: PageTransitionType.fade,
backgroundColor: Colors.white,
backgroundColor: Colors.blueGrey.shade800,
screenFunction: ()async{
await c.firebaseCloudMessagingListeners();
await c.verTutorial();
+3 -3
View File
@@ -1,8 +1,8 @@
import 'dart:io';
import 'package:appcardsstarter/atualizarapp/atualizarapp.dart';
import 'package:appcardsstarter/index/index.dart';
import 'package:appcardsstarter/notificacoes/notificacoes.dart';
import 'package:decpisos/atualizarapp/atualizarapp.dart';
import 'package:decpisos/index/index.dart';
import 'package:decpisos/notificacoes/notificacoes.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+1 -1
View File
@@ -36,7 +36,7 @@ class YouTubeApi{
retorno = YouTubeSearchResponse.fromJson(data);
} else {
var data = jsonDecode(response.body);
retorno.errorCode = 2;
retorno.errorCode = -5;
retorno.errorMessage = "Erro inesperado, tente novamente mais tarde. #${response.statusCode}";
if(data != null && data['error'] != null){
if(data['error']['message'] != null && data['error']['message'].toString().isNotEmpty){
+7 -3
View File
@@ -1,11 +1,12 @@
import 'package:appcardsstarter/videos/api/youtube_api.dart';
import 'package:appcardsstarter/videos/api/youtube_classes.dart';
import 'package:decpisos/index/index_controller.dart';
import 'package:decpisos/videos/api/youtube_api.dart';
import 'package:decpisos/videos/api/youtube_classes.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart' show DateFormat;
class YouTubeController extends GetxController {
YouTubeApi _api = new YouTubeApi();
final IndexController _ic = Get.find();
var results = new YouTubeSearchResponse(
errorCode: 0,
errorMessage: '',
@@ -58,6 +59,9 @@ class YouTubeController extends GetxController {
results.value.nextPageToken = more.nextPageToken ?? '';
results.value.items += more.items;
}
if(this.errorCode.value == -5){
this._ic.tabsWithoutVideos();
}
this.loading.value = false;
}
+1 -1
View File
@@ -1,4 +1,4 @@
import 'package:appcardsstarter/videos/youtube_video_player.dart';
import 'package:decpisos/videos/youtube_video_player.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:get/get.dart';
+42
View File
@@ -15,6 +15,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
@@ -181,6 +195,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0+4"
flutter_launcher_icons:
dependency: "direct dev"
description:
name: flutter_launcher_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.1"
flutter_layout_grid:
dependency: transitive
description:
@@ -193,6 +214,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_native_splash:
dependency: "direct dev"
description:
name: flutter_native_splash
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.2"
flutter_staggered_animations:
dependency: "direct main"
description:
@@ -245,6 +273,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.19"
import_js_library:
dependency: transitive
description:
@@ -642,6 +677,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.1"
yaml:
dependency: transitive
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
youtube_player_flutter:
dependency: "direct main"
description:
+71 -1
View File
@@ -1,4 +1,4 @@
name: appcardsstarter
name: decpisos
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
@@ -52,6 +52,76 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.8.1
flutter_native_splash: ^0.3.2
flutter_icons:
android: true
ios: true
image_path: "assets/images/logo.png"
flutter_native_splash:
# This package generates native code to customize Flutter's default white native splash screen
# with background color and splash image.
# Customize the parameters below, and run the following command in the terminal:
# flutter pub run flutter_native_splash:create
# To restore Flutter's default white splash screen, run the following command in the terminal:
# flutter pub run flutter_native_splash:remove
# color is the only required parameter. It sets the background color of your splash screen.
color: "#A1A1A1"
# Optional parameters are listed below. To enable a parameter, uncomment the line by removing
# the leading # character.
# The image parameter allows you to specify an image used in the splash screen. It must be a
# png file.
image: assets/images/logo.png
# The color_dark and image_dark are parameters that set the color and image when the device is
# in dark mode. If they are not specified, the app will use the color and image above.
# If the image_dark parameter is specified, color_dark must be specified.
#color_dark: "#042a49"
#image_dark: assets/splash-invert.png
# The android and ios parameters can be used to disable generating a splash screen on a given
# platform.
android: true
ios: true
#web: false
# The position of the splash image can be set with android_gravity, ios_content_mode, and
# web_image_mode parameters. All default to center.
#
# android_gravity can be one of the following Android Gravity (see
# https://developer.android.com/reference/android/view/Gravity): bottom, center,
# center_horizontal, center_vertical, clip_horizontal, clip_vertical, end, fill, fill_horizontal,
# fill_vertical, left, right, start, or top.
android_gravity: center
#
# ios_content_mode can be one of the following iOS UIView.ContentMode (see
# https://developer.apple.com/documentation/uikit/uiview/contentmode): scaleToFill,
# scaleAspectFit, scaleAspectFill, center, top, bottom, left, right, topLeft, topRight,
# bottomLeft, or bottomRight.
ios_content_mode: center
#
# web_image_mode can be one of the following modes: center, contain, stretch, and cover.
#web_image_mode: center
# To hide the notification bar, use the fullscreen parameter. Has no affect in web since web
# has no notification bar. Defaults to false.
# NOTE: Unlike Android, iOS will not automatically show the notification bar when the app loads.
# To show the notification bar, add the following code to your Flutter app:
# WidgetsFlutterBinding.ensureInitialized();
# SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]);
fullscreen: false
# If you have changed the name(s) of your info.plist file(s), you can specify the filename(s)
# with the info_plist_files parameter. Remove only the # characters in the three lines below,
# do not remove any spaces:
#info_plist_files:
# - 'ios/Runner/Info-Debug.plist'
# - 'ios/Runner/Info-Release.plist'
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
+1 -1
View File
@@ -5,7 +5,7 @@
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:appcardsstarter/splash/splash.dart';
import 'package:decpisos/splash/splash.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';