├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── lib ├── client │ ├── constants.dart │ ├── entities │ │ ├── auth.dart │ │ ├── user.dart │ │ └── content.dart │ └── client.dart ├── components │ ├── user_builder.dart │ ├── content │ │ ├── item.dart │ │ ├── list.dart │ │ ├── root_content_text_editor.dart │ │ └── page.dart │ ├── alert_box.dart │ ├── login_page.dart │ └── account_page.dart └── main.dart ├── screenshot.png ├── tabnews-icon.png ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── tabnews │ │ │ │ │ └── tabnews_flutter │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── README.md ├── analysis_options.yaml ├── pubspec.yaml ├── .gitignore ├── .run ├── Build icons.run.xml └── Run build_runner.run.xml ├── .metadata ├── .vscode └── settings.json └── pubspec.lock /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/client/constants.dart: -------------------------------------------------------------------------------- 1 | const baseUrl = "https://www.tabnews.com.br/api/v1"; -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/screenshot.png -------------------------------------------------------------------------------- /tabnews-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/tabnews-icon.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coffeeispower/tabnews-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/tabnews/tabnews_flutter/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.tabnews.tabnews_flutter 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 6 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TabNews App 2 | 3 | Um app do tabnews para android e IOS feito em flutter, simples e rápido. 4 | 5 | ![screenshot](screenshot.png) 6 | 7 | ## Como rodar 8 | 1. instale as dependencias do projeto com o comando: 9 | ```bash 10 | flutter pub get 11 | ``` 12 | 2. Rode o build_runner para gerar os arquivos de (de)serialização de json 13 | ```bash 14 | flutter pub run build_runner build 15 | ``` 16 | 3. Rode o app com o comando: 17 | ```bash 18 | flutter run 19 | ``` -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | include: package:flutter_lints/flutter.yaml 10 | 11 | linter: 12 | rules: 13 | non_constant_identifier_names: false 14 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: tabnews_flutter 2 | description: A TabNews flutter front-end 3 | publish_to: 'none' 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: '>=2.18.2 <3.0.0' 8 | 9 | dependencies: 10 | http: ^0.13.5 11 | provider: ^6.0.4 12 | flutter_session_manager: ^1.0.2 13 | timeago: ^3.3.0 14 | infinite_scroll_pagination: ^3.2.0 15 | json_serializable: ^6.5.4 16 | flutter: 17 | sdk: flutter 18 | flutter_markdown: ^0.6.9+1 19 | google_fonts: ^3.0.1 20 | json_annotation: ^4.7.0 21 | confetti: ^0.6.0 22 | dev_dependencies: 23 | build_runner: ^2.3.2 24 | flutter_test: 25 | sdk: flutter 26 | flutter_launcher_icons: ^0.10.0 27 | flutter_lints: ^2.0.0 28 | flutter_icons: 29 | android: true 30 | ios: true 31 | image_path: "tabnews-icon.png" 32 | flutter: 33 | uses-material-design: true -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | *.g.dart 46 | -------------------------------------------------------------------------------- /.run/Build icons.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | -------------------------------------------------------------------------------- /.run/Run build_runner.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | -------------------------------------------------------------------------------- /lib/components/user_builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:tabnews_flutter/main.dart'; 4 | 5 | import '../client/entities/user.dart'; 6 | 7 | class UserBuilder extends StatelessWidget { 8 | final Function(BuildContext, User) builder; 9 | 10 | const UserBuilder({super.key, required this.builder}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return FutureBuilder( 15 | future: context.read().fetchUser(), 16 | builder: (context, snapshot) { 17 | if (snapshot.hasError) { 18 | return Center( 19 | child: Text("Verifique sua conexão: ${snapshot.error}")); 20 | } 21 | if (snapshot.hasData) { 22 | return builder(context, snapshot.data as User); 23 | } 24 | return const Center( 25 | child: CircularProgressIndicator(), 26 | ); 27 | }, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 17 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 18 | - platform: linux 19 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 20 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /lib/client/entities/auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'auth.g.dart'; 3 | 4 | @JsonSerializable() 5 | class LoginRequest { 6 | final String email, password; 7 | LoginRequest({required this.email, required this.password}); 8 | Map toJson() => _$LoginRequestToJson(this); 9 | factory LoginRequest.fromJson(Map json) => 10 | _$LoginRequestFromJson(json); 11 | } 12 | 13 | @JsonSerializable() 14 | class Session { 15 | final String id, token; 16 | @JsonKey(name: "expires_at") 17 | final DateTime expiresAt; 18 | @JsonKey(name: "created_at") 19 | final DateTime createdAt; 20 | @JsonKey(name: "updated_at") 21 | final DateTime updatedAt; 22 | Session( 23 | {required this.id, 24 | required this.token, 25 | required this.expiresAt, 26 | required this.createdAt, 27 | required this.updatedAt}); 28 | factory Session.fromJson(Map json) => 29 | _$SessionFromJson(json); 30 | Map toJson() => _$SessionToJson(this); 31 | } 32 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/components/content/item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../client/entities/content.dart'; 4 | import 'page.dart'; 5 | 6 | class ContentListItem extends StatelessWidget { 7 | final Content content; 8 | final int index; 9 | 10 | const ContentListItem( 11 | {super.key, required this.index, required this.content}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Padding( 16 | padding: const EdgeInsets.all(10), 17 | child: ListTile( 18 | onTap: () => { 19 | Navigator.push(context, MaterialPageRoute(builder: (context) => ContentPage(content.title!, content.owner_username, content.slug))) 20 | }, 21 | key: super.key, 22 | title: Text("$index. ${content.title}"), 23 | subtitle: Text( 24 | "${content.tabcoins} tabcoins · ${content.children_deep_count} comentários · ${content.owner_username}"), 25 | shape: RoundedRectangleBorder( 26 | side: const BorderSide(color: Colors.grey, width: 1), 27 | borderRadius: BorderRadius.circular(5), 28 | ), 29 | contentPadding: const EdgeInsets.all(10.0), 30 | )); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/components/alert_box.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AlertBox extends StatefulWidget { 4 | const AlertBox({super.key, required this.message, required this.action}); 5 | final String message; 6 | final String action; 7 | factory AlertBox.fromError(dynamic e, {key}) { 8 | return AlertBox(key: key, message: e["message"], action: e["action"]); 9 | } 10 | @override 11 | State createState() => _AlertBoxState(); 12 | } 13 | 14 | class _AlertBoxState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Container( 18 | width: double.infinity, 19 | decoration: BoxDecoration( 20 | color: Colors.red[600]!, 21 | border: Border.all( 22 | color: Colors.red[400]!, 23 | style: BorderStyle.solid, 24 | width: 2, 25 | ), 26 | borderRadius: const BorderRadius.all(Radius.circular(10.0)), 27 | ), 28 | padding: const EdgeInsets.all(8.0), 29 | child: Column( 30 | crossAxisAlignment: CrossAxisAlignment.start, 31 | children: [ 32 | Text(widget.message), 33 | Text(widget.action), 34 | ], 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/client/entities/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part "user.g.dart"; 3 | 4 | @JsonSerializable() 5 | class User { 6 | final String id; 7 | final String username; 8 | final String email; 9 | final bool notifications; 10 | final List features; 11 | final int tabcoins, tabcash; 12 | @JsonKey(name: "created_at") 13 | final DateTime createdAt; 14 | @JsonKey(name: "updated_at") 15 | final DateTime updatedAt; 16 | User( 17 | {required this.id, 18 | required this.username, 19 | required this.email, 20 | required this.features, 21 | required this.tabcoins, 22 | required this.tabcash, 23 | required this.createdAt, 24 | required this.updatedAt, 25 | required this.notifications}); 26 | factory User.fromJson(Map json) => _$UserFromJson(json); 27 | factory User.createAnonymous() => User( 28 | id: "", 29 | username: "", 30 | email: "", 31 | features: ['read:activation_token', 'create:session', 'create:user'], 32 | tabcoins: 0, 33 | tabcash: 0, 34 | createdAt: DateTime.now(), 35 | updatedAt: DateTime.now(), 36 | notifications: false, 37 | ); 38 | } 39 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Tabnews 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | TabNews 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 16 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/components/content/list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; 3 | import 'package:tabnews_flutter/client/client.dart'; 4 | 5 | import '../../client/entities/content.dart'; 6 | import 'item.dart'; 7 | 8 | class ContentList extends StatefulWidget { 9 | final Strategy strategy; 10 | const ContentList({super.key, required this.strategy}); 11 | 12 | @override 13 | // ignore: library_private_types_in_public_api 14 | _ContentListState createState() => _ContentListState(); 15 | } 16 | 17 | class _ContentListState extends State { 18 | static const _pageSize = 30; 19 | final PagingController _pagingController = 20 | PagingController(firstPageKey: 1); 21 | 22 | @override 23 | void initState() { 24 | super.initState(); 25 | _pagingController.addPageRequestListener((pageKey) { 26 | _fetchPage(pageKey); 27 | }); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) => 32 | // Don't worry about displaying progress or error indicators on screen; the 33 | // package takes care of that. If you want to customize them, use the 34 | // [PagedChildBuilderDelegate] properties. 35 | PagedListView( 36 | pagingController: _pagingController, 37 | builderDelegate: PagedChildBuilderDelegate( 38 | itemBuilder: (context, item, index) => ContentListItem( 39 | index: index + 1, 40 | content: item, 41 | ), 42 | ), 43 | ); 44 | 45 | @override 46 | void dispose() { 47 | _pagingController.dispose(); 48 | super.dispose(); 49 | } 50 | 51 | Future _fetchPage(int pageKey) async { 52 | try { 53 | final newItems = 54 | await TabNewsClient.listContents(pageKey, _pageSize, widget.strategy); 55 | final isLastPage = newItems.length < _pageSize; 56 | if (!mounted) { 57 | return; 58 | } 59 | if (isLastPage) { 60 | _pagingController.appendLastPage(newItems); 61 | } else { 62 | final nextPageKey = pageKey + 1; 63 | _pagingController.appendPage(newItems, nextPageKey); 64 | } 65 | } catch (e) { 66 | _pagingController.error = e; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.tabnews.tabnews_flutter" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/client/entities/content.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import '../client.dart'; 4 | 5 | part "content.g.dart"; 6 | 7 | @JsonSerializable() 8 | class Content { 9 | final String id, owner_id; 10 | final String slug, status, owner_username; 11 | final String? body, source_url, parent_id, title; 12 | final DateTime created_at, updated_at, published_at; 13 | final DateTime? deleted_at; 14 | int children_deep_count = 0; 15 | int tabcoins; 16 | List? children; 17 | bool isComment() => parent_id != null; 18 | Content( 19 | {required this.id, 20 | required this.owner_id, 21 | this.parent_id, 22 | required this.slug, 23 | this.title, 24 | required this.status, 25 | this.source_url, 26 | required this.owner_username, 27 | this.body, 28 | required this.created_at, 29 | required this.updated_at, 30 | required this.published_at, 31 | this.deleted_at, 32 | required this.tabcoins, 33 | this.children_deep_count = 0, 34 | this.children}); 35 | 36 | factory Content.fromJson(Map json) => 37 | _$ContentFromJson(json); 38 | Future upvote(TabNewsClient client) async { 39 | await client.upvote(this); 40 | } 41 | 42 | Future downvote(TabNewsClient client) async { 43 | await client.downvote(this); 44 | } 45 | 46 | // create copyWith 47 | Content copyWith({ 48 | String? id, 49 | String? owner_id, 50 | String? slug, 51 | String? status, 52 | String? owner_username, 53 | String? body, 54 | String? source_url, 55 | String? parent_id, 56 | String? title, 57 | DateTime? created_at, 58 | DateTime? updated_at, 59 | DateTime? published_at, 60 | DateTime? deleted_at, 61 | int? tabcoins, 62 | List? children, 63 | int? children_deep_count, 64 | }) { 65 | return Content( 66 | id: id ?? this.id, 67 | owner_id: owner_id ?? this.owner_id, 68 | slug: slug ?? this.slug, 69 | status: status ?? this.status, 70 | owner_username: owner_username ?? this.owner_username, 71 | body: body ?? this.body, 72 | source_url: source_url ?? this.source_url, 73 | parent_id: parent_id ?? this.parent_id, 74 | title: title ?? this.title, 75 | created_at: created_at ?? this.created_at, 76 | updated_at: updated_at ?? this.updated_at, 77 | published_at: published_at ?? this.published_at, 78 | deleted_at: deleted_at ?? this.deleted_at, 79 | tabcoins: tabcoins ?? this.tabcoins, 80 | children: children ?? this.children, 81 | children_deep_count: children_deep_count ?? this.children_deep_count, 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "android/**/gradle-wrapper.jar": true, 4 | "android/.gradle": true, 5 | "android/captures/": true, 6 | "android/gradlew": true, 7 | "android/gradlew.bat": true, 8 | "android/local.properties": true, 9 | "android/**/GeneratedPluginRegistrant.java": true, 10 | "android/**/key.properties": true, 11 | "android/**/*.keystore": true, 12 | "android/**/*.jks": true, 13 | "**/*.class": true, 14 | "**/*.log": true, 15 | "**/*.pyc": true, 16 | "**/*.swp": true, 17 | "**/.DS_Store": true, 18 | "**/.atom/": true, 19 | "**/.buildlog/": true, 20 | "**/.history": true, 21 | "**/.svn/": true, 22 | "**/migrate_working_dir/": true, 23 | "**/*.iml": true, 24 | "**/*.ipr": true, 25 | "**/*.iws": true, 26 | "**/.idea/": true, 27 | "**/doc/api/": true, 28 | "**/ios/Flutter/.last_build_id": true, 29 | "**/.dart_tool/": true, 30 | "**/.flutter-plugins": true, 31 | "**/.flutter-plugins-dependencies": true, 32 | "**/.packages": true, 33 | "**/.pub-cache/": true, 34 | "**/.pub/": true, 35 | "build/": true, 36 | "**/app.*.symbols": true, 37 | "**/app.*.map.json": true, 38 | "android/app/debug": true, 39 | "android/app/profile": true, 40 | "android/app/release": true, 41 | "**/*.g.dart": true, 42 | ".idea/shelf/": true, 43 | ".idea/workspace.xml": true, 44 | ".idea/httpRequests/": true, 45 | ".idea/dataSources/": true, 46 | ".idea/dataSources.local.xml": true, 47 | "ios/**/dgph": true, 48 | "ios/**/*.mode1v3": true, 49 | "ios/**/*.mode2v3": true, 50 | "ios/**/*.moved-aside": true, 51 | "ios/**/*.pbxuser": true, 52 | "ios/**/*.perspectivev3": true, 53 | "ios/**/*sync/": true, 54 | "ios/**/.sconsign.dblite": true, 55 | "ios/**/.tags*": true, 56 | "ios/**/.vagrant/": true, 57 | "ios/**/DerivedData/": true, 58 | "ios/**/Icon?": true, 59 | "ios/**/Pods/": true, 60 | "ios/**/.symlinks/": true, 61 | "ios/**/profile": true, 62 | "ios/**/xcuserdata": true, 63 | "ios/**/.generated/": true, 64 | "ios/Flutter/App.framework": true, 65 | "ios/Flutter/Flutter.framework": true, 66 | "ios/Flutter/Flutter.podspec": true, 67 | "ios/Flutter/Generated.xcconfig": true, 68 | "ios/**/Flutter/ephemeral/": true, 69 | "ios/Flutter/app.flx": true, 70 | "ios/Flutter/app.zip": true, 71 | "ios/**/Flutter/flutter_assets/": true, 72 | "ios/Flutter/flutter_export_environment.sh": true, 73 | "ios/**/ServiceDefinitions.json": true, 74 | "ios/Runner/GeneratedPluginRegistrant.*": true, 75 | "ios/**/default.mode1v3": false, 76 | "ios/**/default.mode2v3": false, 77 | "ios/**/default.pbxuser": false, 78 | "ios/**/default.perspectivev3": false 79 | } 80 | } -------------------------------------------------------------------------------- /lib/components/content/root_content_text_editor.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:tabnews_flutter/client/client.dart'; 4 | import 'package:tabnews_flutter/main.dart'; 5 | 6 | class RootContentTextEditor extends StatefulWidget { 7 | final Future Function(String title, String body) onFinish; 8 | final String editorTitle; 9 | final String initialTitle; 10 | final String initialBody; 11 | const RootContentTextEditor({ 12 | Key? key, 13 | required this.onFinish, 14 | required this.editorTitle, 15 | this.initialBody = "", 16 | this.initialTitle = "", 17 | }) : super(key: key); 18 | 19 | @override 20 | State createState() => _RootContentTextEditorState(); 21 | } 22 | 23 | class _RootContentTextEditorState extends State { 24 | late TextEditingController bodyController; 25 | late TextEditingController titleController; 26 | bool sending = false; 27 | @override 28 | void initState() { 29 | super.initState(); 30 | bodyController = TextEditingController(text: widget.initialBody); 31 | titleController = TextEditingController(text: widget.initialTitle); 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | var session = context.watch().session; 37 | var client = session != null ? TabNewsClient(session) : null; 38 | return Scaffold( 39 | appBar: AppBar(title: Text(widget.editorTitle), actions: [ 40 | IconButton( 41 | onPressed: client != null && !sending 42 | ? () { 43 | setState(() { 44 | sending = true; 45 | }); 46 | widget 47 | .onFinish( 48 | titleController.value.text, 49 | bodyController.value.text, 50 | ) 51 | .then((_) => setState(() => sending = false)) 52 | .catchError((_) => setState(() => sending = false)); 53 | } 54 | : null, 55 | icon: const Icon(Icons.check), 56 | ), 57 | ]), 58 | body: Column( 59 | children: [ 60 | Padding( 61 | padding: 62 | const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0), 63 | child: TextField( 64 | controller: titleController, 65 | decoration: const InputDecoration( 66 | labelText: "Título", 67 | ), 68 | ), 69 | ), 70 | Padding( 71 | padding: const EdgeInsets.all(8.0), 72 | child: TextField( 73 | controller: bodyController, 74 | maxLines: null, 75 | minLines: 3, 76 | textAlignVertical: TextAlignVertical.top, 77 | decoration: const InputDecoration( 78 | hintText: "Escreva aqui o seu conteúdo (markdown)", 79 | ), 80 | autofocus: true, 81 | ), 82 | ), 83 | ], 84 | ), 85 | ); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/components/login_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:tabnews_flutter/client/client.dart'; 4 | import 'package:tabnews_flutter/client/entities/auth.dart'; 5 | import 'package:tabnews_flutter/main.dart'; 6 | 7 | class LoginPage extends StatefulWidget { 8 | const LoginPage({super.key}); 9 | 10 | @override 11 | State createState() => LoginPageState(); 12 | } 13 | class LoginPageState extends State { 14 | TextEditingController emailController = TextEditingController(), passwordController = TextEditingController(); 15 | bool loggingIn = false; 16 | @override 17 | Widget build(BuildContext context) { 18 | var sessionState = context.read(); 19 | return Scaffold( 20 | appBar: AppBar(title: const Text("Login")), 21 | body: SingleChildScrollView( 22 | child: Center( 23 | child: Card( 24 | elevation: 20.0, 25 | margin: const EdgeInsets.all(15.0), 26 | child: Padding( 27 | padding: const EdgeInsets.all(15.0), 28 | child: Column( 29 | mainAxisSize: MainAxisSize.min, 30 | children: [ 31 | Padding( 32 | padding: const EdgeInsets.all(8.0), 33 | child: TextField( 34 | controller: emailController, 35 | decoration: const InputDecoration(icon: Icon(Icons.email_outlined), labelText: "Email"), 36 | 37 | ), 38 | ), 39 | Padding( 40 | padding: const EdgeInsets.all(8.0), 41 | child: TextField( 42 | controller: passwordController, 43 | decoration: const InputDecoration(icon: Icon(Icons.password), labelText: "Password"), 44 | obscureText: true, 45 | ), 46 | ), 47 | if(!loggingIn) 48 | ElevatedButton( 49 | onPressed: () { 50 | 51 | setState(() { 52 | loggingIn = true; 53 | }); 54 | TabNewsClient.login(LoginRequest(email: emailController.value.text, password: passwordController.value.text)).then((session) { 55 | TabNewsClient.saveSession(session); 56 | sessionState.setSession(session); 57 | setState(() { 58 | loggingIn = false; 59 | }); 60 | Navigator.pop(context); 61 | }); 62 | 63 | }, 64 | child: const Padding( 65 | padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 20.0), 66 | child: Text("Entrar"), 67 | ), 68 | ) else const ElevatedButton( 69 | onPressed: null, 70 | child: Padding( 71 | padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 20.0), 72 | child: CircularProgressIndicator() 73 | ) 74 | ) 75 | ], 76 | ), 77 | ), 78 | ), 79 | ), 80 | ), 81 | ); 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /lib/components/account_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:tabnews_flutter/client/client.dart'; 4 | import 'package:tabnews_flutter/components/alert_box.dart'; 5 | import 'package:tabnews_flutter/components/user_builder.dart'; 6 | import 'package:tabnews_flutter/main.dart'; 7 | 8 | import 'login_page.dart'; 9 | 10 | class AccountPage extends StatefulWidget { 11 | const AccountPage({super.key}); 12 | 13 | @override 14 | AccountPageState createState() => AccountPageState(); 15 | } 16 | 17 | class AccountPageState extends State { 18 | bool? enable_notifications; 19 | TextEditingController? username; 20 | TextEditingController? email; 21 | bool saving = false; 22 | 23 | dynamic error; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | var sessionState = context.watch(); 28 | var session = sessionState.session; 29 | 30 | if (sessionState.isLoading) { 31 | return Scaffold( 32 | appBar: AppBar(title: const Text("Perfil")), 33 | body: const Center( 34 | child: CircularProgressIndicator(), 35 | ), 36 | ); 37 | } else { 38 | if (session == null) { 39 | return Center( 40 | child: Column( 41 | mainAxisSize: MainAxisSize.min, 42 | mainAxisAlignment: MainAxisAlignment.center, 43 | crossAxisAlignment: CrossAxisAlignment.center, 44 | children: [ 45 | const Text("Você não está logado!"), 46 | ElevatedButton( 47 | child: const Text("Login"), 48 | onPressed: () { 49 | Navigator.push( 50 | context, 51 | MaterialPageRoute( 52 | builder: (context) => const LoginPage())); 53 | }, 54 | ) 55 | ], 56 | ), 57 | ); 58 | } 59 | 60 | var client = TabNewsClient(session); 61 | return UserBuilder( 62 | builder: (context, user) { 63 | enable_notifications ??= user.notifications; 64 | username ??= TextEditingController(text: user.username); 65 | email ??= TextEditingController(text: user.email); 66 | return StatefulBuilder( 67 | builder: (context, setState) => SingleChildScrollView( 68 | child: SafeArea( 69 | child: Padding( 70 | padding: const EdgeInsets.all(18.0), 71 | child: Column( 72 | crossAxisAlignment: CrossAxisAlignment.start, 73 | children: [ 74 | if (error != null) AlertBox.fromError(error), 75 | Padding( 76 | padding: const EdgeInsets.symmetric( 77 | vertical: 16.0, 78 | horizontal: 0.0, 79 | ), 80 | child: Text("Nome de usuário", 81 | style: Theme.of(context).textTheme.titleMedium), 82 | ), 83 | TextField( 84 | controller: username, 85 | enabled: !saving, 86 | ), 87 | Padding( 88 | padding: const EdgeInsets.symmetric( 89 | vertical: 16.0, horizontal: 0.0), 90 | child: Text("Email", 91 | style: Theme.of(context).textTheme.titleMedium), 92 | ), 93 | TextField( 94 | enabled: !saving, 95 | controller: email, 96 | ), 97 | CheckboxListTile( 98 | value: enable_notifications, 99 | enabled: !saving, 100 | onChanged: (n) { 101 | setState(() { 102 | enable_notifications = n ?? false; 103 | }); 104 | }, 105 | title: const Text("Receber notificações por email"), 106 | controlAffinity: ListTileControlAffinity.leading, 107 | ), 108 | if (!saving) 109 | Center( 110 | child: OutlinedButton( 111 | onPressed: () { 112 | setState(() { 113 | saving = true; 114 | }); 115 | var usernameChanged = 116 | user.username != username!.value.text; 117 | var emailChanged = 118 | user.email != email!.value.text; 119 | client 120 | .editProfile( 121 | username: usernameChanged 122 | ? username?.value.text 123 | : null, 124 | email: emailChanged ? email?.value.text : null, 125 | notifications: enable_notifications, 126 | ) 127 | .then((a) { 128 | setState(() { 129 | error = null; 130 | saving = false; 131 | sessionState.fetchUser(); 132 | }); 133 | }).catchError((e) { 134 | setState(() { 135 | error = e; 136 | saving = false; 137 | }); 138 | }); 139 | }, 140 | child: const Text("Salvar"), 141 | ), 142 | ), 143 | if (saving) 144 | const Center( 145 | child: CircularProgressIndicator(), 146 | ), 147 | ], 148 | ), 149 | ), 150 | ), 151 | ), 152 | ); 153 | }, 154 | ); 155 | } 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import "package:flutter_session_manager/flutter_session_manager.dart"; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:tabnews_flutter/client/entities/auth.dart'; 6 | import 'package:tabnews_flutter/client/entities/content.dart'; 7 | import 'package:tabnews_flutter/client/entities/user.dart'; 8 | import 'package:tabnews_flutter/components/content/list.dart'; 9 | import "package:timeago/timeago.dart" as timeago; 10 | 11 | import 'client/client.dart'; 12 | import 'components/account_page.dart'; 13 | 14 | void main() { 15 | timeago.setLocaleMessages("pt", timeago.PtBrMessages()); 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | // This widget is the root of your application. 23 | @override 24 | Widget build(BuildContext context) { 25 | return ChangeNotifierProvider( 26 | create: (_) { 27 | var session = SessionState(); 28 | session.loadSession(); 29 | return session; 30 | }, 31 | child: MaterialApp( 32 | title: 'TabNews', 33 | theme: ThemeData( 34 | brightness: Brightness.light, 35 | primarySwatch: Colors.blue, 36 | inputDecorationTheme: const InputDecorationTheme( 37 | border: OutlineInputBorder(), 38 | contentPadding: 39 | EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0), 40 | ), 41 | textTheme: GoogleFonts.ubuntuTextTheme(), 42 | ), 43 | darkTheme: ThemeData( 44 | brightness: Brightness.dark, 45 | inputDecorationTheme: const InputDecorationTheme( 46 | border: OutlineInputBorder( 47 | borderRadius: BorderRadius.all(Radius.circular(15))), 48 | contentPadding: 49 | EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0), 50 | ), 51 | textTheme: GoogleFonts.ubuntuTextTheme(ThemeData.dark().textTheme)), 52 | themeMode: ThemeMode.system, 53 | home: const HomePage(title: 'TabNews'), 54 | ), 55 | ); 56 | } 57 | } 58 | 59 | class HomePage extends StatefulWidget { 60 | final String title; 61 | 62 | const HomePage({super.key, required this.title}); 63 | 64 | @override 65 | HomePageState createState() => HomePageState(); 66 | } 67 | 68 | class SessionState extends ChangeNotifier { 69 | Session? session; 70 | late bool isLoading; 71 | User user = User.createAnonymous(); 72 | 73 | bool canUpdatePost(Content content) { 74 | return session != null && 75 | (user.id == content.owner_id || 76 | user.features.contains("update:content:others")); 77 | } 78 | 79 | SessionState() { 80 | isLoading = true; 81 | session = null; 82 | } 83 | 84 | Future loadSession() async { 85 | SessionManager sessionManager = SessionManager(); 86 | var sessionJson = await sessionManager.get("session"); 87 | isLoading = false; 88 | if (sessionJson == null) { 89 | session = null; 90 | } else { 91 | session = Session.fromJson(sessionJson); 92 | user = await TabNewsClient(session!).getUser(); 93 | } 94 | notifyListeners(); 95 | } 96 | 97 | Future fetchUser() async { 98 | user = await TabNewsClient(session!).getUser(); 99 | notifyListeners(); 100 | return user; 101 | } 102 | 103 | void setSession(Session session) { 104 | isLoading = false; 105 | this.session = session; 106 | notifyListeners(); 107 | } 108 | } 109 | 110 | class HomePageState extends State { 111 | final pageViewController = PageController(); 112 | 113 | @override 114 | void dispose() { 115 | super.dispose(); 116 | pageViewController.dispose(); 117 | } 118 | 119 | @override 120 | Widget build(BuildContext context) { 121 | // Get User from session state 122 | var sessionState = context.watch(); 123 | if (sessionState.isLoading) { 124 | return const Scaffold( 125 | body: Center( 126 | child: CircularProgressIndicator(), 127 | ), 128 | ); 129 | } 130 | return Scaffold( 131 | appBar: AppBar( 132 | title: Text(widget.title), 133 | actions: [ 134 | if (sessionState.session != null) ...[ 135 | Row( 136 | crossAxisAlignment: CrossAxisAlignment.center, 137 | children: [ 138 | Text( 139 | sessionState.user.tabcoins.toString(), 140 | style: Theme.of(context).textTheme.headline6, 141 | ), 142 | const Padding( 143 | padding: EdgeInsets.all(8.0), 144 | child: 145 | Icon(Icons.square_rounded, color: Colors.blue, size: 16), 146 | ) 147 | ], 148 | ), 149 | const Padding(padding: EdgeInsets.all(4.0)), 150 | Row( 151 | crossAxisAlignment: CrossAxisAlignment.center, 152 | children: [ 153 | Text( 154 | sessionState.user.tabcash.toString(), 155 | style: Theme.of(context).textTheme.headline6, 156 | ), 157 | const Padding( 158 | padding: EdgeInsets.all(8.0), 159 | child: Icon( 160 | Icons.square_rounded, 161 | color: Colors.green, 162 | size: 16, 163 | ), 164 | ) 165 | ], 166 | ), 167 | const Padding(padding: EdgeInsets.all(2.0)), 168 | ] 169 | ], 170 | ), 171 | body: PageView( 172 | physics: const NeverScrollableScrollPhysics(), 173 | controller: pageViewController, 174 | children: const [ 175 | ContentList(strategy: Strategy.relevant), 176 | ContentList(strategy: Strategy.newest), 177 | AccountPage() 178 | ], 179 | ), 180 | bottomNavigationBar: AnimatedBuilder( 181 | animation: pageViewController, 182 | builder: (context, snapshot) { 183 | return BottomNavigationBar( 184 | elevation: 8.0, 185 | currentIndex: pageViewController.page?.round() ?? 0, 186 | onTap: (index) { 187 | pageViewController.jumpToPage(index); 188 | }, 189 | items: const [ 190 | BottomNavigationBarItem( 191 | icon: Icon(Icons.star), label: "Relevantes"), 192 | BottomNavigationBarItem( 193 | icon: Icon(Icons.new_releases), label: "Recentes"), 194 | BottomNavigationBarItem( 195 | icon: Icon(Icons.account_circle), label: "Conta") 196 | ], 197 | ); 198 | }, 199 | ), 200 | ); 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /lib/client/client.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_session_manager/flutter_session_manager.dart'; 4 | import "package:http/http.dart" as http; 5 | 6 | import 'constants.dart'; 7 | import 'entities/auth.dart'; 8 | import 'entities/content.dart'; 9 | import 'entities/user.dart'; 10 | 11 | class TabNewsClient { 12 | final Session session; 13 | static final http.Client client = http.Client(); 14 | 15 | TabNewsClient(this.session); 16 | 17 | Map authHeaders() { 18 | return { 19 | "Cookie": "session_id=${session.token}", 20 | "Content-Type": "application/json" 21 | }; 22 | } 23 | 24 | static Map headers() { 25 | return { 26 | "Content-Type": "application/json", 27 | }; 28 | } 29 | 30 | Future getUser() async { 31 | var response = 32 | await client.get(Uri.parse("$baseUrl/user"), headers: authHeaders()); 33 | 34 | if (response.statusCode != 200) { 35 | return Future.error(jsonDecode(response.body)); 36 | } 37 | var json = jsonDecode(response.body); 38 | var user = User.fromJson(json); 39 | return user; 40 | } 41 | 42 | static Future> listContents( 43 | int page, int perPage, Strategy strategy) async { 44 | var response = await client.get(Uri.parse( 45 | "$baseUrl/contents?page=$page&per_page=$perPage&strategy=$strategy")); 46 | 47 | if (response.statusCode != 200) { 48 | return Future.error(jsonDecode(response.body)); 49 | } 50 | List json = jsonDecode(response.body); 51 | var contents = List.of(json.map((e) => Content.fromJson(e))); 52 | return contents; 53 | } 54 | 55 | static Future> getChildren(Content content) async { 56 | var response = await client.get(Uri.parse( 57 | "$baseUrl/contents/${content.owner_username}/${content.slug}/children")); 58 | 59 | if (response.statusCode != 200) { 60 | return Future.error(jsonDecode(response.body)); 61 | } 62 | List json = jsonDecode(response.body); 63 | return List.of(json.map((e) => Content.fromJson(e))); 64 | } 65 | 66 | static Future getContent( 67 | String author, String slug, bool fetchChildren) async { 68 | var response = 69 | await client.get(Uri.parse("$baseUrl/contents/$author/$slug")); 70 | 71 | if (response.statusCode != 200) { 72 | return Future.error(jsonDecode(response.body)); 73 | } 74 | var json = jsonDecode(response.body); 75 | var content = Content.fromJson(json); 76 | if (fetchChildren) { 77 | content.children = await getChildren(content); 78 | } 79 | return content; 80 | } 81 | 82 | static Future saveSession(Session session) async { 83 | var sessionManager = SessionManager(); 84 | await sessionManager.set("session", session); 85 | } 86 | 87 | static Future login(LoginRequest loginRequest) async { 88 | var response = await client.post(Uri.parse("$baseUrl/sessions"), 89 | body: loginRequest.toJson()); 90 | if (response.statusCode != 201) { 91 | return Future.error(jsonDecode(response.body)); 92 | } 93 | var json = jsonDecode(response.body); 94 | var session = Session.fromJson(json); 95 | return session; 96 | } 97 | 98 | static Future recoveryByUsername(String username) async { 99 | var client = http.Client(); 100 | var response = await client.post(Uri.parse("$baseUrl/recovery"), 101 | body: {"username": username}, headers: headers()); 102 | if (response.statusCode != 201) { 103 | return Future.error(jsonDecode(response.body)); 104 | } 105 | } 106 | 107 | static Future recoveryByEmail(String email) async { 108 | var response = await client.post(Uri.parse("$baseUrl/recovery"), 109 | body: {"email": email}, headers: headers()); 110 | if (response.statusCode != 201) { 111 | return Future.error(jsonDecode(response.body)); 112 | } 113 | } 114 | 115 | Future editProfile( 116 | {String? username, String? email, bool? notifications}) async { 117 | var user = await getUser(); 118 | Map settings = {}; 119 | if (notifications != null) { 120 | settings["notifications"] = notifications; 121 | } 122 | if (username != null) { 123 | settings["username"] = username; 124 | } 125 | if (email != null) { 126 | settings["email"] = email; 127 | } 128 | var a = jsonEncode(settings); 129 | var response = await client.patch( 130 | Uri.parse("$baseUrl/users/${user.username}"), 131 | headers: authHeaders(), 132 | body: a, 133 | ); 134 | if (response.statusCode != 200) { 135 | return Future.error(jsonDecode(response.body)); 136 | } 137 | } 138 | 139 | Future upvote(Content content) async { 140 | var response = await client.post( 141 | Uri.parse( 142 | "$baseUrl/contents/${content.owner_username}/${content.slug}/tabcoins", 143 | ), 144 | headers: authHeaders(), 145 | body: jsonEncode({"transaction_type": "credit"}), 146 | ); 147 | 148 | if (response.statusCode != 201) { 149 | return Future.error(jsonDecode(response.body)); 150 | } 151 | } 152 | 153 | Future downvote(Content content) async { 154 | var response = await client.post( 155 | Uri.parse( 156 | "$baseUrl/contents/${content.owner_username}/${content.slug}/tabcoins", 157 | ), 158 | headers: authHeaders(), 159 | body: jsonEncode({"transaction_type": "debit"}), 160 | ); 161 | 162 | if (response.statusCode != 201) { 163 | return Future.error(jsonDecode(response.body)); 164 | } 165 | } 166 | 167 | Future editContent({ 168 | String? body, 169 | String status = "published", 170 | String? title, 171 | required Content contentToEdit, 172 | }) async { 173 | Map req = { 174 | "status": status, 175 | }; 176 | if (body != null) { 177 | req["body"] = body; 178 | } 179 | if (title != null) { 180 | req["title"] = title; 181 | } 182 | var response = await client.patch( 183 | Uri.parse( 184 | "$baseUrl/contents/${contentToEdit.owner_username}/${contentToEdit.slug}", 185 | ), 186 | headers: authHeaders(), 187 | body: jsonEncode(req), 188 | ); 189 | if (response.statusCode != 200) { 190 | return Future.error(jsonDecode(response.body)); 191 | } 192 | var json = jsonDecode(response.body); 193 | var content = Content.fromJson(json); 194 | return content; 195 | } 196 | 197 | Future deleteContent(Content content) async { 198 | var response = await client.patch( 199 | Uri.parse( 200 | "$baseUrl/contents/${content.owner_username}/${content.slug}", 201 | ), 202 | headers: authHeaders(), 203 | body: jsonEncode({"status": "deleted"}), 204 | ); 205 | if (response.statusCode != 200) { 206 | return Future.error(jsonDecode(response.body)); 207 | } 208 | } 209 | 210 | Future createContent({ 211 | required String body, 212 | String status = "published", 213 | String? parentId, 214 | String? title, 215 | }) async { 216 | Map req = { 217 | "body": body, 218 | "status": status, 219 | }; 220 | if (title != null) { 221 | req["title"] = title; 222 | } 223 | if (parentId != null) { 224 | req["parent_id"] = parentId; 225 | } 226 | var response = await client.post( 227 | Uri.parse( 228 | "$baseUrl/contents", 229 | ), 230 | headers: authHeaders(), 231 | body: jsonEncode(req), 232 | ); 233 | 234 | if (response.statusCode != 201) { 235 | return Future.error(jsonDecode(response.body)); 236 | } 237 | 238 | var content = Content.fromJson(jsonDecode(response.body)); 239 | return content; 240 | } 241 | } 242 | 243 | enum Strategy { 244 | relevant("relevant"), 245 | newest("new"), 246 | old("old"); 247 | 248 | final String value; 249 | 250 | const Strategy(this.value); 251 | 252 | @override 253 | String toString() { 254 | return value; 255 | } 256 | } 257 | -------------------------------------------------------------------------------- /lib/components/content/page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import "package:flutter_markdown/flutter_markdown.dart"; 5 | import 'package:provider/provider.dart'; 6 | import 'package:tabnews_flutter/client/client.dart'; 7 | import 'package:tabnews_flutter/components/content/root_content_text_editor.dart'; 8 | import 'package:tabnews_flutter/main.dart'; 9 | import "package:timeago/timeago.dart" as timeago; 10 | import 'package:confetti/confetti.dart' as confetti; 11 | import '../../client/entities/content.dart'; 12 | 13 | class ContentLoader extends StatelessWidget { 14 | final String author, slug; 15 | final Function(BuildContext, Content) builder; 16 | 17 | const ContentLoader( 18 | {super.key, 19 | required this.builder, 20 | required this.author, 21 | required this.slug}); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return FutureBuilder( 26 | future: TabNewsClient.getContent(author, slug, true), 27 | builder: (ctx, snap) { 28 | if (snap.hasData) { 29 | return builder(ctx, snap.data!); 30 | } 31 | if (snap.hasError) { 32 | return const Center( 33 | child: Text("Um erro ocorreu enquanto esse post carregava.")); 34 | } 35 | return const Center(child: CircularProgressIndicator()); 36 | }); 37 | } 38 | } 39 | 40 | class ContentPage extends StatelessWidget { 41 | final String author, slug, title; 42 | 43 | const ContentPage(this.title, this.author, this.slug, {super.key}); 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Scaffold( 48 | appBar: AppBar( 49 | title: Text(title), 50 | ), 51 | body: ContentLoader( 52 | author: author, 53 | slug: slug, 54 | builder: (context, content) { 55 | return SingleChildScrollView(child: ContentView(content: content)); 56 | }, 57 | ), 58 | ); 59 | } 60 | } 61 | 62 | class ContentView extends StatefulWidget { 63 | const ContentView({Key? key, required this.content}) : super(key: key); 64 | final Content content; 65 | 66 | @override 67 | State createState() => _ContentViewState(); 68 | } 69 | 70 | class _ContentViewState extends State { 71 | late Content content; 72 | bool deleted = false; 73 | bool voting = false; 74 | final upvoteConfettiController = 75 | confetti.ConfettiController(duration: const Duration(milliseconds: 1)); 76 | final downvoteConfettiController = 77 | confetti.ConfettiController(duration: const Duration(milliseconds: 1)); 78 | @override 79 | void initState() { 80 | super.initState(); 81 | content = widget.content; 82 | } 83 | 84 | @override 85 | void dispose() { 86 | super.dispose(); 87 | upvoteConfettiController.dispose(); 88 | } 89 | 90 | void upvoteButtonOnPress(SessionState sessionState, TabNewsClient client) { 91 | setState(() { 92 | voting = true; 93 | }); 94 | client.upvote(content).then((v) { 95 | setState(() { 96 | content.tabcoins += 1; 97 | voting = false; 98 | upvoteConfettiController.play(); 99 | }); 100 | sessionState.fetchUser(); 101 | }).catchError((e) { 102 | setState(() { 103 | voting = false; 104 | ScaffoldMessenger.of(context).showSnackBar( 105 | SnackBar( 106 | content: Text( 107 | "${e['message']} ${e['action']}", 108 | style: const TextStyle( 109 | color: Colors.white, 110 | ), 111 | ), 112 | backgroundColor: Colors.red, 113 | ), 114 | ); 115 | }); 116 | }); 117 | } 118 | 119 | void downvoteButtonOnPress(SessionState sessionState, TabNewsClient client) { 120 | setState(() { 121 | voting = true; 122 | }); 123 | content.downvote(client).then((v) { 124 | setState(() { 125 | content.tabcoins -= 1; 126 | voting = false; 127 | downvoteConfettiController.play(); 128 | }); 129 | sessionState.fetchUser(); 130 | }).catchError((e) { 131 | setState(() { 132 | voting = false; 133 | ScaffoldMessenger.of(context).showSnackBar( 134 | SnackBar( 135 | content: Text( 136 | "${e['message']} ${e['action']}", 137 | style: const TextStyle( 138 | color: Colors.white, 139 | ), 140 | ), 141 | backgroundColor: Colors.red, 142 | ), 143 | ); 144 | }); 145 | }); 146 | } 147 | 148 | @override 149 | Widget build(BuildContext context) { 150 | if (deleted) { 151 | return const SizedBox.shrink(); 152 | } 153 | var sessionState = context.watch(); 154 | var session = sessionState.session; 155 | var client = session != null ? TabNewsClient(session) : null; 156 | return Padding( 157 | padding: const EdgeInsets.only( 158 | top: 20.0, 159 | bottom: 20.0, 160 | right: 10.0, 161 | left: 10.0, 162 | ), 163 | child: Column( 164 | mainAxisAlignment: MainAxisAlignment.start, 165 | crossAxisAlignment: CrossAxisAlignment.start, 166 | mainAxisSize: MainAxisSize.min, 167 | children: [ 168 | Wrap( 169 | direction: Axis.horizontal, 170 | alignment: WrapAlignment.start, 171 | crossAxisAlignment: WrapCrossAlignment.center, 172 | children: [ 173 | UsernameBadge(author: content.owner_username), 174 | Text( 175 | timeago.format(content.created_at, locale: "pt"), 176 | style: Theme.of(context).textTheme.caption, 177 | ), 178 | Row( 179 | mainAxisAlignment: MainAxisAlignment.start, 180 | crossAxisAlignment: CrossAxisAlignment.center, 181 | mainAxisSize: MainAxisSize.min, 182 | children: [ 183 | Stack( 184 | alignment: Alignment.center, 185 | children: [ 186 | confetti.ConfettiWidget( 187 | confettiController: upvoteConfettiController, 188 | gravity: 0.2, 189 | shouldLoop: false, 190 | maxBlastForce: 20, 191 | minBlastForce: 10, 192 | numberOfParticles: 20, 193 | blastDirectionality: 194 | confetti.BlastDirectionality.explosive, 195 | blastDirection: -pi / 2, 196 | ), 197 | IconButton( 198 | icon: const Icon(Icons.arrow_drop_up_sharp), 199 | onPressed: voting || client == null 200 | ? null 201 | : () => upvoteButtonOnPress(sessionState, client), 202 | ) 203 | ], 204 | ), 205 | Text(content.tabcoins.toString(), 206 | style: TextStyle(color: Colors.blue[300], fontSize: 15)), 207 | Stack( 208 | alignment: Alignment.center, 209 | children: [ 210 | IconButton( 211 | icon: const Icon(Icons.arrow_drop_down_sharp), 212 | onPressed: voting || client == null 213 | ? null 214 | : () => downvoteButtonOnPress(sessionState, client), 215 | ), 216 | confetti.ConfettiWidget( 217 | colors: const [Color.fromARGB(255, 255, 60, 60)], 218 | confettiController: downvoteConfettiController, 219 | gravity: 0.3, 220 | shouldLoop: false, 221 | maxBlastForce: 1.1, 222 | minBlastForce: 1, 223 | numberOfParticles: 10, 224 | blastDirectionality: 225 | confetti.BlastDirectionality.directional, 226 | blastDirection: pi / 2, 227 | createParticlePath: (size) { 228 | // Draw a down arrow 229 | var path = Path(); 230 | path.addRRect(RRect.fromRectAndRadius( 231 | Rect.fromLTWH(0, 0, size.width, size.height), 232 | Radius.circular(size.width / 2))); 233 | return path; 234 | }, 235 | ) 236 | ], 237 | ), 238 | ], 239 | ), 240 | ], 241 | ), 242 | MarkdownBody(data: content.body!), 243 | Padding( 244 | padding: const EdgeInsets.only(top: 16.0), 245 | child: Row( 246 | children: [ 247 | OutlinedButton( 248 | onPressed: 249 | client != null ? () => openRespondContent(client) : null, 250 | child: const Text("Responder"), 251 | ), 252 | const Spacer(), 253 | if (sessionState.canUpdatePost(content)) ...[ 254 | IconButton( 255 | onPressed: () { 256 | openEditContent(client!); 257 | }, 258 | icon: const Icon(Icons.edit)), 259 | IconButton( 260 | onPressed: () { 261 | showDialog( 262 | context: context, 263 | builder: (context) => AlertDialog( 264 | title: const Text("Deletar"), 265 | content: const Text( 266 | "Tem certeza que deseja deletar este comentário?", 267 | ), 268 | actions: [ 269 | TextButton( 270 | onPressed: () { 271 | Navigator.of(context).pop(); 272 | }, 273 | child: const Text("Cancelar"), 274 | ), 275 | TextButton( 276 | onPressed: () { 277 | Navigator.of(context).pop(); 278 | deleteContent(client!); 279 | }, 280 | child: const Text("Deletar"), 281 | ), 282 | ], 283 | ), 284 | ); 285 | }, 286 | icon: const Icon(Icons.delete_outline), 287 | color: Colors.red, 288 | ), 289 | ] 290 | ], 291 | ), 292 | ), 293 | ...(content.children ?? []) 294 | .map((e) => ContentView(content: e)) 295 | .toList(), 296 | ], 297 | ), 298 | ); 299 | } 300 | 301 | Future onCommentFinish(TabNewsClient client, String body) async { 302 | await client 303 | .createContent( 304 | body: body, 305 | parentId: widget.content.id, 306 | ) 307 | .catchError((e) { 308 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 309 | content: Text( 310 | "${e["message"]} ${e["action"]}", 311 | style: Theme.of(context).textTheme.bodyMedium, 312 | ), 313 | backgroundColor: Colors.redAccent, 314 | )); 315 | }).then( 316 | (content) { 317 | setState(() => this.content.children!.add(content)); 318 | Navigator.of(context).pop(); 319 | }, 320 | ); 321 | } 322 | 323 | Future onContentEditFinish(TabNewsClient client, 324 | {String? body, String? title}) async { 325 | var newContent = await client 326 | .editContent(title: title, body: body, contentToEdit: content) 327 | .catchError((e) { 328 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 329 | content: Text( 330 | "${e["message"]} ${e["action"]}", 331 | style: Theme.of(context).textTheme.bodyMedium, 332 | ), 333 | backgroundColor: Colors.redAccent, 334 | )); 335 | }); 336 | 337 | setState(() { 338 | content = content.copyWith( 339 | body: newContent.body, 340 | title: newContent.title, 341 | ); 342 | }); 343 | 344 | // ignore: use_build_context_synchronously 345 | Navigator.of(context).pop(); 346 | } 347 | 348 | openEditContent(TabNewsClient client) { 349 | if (content.isComment()) { 350 | Navigator.of(context).push( 351 | PageRouteBuilder( 352 | transitionsBuilder: (context, animation, secondaryAnimation, child) { 353 | const begin = Offset(0.0, 1.0); 354 | const end = Offset.zero; 355 | const curve = Curves.ease; 356 | var tween = 357 | Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); 358 | final offsetAnimation = animation.drive(tween); 359 | 360 | return SlideTransition( 361 | position: offsetAnimation, 362 | child: child, 363 | ); 364 | }, 365 | pageBuilder: (context, _, __) => CommentTextEditor( 366 | initialBody: content.body!, 367 | title: "Editar", 368 | onFinish: ((body) => onContentEditFinish(client, body: body))), 369 | ), 370 | ); 371 | } else { 372 | Navigator.of(context).push( 373 | PageRouteBuilder( 374 | transitionsBuilder: (context, animation, secondaryAnimation, child) { 375 | const begin = Offset(0.0, 1.0); 376 | const end = Offset.zero; 377 | const curve = Curves.ease; 378 | var tween = 379 | Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); 380 | final offsetAnimation = animation.drive(tween); 381 | 382 | return SlideTransition( 383 | position: offsetAnimation, 384 | child: child, 385 | ); 386 | }, 387 | pageBuilder: (context, _, __) => RootContentTextEditor( 388 | initialBody: content.body!, 389 | editorTitle: "Editar", 390 | initialTitle: content.title ?? "", 391 | onFinish: ((title, body) async => 392 | await onContentEditFinish(client, title: title, body: body))), 393 | ), 394 | ); 395 | } 396 | } 397 | 398 | openRespondContent(TabNewsClient client) { 399 | Navigator.of(context).push( 400 | PageRouteBuilder( 401 | transitionsBuilder: (context, animation, secondaryAnimation, child) { 402 | const begin = Offset(0.0, 1.0); 403 | const end = Offset.zero; 404 | const curve = Curves.ease; 405 | var tween = 406 | Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); 407 | final offsetAnimation = animation.drive(tween); 408 | 409 | return SlideTransition( 410 | position: offsetAnimation, 411 | child: child, 412 | ); 413 | }, 414 | pageBuilder: (context, _, __) => CommentTextEditor( 415 | onFinish: ((body) async => await onCommentFinish(client, body))), 416 | ), 417 | ); 418 | } 419 | 420 | void deleteContent(TabNewsClient client) { 421 | client.deleteContent(content).then((value) { 422 | ScaffoldMessenger.of(context).showSnackBar( 423 | const SnackBar( 424 | content: Text( 425 | "Conteúdo deletado com sucesso", 426 | ), 427 | ), 428 | ); 429 | setState(() { 430 | deleted = true; 431 | }); 432 | if (!content.isComment()) { 433 | Navigator.of(context).pop(); 434 | } 435 | }).catchError((e) { 436 | ScaffoldMessenger.of(context).showSnackBar( 437 | SnackBar( 438 | content: Text( 439 | "${e['message']} ${e['action']}", 440 | style: const TextStyle( 441 | color: Colors.white, 442 | ), 443 | ), 444 | backgroundColor: Colors.red, 445 | ), 446 | ); 447 | }); 448 | } 449 | } 450 | 451 | class CommentTextEditor extends StatefulWidget { 452 | final Future Function(String body) onFinish; 453 | final String title; 454 | final String initialBody; 455 | const CommentTextEditor({ 456 | Key? key, 457 | required this.onFinish, 458 | this.title = "Responder comentário", 459 | this.initialBody = "", 460 | }) : super(key: key); 461 | 462 | @override 463 | State createState() => _CommentTextEditorState(); 464 | } 465 | 466 | class _CommentTextEditorState extends State { 467 | late TextEditingController controller; 468 | bool sending = false; 469 | @override 470 | void initState() { 471 | super.initState(); 472 | controller = TextEditingController(text: widget.initialBody); 473 | } 474 | 475 | @override 476 | Widget build(BuildContext context) { 477 | var session = context.watch().session; 478 | var client = session != null ? TabNewsClient(session) : null; 479 | return Scaffold( 480 | appBar: AppBar(title: Text(widget.title), actions: [ 481 | IconButton( 482 | onPressed: client != null && !sending 483 | ? () { 484 | setState(() { 485 | sending = true; 486 | }); 487 | widget 488 | .onFinish(controller.value.text) 489 | .then((_) => setState(() => sending = false)) 490 | .catchError((_) => setState(() => sending = false)); 491 | } 492 | : null, 493 | icon: const Icon(Icons.check), 494 | ), 495 | ]), 496 | body: TextField( 497 | controller: controller, 498 | expands: true, 499 | maxLines: null, 500 | textAlignVertical: TextAlignVertical.top, 501 | decoration: const InputDecoration( 502 | hintText: "Escreva aqui o seu comentário (markdown)", 503 | border: InputBorder.none, 504 | ), 505 | autofocus: true, 506 | ), 507 | ); 508 | } 509 | } 510 | 511 | class UsernameBadge extends StatelessWidget { 512 | const UsernameBadge({ 513 | super.key, 514 | required this.author, 515 | }); 516 | 517 | final String author; 518 | 519 | @override 520 | Widget build(BuildContext context) { 521 | return Card( 522 | color: Colors.blue[200], 523 | child: Padding( 524 | padding: const EdgeInsets.all(5.0), 525 | child: Text( 526 | author, 527 | style: TextStyle( 528 | color: Colors.blue[800], 529 | fontFamily: "monospace", 530 | fontSize: 12.0, 531 | ), 532 | ), 533 | ), 534 | ); 535 | } 536 | } 537 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1300; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = ( 294 | "$(inherited)", 295 | "@executable_path/Frameworks", 296 | ); 297 | PRODUCT_BUNDLE_IDENTIFIER = com.tabnews.tabnewsFlutter; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 300 | SWIFT_VERSION = 5.0; 301 | VERSIONING_SYSTEM = "apple-generic"; 302 | }; 303 | name = Profile; 304 | }; 305 | 97C147031CF9000F007C117D /* Debug */ = { 306 | isa = XCBuildConfiguration; 307 | buildSettings = { 308 | ALWAYS_SEARCH_USER_PATHS = NO; 309 | CLANG_ANALYZER_NONNULL = YES; 310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 311 | CLANG_CXX_LIBRARY = "libc++"; 312 | CLANG_ENABLE_MODULES = YES; 313 | CLANG_ENABLE_OBJC_ARC = YES; 314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 315 | CLANG_WARN_BOOL_CONVERSION = YES; 316 | CLANG_WARN_COMMA = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INFINITE_RECURSION = YES; 323 | CLANG_WARN_INT_CONVERSION = YES; 324 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 325 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 326 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 327 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 328 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 329 | CLANG_WARN_STRICT_PROTOTYPES = YES; 330 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 331 | CLANG_WARN_UNREACHABLE_CODE = YES; 332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 334 | COPY_PHASE_STRIP = NO; 335 | DEBUG_INFORMATION_FORMAT = dwarf; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | ENABLE_TESTABILITY = YES; 338 | GCC_C_LANGUAGE_STANDARD = gnu99; 339 | GCC_DYNAMIC_NO_PIC = NO; 340 | GCC_NO_COMMON_BLOCKS = YES; 341 | GCC_OPTIMIZATION_LEVEL = 0; 342 | GCC_PREPROCESSOR_DEFINITIONS = ( 343 | "DEBUG=1", 344 | "$(inherited)", 345 | ); 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 353 | MTL_ENABLE_DEBUG_INFO = YES; 354 | ONLY_ACTIVE_ARCH = YES; 355 | SDKROOT = iphoneos; 356 | TARGETED_DEVICE_FAMILY = "1,2"; 357 | }; 358 | name = Debug; 359 | }; 360 | 97C147041CF9000F007C117D /* Release */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | ALWAYS_SEARCH_USER_PATHS = NO; 364 | CLANG_ANALYZER_NONNULL = YES; 365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 366 | CLANG_CXX_LIBRARY = "libc++"; 367 | CLANG_ENABLE_MODULES = YES; 368 | CLANG_ENABLE_OBJC_ARC = YES; 369 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 370 | CLANG_WARN_BOOL_CONVERSION = YES; 371 | CLANG_WARN_COMMA = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_EMPTY_BODY = YES; 376 | CLANG_WARN_ENUM_CONVERSION = YES; 377 | CLANG_WARN_INFINITE_RECURSION = YES; 378 | CLANG_WARN_INT_CONVERSION = YES; 379 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 380 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 381 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 383 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 384 | CLANG_WARN_STRICT_PROTOTYPES = YES; 385 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 386 | CLANG_WARN_UNREACHABLE_CODE = YES; 387 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 388 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 389 | COPY_PHASE_STRIP = NO; 390 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 391 | ENABLE_NS_ASSERTIONS = NO; 392 | ENABLE_STRICT_OBJC_MSGSEND = YES; 393 | GCC_C_LANGUAGE_STANDARD = gnu99; 394 | GCC_NO_COMMON_BLOCKS = YES; 395 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 396 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 397 | GCC_WARN_UNDECLARED_SELECTOR = YES; 398 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 399 | GCC_WARN_UNUSED_FUNCTION = YES; 400 | GCC_WARN_UNUSED_VARIABLE = YES; 401 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 402 | MTL_ENABLE_DEBUG_INFO = NO; 403 | SDKROOT = iphoneos; 404 | SUPPORTED_PLATFORMS = iphoneos; 405 | SWIFT_COMPILATION_MODE = wholemodule; 406 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 407 | TARGETED_DEVICE_FAMILY = "1,2"; 408 | VALIDATE_PRODUCT = YES; 409 | }; 410 | name = Release; 411 | }; 412 | 97C147061CF9000F007C117D /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 415 | buildSettings = { 416 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 417 | CLANG_ENABLE_MODULES = YES; 418 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 419 | ENABLE_BITCODE = NO; 420 | INFOPLIST_FILE = Runner/Info.plist; 421 | LD_RUNPATH_SEARCH_PATHS = ( 422 | "$(inherited)", 423 | "@executable_path/Frameworks", 424 | ); 425 | PRODUCT_BUNDLE_IDENTIFIER = com.tabnews.tabnewsFlutter; 426 | PRODUCT_NAME = "$(TARGET_NAME)"; 427 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 428 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 429 | SWIFT_VERSION = 5.0; 430 | VERSIONING_SYSTEM = "apple-generic"; 431 | }; 432 | name = Debug; 433 | }; 434 | 97C147071CF9000F007C117D /* Release */ = { 435 | isa = XCBuildConfiguration; 436 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | CLANG_ENABLE_MODULES = YES; 440 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 441 | ENABLE_BITCODE = NO; 442 | INFOPLIST_FILE = Runner/Info.plist; 443 | LD_RUNPATH_SEARCH_PATHS = ( 444 | "$(inherited)", 445 | "@executable_path/Frameworks", 446 | ); 447 | PRODUCT_BUNDLE_IDENTIFIER = com.tabnews.tabnewsFlutter; 448 | PRODUCT_NAME = "$(TARGET_NAME)"; 449 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 450 | SWIFT_VERSION = 5.0; 451 | VERSIONING_SYSTEM = "apple-generic"; 452 | }; 453 | name = Release; 454 | }; 455 | /* End XCBuildConfiguration section */ 456 | 457 | /* Begin XCConfigurationList section */ 458 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147031CF9000F007C117D /* Debug */, 462 | 97C147041CF9000F007C117D /* Release */, 463 | 249021D3217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 469 | isa = XCConfigurationList; 470 | buildConfigurations = ( 471 | 97C147061CF9000F007C117D /* Debug */, 472 | 97C147071CF9000F007C117D /* Release */, 473 | 249021D4217E4FDB00AE95B9 /* Profile */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 481 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "50.0.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "5.2.0" 18 | archive: 19 | dependency: transitive 20 | description: 21 | name: archive 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "3.3.2" 25 | args: 26 | dependency: transitive 27 | description: 28 | name: args 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.3.1" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.9.0" 39 | boolean_selector: 40 | dependency: transitive 41 | description: 42 | name: boolean_selector 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "2.1.0" 46 | build: 47 | dependency: transitive 48 | description: 49 | name: build 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.3.1" 53 | build_config: 54 | dependency: transitive 55 | description: 56 | name: build_config 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.1" 60 | build_daemon: 61 | dependency: transitive 62 | description: 63 | name: build_daemon 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "3.1.0" 67 | build_resolvers: 68 | dependency: transitive 69 | description: 70 | name: build_resolvers 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.0" 74 | build_runner: 75 | dependency: "direct dev" 76 | description: 77 | name: build_runner 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "2.3.2" 81 | build_runner_core: 82 | dependency: transitive 83 | description: 84 | name: build_runner_core 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "7.2.7" 88 | built_collection: 89 | dependency: transitive 90 | description: 91 | name: built_collection 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "5.1.1" 95 | built_value: 96 | dependency: transitive 97 | description: 98 | name: built_value 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "8.4.2" 102 | characters: 103 | dependency: transitive 104 | description: 105 | name: characters 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.2.1" 109 | charcode: 110 | dependency: transitive 111 | description: 112 | name: charcode 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.3.1" 116 | checked_yaml: 117 | dependency: transitive 118 | description: 119 | name: checked_yaml 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "2.0.1" 123 | cli_util: 124 | dependency: transitive 125 | description: 126 | name: cli_util 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "0.3.5" 130 | clock: 131 | dependency: transitive 132 | description: 133 | name: clock 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "1.1.1" 137 | code_builder: 138 | dependency: transitive 139 | description: 140 | name: code_builder 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "4.3.0" 144 | collection: 145 | dependency: transitive 146 | description: 147 | name: collection 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "1.16.0" 151 | confetti: 152 | dependency: "direct main" 153 | description: 154 | name: confetti 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "0.6.0" 158 | convert: 159 | dependency: transitive 160 | description: 161 | name: convert 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "3.1.1" 165 | crypto: 166 | dependency: transitive 167 | description: 168 | name: crypto 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "3.0.2" 172 | dart_style: 173 | dependency: transitive 174 | description: 175 | name: dart_style 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "2.2.4" 179 | fake_async: 180 | dependency: transitive 181 | description: 182 | name: fake_async 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "1.3.1" 186 | ffi: 187 | dependency: transitive 188 | description: 189 | name: ffi 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "2.0.1" 193 | file: 194 | dependency: transitive 195 | description: 196 | name: file 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "6.1.4" 200 | fixnum: 201 | dependency: transitive 202 | description: 203 | name: fixnum 204 | url: "https://pub.dartlang.org" 205 | source: hosted 206 | version: "1.0.1" 207 | flutter: 208 | dependency: "direct main" 209 | description: flutter 210 | source: sdk 211 | version: "0.0.0" 212 | flutter_launcher_icons: 213 | dependency: "direct dev" 214 | description: 215 | name: flutter_launcher_icons 216 | url: "https://pub.dartlang.org" 217 | source: hosted 218 | version: "0.10.0" 219 | flutter_lints: 220 | dependency: "direct dev" 221 | description: 222 | name: flutter_lints 223 | url: "https://pub.dartlang.org" 224 | source: hosted 225 | version: "2.0.1" 226 | flutter_markdown: 227 | dependency: "direct main" 228 | description: 229 | name: flutter_markdown 230 | url: "https://pub.dartlang.org" 231 | source: hosted 232 | version: "0.6.10+6" 233 | flutter_session_manager: 234 | dependency: "direct main" 235 | description: 236 | name: flutter_session_manager 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "1.0.3" 240 | flutter_test: 241 | dependency: "direct dev" 242 | description: flutter 243 | source: sdk 244 | version: "0.0.0" 245 | flutter_web_plugins: 246 | dependency: transitive 247 | description: flutter 248 | source: sdk 249 | version: "0.0.0" 250 | frontend_server_client: 251 | dependency: transitive 252 | description: 253 | name: frontend_server_client 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "3.1.0" 257 | glob: 258 | dependency: transitive 259 | description: 260 | name: glob 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "2.1.0" 264 | google_fonts: 265 | dependency: "direct main" 266 | description: 267 | name: google_fonts 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "3.0.1" 271 | graphs: 272 | dependency: transitive 273 | description: 274 | name: graphs 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "2.2.0" 278 | http: 279 | dependency: "direct main" 280 | description: 281 | name: http 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "0.13.5" 285 | http_multi_server: 286 | dependency: transitive 287 | description: 288 | name: http_multi_server 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "3.2.1" 292 | http_parser: 293 | dependency: transitive 294 | description: 295 | name: http_parser 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "4.0.2" 299 | image: 300 | dependency: transitive 301 | description: 302 | name: image 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "3.2.2" 306 | infinite_scroll_pagination: 307 | dependency: "direct main" 308 | description: 309 | name: infinite_scroll_pagination 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "3.2.0" 313 | intl: 314 | dependency: transitive 315 | description: 316 | name: intl 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "0.17.0" 320 | io: 321 | dependency: transitive 322 | description: 323 | name: io 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.0.3" 327 | js: 328 | dependency: transitive 329 | description: 330 | name: js 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "0.6.4" 334 | json_annotation: 335 | dependency: "direct main" 336 | description: 337 | name: json_annotation 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "4.7.0" 341 | json_serializable: 342 | dependency: "direct main" 343 | description: 344 | name: json_serializable 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "6.5.4" 348 | lints: 349 | dependency: transitive 350 | description: 351 | name: lints 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "2.0.1" 355 | logging: 356 | dependency: transitive 357 | description: 358 | name: logging 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "1.1.0" 362 | markdown: 363 | dependency: transitive 364 | description: 365 | name: markdown 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "5.0.0" 369 | matcher: 370 | dependency: transitive 371 | description: 372 | name: matcher 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "0.12.12" 376 | material_color_utilities: 377 | dependency: transitive 378 | description: 379 | name: material_color_utilities 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "0.1.5" 383 | meta: 384 | dependency: transitive 385 | description: 386 | name: meta 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "1.8.0" 390 | mime: 391 | dependency: transitive 392 | description: 393 | name: mime 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "1.0.2" 397 | nested: 398 | dependency: transitive 399 | description: 400 | name: nested 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "1.0.0" 404 | package_config: 405 | dependency: transitive 406 | description: 407 | name: package_config 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "2.1.0" 411 | path: 412 | dependency: transitive 413 | description: 414 | name: path 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "1.8.2" 418 | path_provider: 419 | dependency: transitive 420 | description: 421 | name: path_provider 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "2.0.11" 425 | path_provider_android: 426 | dependency: transitive 427 | description: 428 | name: path_provider_android 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "2.0.22" 432 | path_provider_ios: 433 | dependency: transitive 434 | description: 435 | name: path_provider_ios 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "2.0.11" 439 | path_provider_linux: 440 | dependency: transitive 441 | description: 442 | name: path_provider_linux 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "2.1.7" 446 | path_provider_macos: 447 | dependency: transitive 448 | description: 449 | name: path_provider_macos 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "2.0.6" 453 | path_provider_platform_interface: 454 | dependency: transitive 455 | description: 456 | name: path_provider_platform_interface 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "2.0.5" 460 | path_provider_windows: 461 | dependency: transitive 462 | description: 463 | name: path_provider_windows 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "2.1.3" 467 | petitparser: 468 | dependency: transitive 469 | description: 470 | name: petitparser 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "5.1.0" 474 | platform: 475 | dependency: transitive 476 | description: 477 | name: platform 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "3.1.0" 481 | plugin_platform_interface: 482 | dependency: transitive 483 | description: 484 | name: plugin_platform_interface 485 | url: "https://pub.dartlang.org" 486 | source: hosted 487 | version: "2.1.3" 488 | pool: 489 | dependency: transitive 490 | description: 491 | name: pool 492 | url: "https://pub.dartlang.org" 493 | source: hosted 494 | version: "1.5.1" 495 | process: 496 | dependency: transitive 497 | description: 498 | name: process 499 | url: "https://pub.dartlang.org" 500 | source: hosted 501 | version: "4.2.4" 502 | provider: 503 | dependency: "direct main" 504 | description: 505 | name: provider 506 | url: "https://pub.dartlang.org" 507 | source: hosted 508 | version: "6.0.4" 509 | pub_semver: 510 | dependency: transitive 511 | description: 512 | name: pub_semver 513 | url: "https://pub.dartlang.org" 514 | source: hosted 515 | version: "2.1.2" 516 | pubspec_parse: 517 | dependency: transitive 518 | description: 519 | name: pubspec_parse 520 | url: "https://pub.dartlang.org" 521 | source: hosted 522 | version: "1.2.1" 523 | shared_preferences: 524 | dependency: transitive 525 | description: 526 | name: shared_preferences 527 | url: "https://pub.dartlang.org" 528 | source: hosted 529 | version: "2.0.15" 530 | shared_preferences_android: 531 | dependency: transitive 532 | description: 533 | name: shared_preferences_android 534 | url: "https://pub.dartlang.org" 535 | source: hosted 536 | version: "2.0.14" 537 | shared_preferences_ios: 538 | dependency: transitive 539 | description: 540 | name: shared_preferences_ios 541 | url: "https://pub.dartlang.org" 542 | source: hosted 543 | version: "2.1.1" 544 | shared_preferences_linux: 545 | dependency: transitive 546 | description: 547 | name: shared_preferences_linux 548 | url: "https://pub.dartlang.org" 549 | source: hosted 550 | version: "2.1.1" 551 | shared_preferences_macos: 552 | dependency: transitive 553 | description: 554 | name: shared_preferences_macos 555 | url: "https://pub.dartlang.org" 556 | source: hosted 557 | version: "2.0.4" 558 | shared_preferences_platform_interface: 559 | dependency: transitive 560 | description: 561 | name: shared_preferences_platform_interface 562 | url: "https://pub.dartlang.org" 563 | source: hosted 564 | version: "2.1.0" 565 | shared_preferences_web: 566 | dependency: transitive 567 | description: 568 | name: shared_preferences_web 569 | url: "https://pub.dartlang.org" 570 | source: hosted 571 | version: "2.0.4" 572 | shared_preferences_windows: 573 | dependency: transitive 574 | description: 575 | name: shared_preferences_windows 576 | url: "https://pub.dartlang.org" 577 | source: hosted 578 | version: "2.1.1" 579 | shelf: 580 | dependency: transitive 581 | description: 582 | name: shelf 583 | url: "https://pub.dartlang.org" 584 | source: hosted 585 | version: "1.4.0" 586 | shelf_web_socket: 587 | dependency: transitive 588 | description: 589 | name: shelf_web_socket 590 | url: "https://pub.dartlang.org" 591 | source: hosted 592 | version: "1.0.2" 593 | sky_engine: 594 | dependency: transitive 595 | description: flutter 596 | source: sdk 597 | version: "0.0.99" 598 | sliver_tools: 599 | dependency: transitive 600 | description: 601 | name: sliver_tools 602 | url: "https://pub.dartlang.org" 603 | source: hosted 604 | version: "0.2.8" 605 | source_gen: 606 | dependency: transitive 607 | description: 608 | name: source_gen 609 | url: "https://pub.dartlang.org" 610 | source: hosted 611 | version: "1.2.6" 612 | source_helper: 613 | dependency: transitive 614 | description: 615 | name: source_helper 616 | url: "https://pub.dartlang.org" 617 | source: hosted 618 | version: "1.3.3" 619 | source_span: 620 | dependency: transitive 621 | description: 622 | name: source_span 623 | url: "https://pub.dartlang.org" 624 | source: hosted 625 | version: "1.9.0" 626 | stack_trace: 627 | dependency: transitive 628 | description: 629 | name: stack_trace 630 | url: "https://pub.dartlang.org" 631 | source: hosted 632 | version: "1.10.0" 633 | stream_channel: 634 | dependency: transitive 635 | description: 636 | name: stream_channel 637 | url: "https://pub.dartlang.org" 638 | source: hosted 639 | version: "2.1.0" 640 | stream_transform: 641 | dependency: transitive 642 | description: 643 | name: stream_transform 644 | url: "https://pub.dartlang.org" 645 | source: hosted 646 | version: "2.0.1" 647 | string_scanner: 648 | dependency: transitive 649 | description: 650 | name: string_scanner 651 | url: "https://pub.dartlang.org" 652 | source: hosted 653 | version: "1.1.1" 654 | term_glyph: 655 | dependency: transitive 656 | description: 657 | name: term_glyph 658 | url: "https://pub.dartlang.org" 659 | source: hosted 660 | version: "1.2.1" 661 | test_api: 662 | dependency: transitive 663 | description: 664 | name: test_api 665 | url: "https://pub.dartlang.org" 666 | source: hosted 667 | version: "0.4.12" 668 | timeago: 669 | dependency: "direct main" 670 | description: 671 | name: timeago 672 | url: "https://pub.dartlang.org" 673 | source: hosted 674 | version: "3.3.0" 675 | timing: 676 | dependency: transitive 677 | description: 678 | name: timing 679 | url: "https://pub.dartlang.org" 680 | source: hosted 681 | version: "1.0.0" 682 | typed_data: 683 | dependency: transitive 684 | description: 685 | name: typed_data 686 | url: "https://pub.dartlang.org" 687 | source: hosted 688 | version: "1.3.1" 689 | vector_math: 690 | dependency: transitive 691 | description: 692 | name: vector_math 693 | url: "https://pub.dartlang.org" 694 | source: hosted 695 | version: "2.1.2" 696 | watcher: 697 | dependency: transitive 698 | description: 699 | name: watcher 700 | url: "https://pub.dartlang.org" 701 | source: hosted 702 | version: "1.0.2" 703 | web_socket_channel: 704 | dependency: transitive 705 | description: 706 | name: web_socket_channel 707 | url: "https://pub.dartlang.org" 708 | source: hosted 709 | version: "2.2.0" 710 | win32: 711 | dependency: transitive 712 | description: 713 | name: win32 714 | url: "https://pub.dartlang.org" 715 | source: hosted 716 | version: "3.0.1" 717 | xdg_directories: 718 | dependency: transitive 719 | description: 720 | name: xdg_directories 721 | url: "https://pub.dartlang.org" 722 | source: hosted 723 | version: "0.2.0+2" 724 | xml: 725 | dependency: transitive 726 | description: 727 | name: xml 728 | url: "https://pub.dartlang.org" 729 | source: hosted 730 | version: "6.1.0" 731 | yaml: 732 | dependency: transitive 733 | description: 734 | name: yaml 735 | url: "https://pub.dartlang.org" 736 | source: hosted 737 | version: "3.1.1" 738 | sdks: 739 | dart: ">=2.18.2 <3.0.0" 740 | flutter: ">=3.0.0" 741 | --------------------------------------------------------------------------------