diff --git a/README.md b/README.md index 6ecd506..2211acb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# appcardsstarter +# decpisos A new Flutter project. diff --git a/android/app/build.gradle b/android/app/build.gradle index 1615dde..a89ca03 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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() diff --git a/android/app/google-services.json b/android/app/google-services.json index befa58b..b5ea7bf 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -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", diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 82cf4a1..dd87c66 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.hightechx.mobile.decpisos"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e22200d..2ff25d3 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.hightechx.mobile.decpisos"> - - - - + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..34b38eb 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..65f547c 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..dfbccdc 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..c0d6c55 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..24c2b12 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..4a2d983 --- /dev/null +++ b/android/app/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #A1A1A1 + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 1f83a33..58b44cc 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -5,6 +5,7 @@ @drawable/launch_background + false diff --git a/assets/images/logo.png b/assets/images/logo.png index a395366..db8daef 100644 Binary files a/assets/images/logo.png and b/assets/images/logo.png differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 591ceda..870bfc3 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -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 */; -} +} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index dc9ada4..097399f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 28c6bf0..611415f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2ccbfd9..efac7ef 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index f091b6b..6a2a245 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cde121..b811872 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index d0ef06e..ac8c600 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index dcdc230..085b8df 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd9..efac7ef 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index c8f9ed8..2c1dfa0 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index a6d6b86..94374bc 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b86..94374bc 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 75b2d16..169e16b 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d..c25be4f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 6a84f41..f69ec0f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d0e1f58..2aa6ca6 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json new file mode 100644 index 0000000..9f447e1 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json @@ -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 + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png new file mode 100644 index 0000000..4b19f0c Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json index 0bedcf2..00cabce 100644 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -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 } } diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png index 9da19ea..a24f811 100644 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png index 9da19ea..88190c3 100644 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png index 9da19ea..097399f 100644 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard index f2e259c..28f9d1b 100644 --- a/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -16,13 +16,19 @@ - - + + - - + + + + + + + + @@ -32,6 +38,7 @@ - + + - + \ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 52b22bd..32f4564 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -1,45 +1,47 @@ - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - appcardsstarter - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + decpisos + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + UIStatusBarHidden + + + \ No newline at end of file diff --git a/lib/funcoes_gerais.dart b/lib/funcoes_gerais.dart index be661ce..359354a 100644 --- a/lib/funcoes_gerais.dart +++ b/lib/funcoes_gerais.dart @@ -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 checkVersaoMinimaOk() async{ diff --git a/lib/home/home.dart b/lib/home/home.dart index e28f1e6..beab829 100644 --- a/lib/home/home.dart +++ b/lib/home/home.dart @@ -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'; diff --git a/lib/index/index.dart b/lib/index/index.dart index 5036da4..2393a6b 100644 --- a/lib/index/index.dart +++ b/lib/index/index.dart @@ -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 with SingleTickerProviderStateMixin{ - TabController _tabController; +class _IndexScreenState extends State { + // 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); + // }, + )), ); } -} \ No newline at end of file +} diff --git a/lib/index/index_controller.dart b/lib/index/index_controller.dart new file mode 100644 index 0000000..789376d --- /dev/null +++ b/lib/index/index_controller.dart @@ -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().obs; + var childrenTabs = List().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'); + } + +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 0820a1d..817a1f5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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, diff --git a/lib/splash/splash.dart b/lib/splash/splash.dart index d74cdee..51b652c 100644 --- a/lib/splash/splash.dart +++ b/lib/splash/splash.dart @@ -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(); diff --git a/lib/splash/splash_controller.dart b/lib/splash/splash_controller.dart index e8fd069..0cfbb1a 100644 --- a/lib/splash/splash_controller.dart +++ b/lib/splash/splash_controller.dart @@ -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'; diff --git a/lib/videos/api/youtube_api.dart b/lib/videos/api/youtube_api.dart index 2a6c5a0..fb32467 100644 --- a/lib/videos/api/youtube_api.dart +++ b/lib/videos/api/youtube_api.dart @@ -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){ diff --git a/lib/videos/bloc/youtube_controller.dart b/lib/videos/bloc/youtube_controller.dart index 2a64c17..aefda89 100644 --- a/lib/videos/bloc/youtube_controller.dart +++ b/lib/videos/bloc/youtube_controller.dart @@ -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; } diff --git a/lib/videos/youtube_videos.dart b/lib/videos/youtube_videos.dart index bd09f46..5166be0 100644 --- a/lib/videos/youtube_videos.dart +++ b/lib/videos/youtube_videos.dart @@ -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'; diff --git a/pubspec.lock b/pubspec.lock index b777d96..132ad5a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: diff --git a/pubspec.yaml b/pubspec.yaml index 19283e2..c69679d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 diff --git a/test/widget_test.dart b/test/widget_test.dart index 5e0a0bc..fef4e33 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -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';