├── 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 │ │ │ ├── values │ │ │ │ └── styles.xml │ │ │ └── drawable │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── jideguru │ │ │ │ └── trailers │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── 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-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.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 │ ├── Info.plist │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj └── Runner.xcworkspace │ └── contents.xcworkspacedata ├── screenshots ├── 1.jpg ├── 2.jpg └── 3.jpg ├── lib ├── podo │ ├── Response.dart │ └── Result.dart ├── util │ └── Config.dart ├── main.dart ├── database │ ├── Download.dart │ └── db_helper.dart └── ui │ ├── Details.dart │ └── Home.dart ├── .metadata ├── README.md ├── .gitignore └── pubspec.yaml /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /screenshots/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/HEAD/screenshots/1.jpg -------------------------------------------------------------------------------- /screenshots/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/HEAD/screenshots/2.jpg -------------------------------------------------------------------------------- /screenshots/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/HEAD/screenshots/3.jpg -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JideGuru/FlutterTrailers/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/JideGuru/FlutterTrailers/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/podo/Response.dart: -------------------------------------------------------------------------------- 1 | import 'package:trailers/podo/Result.dart'; 2 | 3 | class Response { 4 | int page; 5 | int total_results; 6 | int total_pages; 7 | List results; 8 | 9 | Response(this.page, this.total_results, this.total_pages, this.results); 10 | 11 | } -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.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 and should not be manually edited. 5 | 6 | version: 7 | revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/jideguru/trailers/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.jideguru.trailers; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/util/Config.dart: -------------------------------------------------------------------------------- 1 | class Config { 2 | static final String apiKey = '?api_key=18d5c33c04ee17c213d6df6e48900674'; 3 | static final String baseUrl = "http://api.themoviedb.org/3/"; 4 | static final String posterPath = "http://image.tmdb.org/t/p/w500/"; 5 | static final String backdropPath = "http://image.tmdb.org/t/p/w500/"; 6 | static final String popularUrl = baseUrl+"movie/"+"popular"; 7 | static final String topUrl = baseUrl+"movie/"+"top_rated"; 8 | static final String ytImg = "https://img.youtube.com/vi/"; 9 | } -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.0.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | // mavenCentral() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:trailers/ui/Home.dart'; 3 | 4 | void main() => runApp(MyApp()); 5 | 6 | class MyApp extends StatelessWidget { 7 | 8 | var title = "Flutter Trailers"; 9 | @override 10 | Widget build(BuildContext context) { 11 | return MaterialApp( 12 | title: "$title", 13 | debugShowCheckedModeBanner: false, 14 | home: Home( 15 | header: "$title", 16 | ), 17 | 18 | theme: ThemeData( 19 | // primarySwatch: Colors.white, 20 | primaryColor: Colors.white, 21 | accentColor: Colors.blue, 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/podo/Result.dart: -------------------------------------------------------------------------------- 1 | class Result { 2 | var vote_count; 3 | var id; 4 | bool video; 5 | var vote_average; 6 | String title; 7 | var popularity; 8 | String poster_path; 9 | String original_language; 10 | String original_title; 11 | // List genre_ids; 12 | String backdrop_path; 13 | bool adult; 14 | String overview; 15 | String release_date; 16 | 17 | Result(this.vote_count, this.id, this.video, this.vote_average, this.title, 18 | this.popularity, this.poster_path, this.original_language, 19 | this.original_title, /*this.genre_ids,*/ this.backdrop_path, this.adult, 20 | this.overview, this.release_date); 21 | 22 | } -------------------------------------------------------------------------------- /lib/database/Download.dart: -------------------------------------------------------------------------------- 1 | class Download{ 2 | 3 | int _id; 4 | String _name; 5 | String _path; 6 | 7 | 8 | Download(this._id, this._name, this._path); 9 | 10 | Download.map(dynamic obj){ 11 | this._id = obj['id']; 12 | this._name = obj['name']; 13 | this._path = obj['path']; 14 | } 15 | 16 | int get id => _id; 17 | String get name => _name; 18 | String get path => _path; 19 | 20 | 21 | 22 | Map toMap() { 23 | var map = new Map(); 24 | 25 | if (id != null) { 26 | map['id'] = _id; 27 | } 28 | map['name'] = _name; 29 | map['path'] = _path; 30 | 31 | return map; 32 | } 33 | 34 | Download.fromMap(Map map){ 35 | this._id = map['id']; 36 | this._name = map['name']; 37 | this._path = map['path']; 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FlutterTrailers [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 2 | 3 | A flutter App to download Movie Trailers. 4 | 5 | 6 | ## ScreenShots 7 | 8 | 9 | 10 | ## Requirements 11 | * Any Operating System (ie. MacOS X, Linux, Windows) 12 | * Any IDE with Flutter SDK installed (ie. IntelliJ, Android Studio, VSCode etc) 13 | * A little knowledge of Dart and Flutter 14 | * A brain to think 🤓🤓 15 | 16 | 17 | ## Usage 18 | **Very Important** 19 | 20 | [TMDB API](https://www.themoviedb.org) was used in making this app so make sure to read the [Documentation](https://www.themoviedb.org/documentation/api). 21 | 22 | 1. Fork and clone. 23 | 2. import project to your IDE. 24 | 3. Start working. 25 | 26 | 27 | ## Author(s) 28 | **Olusegun Festus Babajide** 29 | 30 | 31 | ## Contributors 32 | **404 Not Found.** 33 | 34 | Pull Requests are welcome if you fix any issues, 35 | you can also open an issue. 36 | 37 | 38 | ## Disclaimer 39 | This code is only intended for learning purposes, i am not responsible for anything you use it for. 40 | 41 | Pardon my Bad English 😔 42 | 43 | Give a ⭐️ if you like what you see. 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | trailers 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 27 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.jideguru.trailers" 37 | minSdkVersion 16 38 | targetSdkVersion 27 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | 17 | 21 | 28 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: trailers 2 | description: A Flutter application for downloading movie trailers. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | http: 19 | transparent_image: ^0.1.0 20 | dio: 2.0.0 21 | path_provider: 22 | percent_indicator: ^1.0.13 23 | sqflite: any 24 | youtube_extractor: ^1.0.2 25 | 26 | # The following adds the Cupertino Icons font to your application. 27 | # Use with the CupertinoIcons class for iOS style icons. 28 | cupertino_icons: ^0.1.2 29 | 30 | dev_dependencies: 31 | flutter_test: 32 | sdk: flutter 33 | 34 | 35 | # For information on the generic Dart part of this file, see the 36 | # following page: https://www.dartlang.org/tools/pub/pubspec 37 | 38 | # The following section is specific to Flutter. 39 | flutter: 40 | 41 | # The following line ensures that the Material Icons font is 42 | # included with your application, so that you can use the icons in 43 | # the material Icons class. 44 | uses-material-design: true 45 | 46 | # To add assets to your application, add an assets section, like this: 47 | # assets: 48 | # - images/a_dot_burr.jpeg 49 | # - images/a_dot_ham.jpeg 50 | 51 | # An image asset can refer to one or more resolution-specific "variants", see 52 | # https://flutter.io/assets-and-images/#resolution-aware. 53 | 54 | # For details regarding adding assets from package dependencies, see 55 | # https://flutter.io/assets-and-images/#from-packages 56 | 57 | # To add custom fonts to your application, add a fonts section here, 58 | # in this "flutter" section. Each entry in this list should have a 59 | # "family" key with the font family name, and a "fonts" key with a 60 | # list giving the asset and other descriptors for the font. For 61 | # example: 62 | # fonts: 63 | # - family: Schyler 64 | # fonts: 65 | # - asset: fonts/Schyler-Regular.ttf 66 | # - asset: fonts/Schyler-Italic.ttf 67 | # style: italic 68 | # - family: Trajan Pro 69 | # fonts: 70 | # - asset: fonts/TrajanPro.ttf 71 | # - asset: fonts/TrajanPro_Bold.ttf 72 | # weight: 700 73 | # 74 | # For details regarding fonts from package dependencies, 75 | # see https://flutter.io/custom-fonts/#from-packages 76 | -------------------------------------------------------------------------------- /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/database/db_helper.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:path/path.dart'; 3 | import 'package:sqflite/sqflite.dart'; 4 | import 'dart:async'; 5 | import 'package:path_provider/path_provider.dart'; 6 | import 'package:trailers/database/Download.dart'; 7 | 8 | class DBHelper{ 9 | 10 | final String tableName = "userTable"; 11 | final String columnId = "id"; 12 | final String columnName = "name"; 13 | final String columnPath = "path"; 14 | 15 | 16 | static final DBHelper _instance = new DBHelper.internal(); 17 | factory DBHelper() => _instance; 18 | 19 | static Database _db; 20 | Future get db async{ 21 | if(_db != null){ 22 | 23 | return _db; 24 | } 25 | _db = await initDb(); 26 | 27 | return _db; 28 | } 29 | 30 | DBHelper.internal(); 31 | 32 | initDb() async{ 33 | 34 | Directory documentDirectory = await getApplicationDocumentsDirectory(); 35 | String path = join(documentDirectory.path, "maindb.db"); 36 | 37 | var ourDb = await openDatabase(path, version: 1, onCreate: _onCreate,); 38 | return ourDb; 39 | } 40 | 41 | 42 | 43 | 44 | void _onCreate(Database db, int newVersion) async{ 45 | await db.execute( 46 | "CREATE TABLE IF NOT EXISTS $tableName(" 47 | "$columnId INTEGER PRIMARY KEY , " 48 | "$columnName TEXT, " 49 | "$columnPath TEXT" 50 | ")" 51 | ); 52 | } 53 | 54 | 55 | 56 | //CRUD 57 | 58 | //Insertion 59 | Future saveDownloads(Download download) async{ 60 | 61 | var dbClient = await db; 62 | int res = await dbClient.insert("$tableName", download.toMap()); 63 | return res; 64 | } 65 | 66 | //Get Downloads 67 | Future getDownloads() async{ 68 | var dbClient = await db; 69 | var res = await dbClient.rawQuery("SELECT * FROM $tableName"); 70 | return res.toList(); 71 | 72 | } 73 | 74 | // Get Count 75 | Future getCount() async{ 76 | var dbClient = await db; 77 | var res = await dbClient.rawQuery("SELECT COUNT(*) FROM $tableName"); 78 | return Sqflite.firstIntValue(res); 79 | 80 | } 81 | 82 | // A Download 83 | Future getDownload(int id) async{ 84 | var dbClient = await db; 85 | var res = await dbClient.rawQuery("SELECT * FROM $tableName WHERE $columnId = $id"); 86 | 87 | if(res.length == 0 || res.length > 1){ 88 | return null; 89 | } 90 | 91 | return Download.fromMap(res.first); 92 | } 93 | 94 | // //Delete a Download 95 | // Future deleteDownload(int id) async{ 96 | // var dbClient = await db; 97 | // return await dbClient.delete( 98 | // tableName, 99 | // where: "$columnId = ?", 100 | // whereArgs: [id] 101 | // ); 102 | // } 103 | 104 | 105 | // //Update a Download 106 | // Future updateDownload(Download download) async{ 107 | // var dbClient = await db; 108 | // return await dbClient.update( 109 | // tableName, 110 | // download.toMap(), 111 | // where: "$columnId = ?", 112 | // whereArgs: [download.id] 113 | // ); 114 | // } 115 | 116 | 117 | //Close the connection 118 | Future close() async{ 119 | var dbClient = await db; 120 | return dbClient.close(); 121 | } 122 | 123 | 124 | } -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /lib/ui/Details.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:trailers/database/Download.dart'; 6 | import 'package:trailers/database/db_helper.dart'; 7 | import 'package:trailers/util/Config.dart'; 8 | import 'package:http/http.dart' as http; 9 | import 'package:youtube_extractor/youtube_extractor.dart'; 10 | import 'package:dio/dio.dart'; 11 | import 'package:path_provider/path_provider.dart'; 12 | import 'package:percent_indicator/percent_indicator.dart'; 13 | 14 | class Details extends StatefulWidget { 15 | 16 | final String header; 17 | final String img; 18 | final int id; 19 | 20 | Details({Key key, this.header, this.img, this.id}) : super(key: key); 21 | 22 | @override 23 | _DetailsState createState() => _DetailsState(); 24 | } 25 | 26 | class _DetailsState extends State
{ 27 | 28 | var db = DBHelper(); 29 | var isLoading = false; 30 | Map allData; 31 | List data; 32 | Future getTrailers() async { 33 | setState(() { 34 | isLoading = true; 35 | }); 36 | String url = "${Config.baseUrl}movie/${widget.id}/videos${Config.apiKey}"; 37 | 38 | http.Response response = await http.get(url); 39 | allData = jsonDecode(response.body); 40 | // data = allData["results"]; 41 | 42 | data = allData['results']; 43 | setState(() { 44 | isLoading = false; 45 | }); 46 | debugPrint(data.toString()); 47 | } 48 | 49 | @override 50 | void initState() { 51 | super.initState(); 52 | getTrailers(); 53 | } 54 | 55 | 56 | @override 57 | Widget build(BuildContext context) { 58 | return Scaffold( 59 | 60 | //Background Color 61 | backgroundColor: Colors.white, 62 | 63 | appBar: AppBar( 64 | leading: IconButton( 65 | icon: Icon( 66 | Icons.arrow_back_ios, 67 | color: Colors.blue, 68 | ), 69 | onPressed: (){ 70 | Navigator.pop(context); 71 | }, 72 | ), 73 | title: Text( 74 | widget.header, 75 | style: TextStyle( 76 | color: Colors.blue, 77 | ), 78 | ), 79 | ), 80 | 81 | 82 | 83 | body: isLoading 84 | ? Center( 85 | child: CircularProgressIndicator( 86 | ), 87 | ) :Center( 88 | child: ListView.separated( 89 | itemCount: data == null ? 0 : data.length, 90 | padding: EdgeInsets.all(16.0), 91 | separatorBuilder: (BuildContext context, int position){ 92 | return Divider(color: Colors.blue,); 93 | }, 94 | itemBuilder: (BuildContext context, int position) { 95 | String img = "${Config.ytImg}${data[position]["key"]}/0.jpg"; 96 | String message = "Are you sure you want to download ${data[position]['name']}?"; 97 | return ListTile( 98 | title: Text( 99 | "${data[position]['name']}", 100 | // style: TextStyle( 101 | // color: Colors.blue, 102 | // ), 103 | ), 104 | 105 | subtitle: Text( 106 | "${data[position]['site']}", 107 | style: TextStyle( 108 | color: Colors.blue, 109 | ), 110 | ), 111 | 112 | leading: CircleAvatar( 113 | backgroundColor: Colors.white, 114 | child: Image.network(img), 115 | ), 116 | 117 | 118 | onTap: (){ 119 | _showAlertMessage(context, message, data[position]["key"], data[position]['name']); 120 | }, 121 | ); 122 | }, 123 | ), 124 | ), 125 | 126 | ); 127 | } 128 | 129 | //Function to Show Alert Dialog for showing download messages 130 | void _showAlertMessage(BuildContext context, String message, String key, String name){ 131 | var alert = new AlertDialog( 132 | title: Text("Download Trailer"), 133 | content: Text("$message"), 134 | actions: [ 135 | 136 | FlatButton( 137 | onPressed: (){ 138 | _download(context, key, name); 139 | Navigator.pop(context); 140 | }, 141 | child: Text("Yes"), 142 | ), 143 | FlatButton( 144 | onPressed: (){Navigator.pop(context);}, 145 | child: Text("No"), 146 | ) 147 | ], 148 | ); 149 | 150 | showDialog(context: context, builder: (context)=> alert); 151 | } 152 | 153 | Future _download(BuildContext context, String key, String name) async { 154 | var extractor = YouTubeExtractor(); 155 | Dio dio = new Dio(); 156 | var videoInfo = await extractor.getMediaStreamsAsync(key); 157 | String vidUrl = videoInfo.video.first.url; 158 | print('Video URL: $vidUrl'); 159 | 160 | // Navigator.pop(context); 161 | 162 | Directory appDocDir = await getExternalStorageDirectory(); 163 | String path = appDocDir.path+"/Downloads/$name.mp4"; 164 | var myFile = new File(path); 165 | print("file created"); 166 | // print('Path: $path'); 167 | 168 | String f = myFile.toString(); 169 | await dio.download(vidUrl,f, 170 | // Listen the download progress. 171 | onProgress: (received, total) { 172 | print((received / total * 100).toStringAsFixed(0) + "%"); 173 | String progress = (received / total * 100).toStringAsFixed(0) + "%"; 174 | Download saveDownload = Download.fromMap({ 175 | "name": "$name", 176 | "path": "$path" 177 | }); 178 | db.saveDownloads(saveDownload); 179 | _showDownloadMessage(context, progress); 180 | } 181 | ); 182 | 183 | } 184 | 185 | //Function to Show Alert Dialog for showing download progress 186 | void _showDownloadMessage(BuildContext context, String progress){ 187 | var alert = new AlertDialog( 188 | title: Text("Downloading"), 189 | content: CircularPercentIndicator( 190 | radius: 60.0, 191 | lineWidth: 5.0, 192 | percent: 1.0, 193 | center: new Text(progress), 194 | progressColor: Colors.green, 195 | ), 196 | actions: [ 197 | FlatButton( 198 | onPressed: (){Navigator.pop(context);}, 199 | child: Text("Ok"), 200 | ) 201 | ], 202 | ); 203 | 204 | showDialog(context: context, builder: (context)=> alert); 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /lib/ui/Home.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:trailers/database/db_helper.dart'; 7 | import 'package:trailers/podo/Result.dart'; 8 | import 'package:trailers/ui/Details.dart'; 9 | import 'package:trailers/util/Config.dart'; 10 | import 'package:transparent_image/transparent_image.dart'; 11 | import 'package:trailers/database/Download.dart'; 12 | 13 | 14 | 15 | class Home extends StatefulWidget { 16 | final String header; 17 | 18 | Home({Key key, this.header}) : super(key: key); 19 | @override 20 | _HomeState createState() => _HomeState(); 21 | } 22 | 23 | 24 | class _HomeState extends State { 25 | 26 | var db = DBHelper(); 27 | List _downloads; 28 | 29 | PageController _pageController; 30 | int _page = 0; 31 | 32 | 33 | //get all downloads from db 34 | void getDls() async{ 35 | _downloads = await db.getDownloads(); 36 | for(int i=0; i<_downloads.length; i++){ 37 | Download download = Download.map(_downloads[i]); 38 | print("DLS: ${download.name}"); 39 | } 40 | 41 | } 42 | 43 | 44 | // Method to get movies from the backend 45 | Future> getPopularMovies(String burl) async { 46 | 47 | var httpClient = new HttpClient(); 48 | try { 49 | // Make the call 50 | var request = await httpClient.getUrl(Uri.parse(burl+Config.apiKey)); 51 | var response = await request.close(); 52 | if (response.statusCode == HttpStatus.OK) { 53 | var jsonResponse = await response.transform(utf8.decoder).join(); 54 | // Decode the json response 55 | var data = jsonDecode(jsonResponse); 56 | // Get the result list 57 | List result = data["results"]; 58 | // Get the Movie list 59 | List popularList = createPopularMovieList(result); 60 | // Return the results. 61 | return popularList; 62 | } else { 63 | print("Failed http call."); 64 | } 65 | } catch (exception) { 66 | print(exception.toString()); 67 | } 68 | return null; 69 | } 70 | 71 | // Method to parse information from the retrieved data 72 | List createPopularMovieList(List data) { 73 | List list = new List(); 74 | for (int i = 0; i < data.length; i++) { 75 | var vote_count = data[i]["vote_count"]; 76 | var id = data[i]["id"]; 77 | bool video = data[i]["video"]; 78 | var vote_average = data[i]["vote_average"]; 79 | String title = data[i]["title"]; 80 | double popularity = data[i][" popularity"]; 81 | String poster_path = data[i]["poster_path"]; 82 | String original_language = data[i]["original_language"]; 83 | String original_title = data[i]["original_title"]; 84 | String backdrop_path = data[i]["backdrop_path"]; 85 | String overview = data[i]["overview"]; 86 | bool adult = data[i]["adult"]; 87 | String release_date = data[i]["release_date"]; 88 | 89 | Result movie = new Result( 90 | vote_count, 91 | id, 92 | video, 93 | vote_average, 94 | title, 95 | popularity, 96 | poster_path, 97 | original_language, 98 | original_title, 99 | backdrop_path, 100 | adult, 101 | overview, 102 | release_date); 103 | list.add(movie); 104 | } 105 | return list; 106 | } 107 | 108 | 109 | // create a card layout for the popular movies 110 | List createPopularMovieCardItem( 111 | List movies, BuildContext context) { 112 | // Children list for the list. 113 | List listElementWidgetList = new List(); 114 | if (movies != null) { 115 | var lengthOfList = movies.length; 116 | for (int i = 0; i < lengthOfList; i++) { 117 | Result movie = movies[i]; 118 | // Image URL 119 | var imageURL = "https://image.tmdb.org/t/p/w500" + movie.poster_path; 120 | // List item created with an image of the poster 121 | var listItem = new GridTile( 122 | footer: new GridTileBar( 123 | backgroundColor: Colors.black45, 124 | title: new Text(movie.title), 125 | ), 126 | child: new GestureDetector( 127 | onTap: () { 128 | if (movie.id > 0) { 129 | 130 | var router = new MaterialPageRoute( 131 | builder: (BuildContext context){ 132 | return Details(header: movie.title, img: imageURL, id: movie.id); 133 | } 134 | ); 135 | 136 | Navigator.of(context).push(router); 137 | } 138 | }, 139 | child: new FadeInImage.memoryNetwork( 140 | placeholder: kTransparentImage, 141 | image: imageURL, 142 | fit: BoxFit.cover, 143 | ), 144 | )); 145 | listElementWidgetList.add(listItem); 146 | } 147 | } 148 | return listElementWidgetList; 149 | } 150 | 151 | @override 152 | Widget build(BuildContext context) { 153 | return Scaffold( 154 | //Background Color 155 | backgroundColor: Colors.grey.shade100, 156 | 157 | //AppBar 158 | appBar: AppBar( 159 | title: Text( 160 | widget.header, 161 | style: TextStyle( 162 | color: Colors.blue, 163 | ), 164 | ), 165 | 166 | actions: [ 167 | IconButton( 168 | icon:Icon( 169 | Icons.info_outline, 170 | color: Colors.blue, 171 | ), 172 | onPressed: () => _showAlertInfo(context) 173 | ), 174 | 175 | IconButton( 176 | icon: Icon(Icons.search), 177 | onPressed: () => debugPrint("1PRESSED!!!"), 178 | color: Colors.blue, 179 | ) 180 | ], 181 | ), 182 | 183 | 184 | //Body 185 | body: PageView( 186 | children: [ 187 | 188 | //Home 189 | Offstage( 190 | offstage: _page != 0, 191 | child: new TickerMode( 192 | enabled: _page == 0, 193 | child: new FutureBuilder( 194 | future: getPopularMovies(Config.popularUrl), 195 | builder: 196 | (BuildContext context, AsyncSnapshot snapshot) { 197 | if (!snapshot.hasData) 198 | // Shows progress indicator until the data is load. 199 | return new Container( 200 | child: new Center( 201 | child: new CircularProgressIndicator(), 202 | ), 203 | ); 204 | // Shows the real data with the data retrieved. 205 | List movies = snapshot.data; 206 | return new CustomScrollView( 207 | primary: false, 208 | slivers: [ 209 | new SliverPadding( 210 | padding: const EdgeInsets.all(10.0), 211 | sliver: new SliverGrid.count( 212 | crossAxisSpacing: 10.0, 213 | mainAxisSpacing: 10.0, 214 | crossAxisCount: 2, 215 | children: 216 | createPopularMovieCardItem(movies, context), 217 | ), 218 | ), 219 | ], 220 | ); 221 | }), 222 | ), 223 | ), 224 | 225 | //Browse 226 | Offstage( 227 | offstage: _page != 1, 228 | child: new TickerMode( 229 | enabled: _page == 1, 230 | child: new FutureBuilder( 231 | future: getPopularMovies(Config.topUrl), 232 | builder: 233 | (BuildContext context, AsyncSnapshot snapshot) { 234 | if (!snapshot.hasData) 235 | // Shows progress indicator until the data is load. 236 | return new Container( 237 | child: new Center( 238 | child: new CircularProgressIndicator(), 239 | ), 240 | ); 241 | // Shows the real data with the data retrieved. 242 | List movies = snapshot.data; 243 | return new CustomScrollView( 244 | primary: false, 245 | slivers: [ 246 | new SliverPadding( 247 | padding: const EdgeInsets.all(10.0), 248 | sliver: new SliverGrid.count( 249 | crossAxisSpacing: 10.0, 250 | mainAxisSpacing: 10.0, 251 | crossAxisCount: 2, 252 | children: 253 | createPopularMovieCardItem(movies, context), 254 | ), 255 | ), 256 | ], 257 | ); 258 | }), 259 | ), 260 | ), 261 | 262 | 263 | //Downloads 264 | Offstage( 265 | offstage: _page != 2, 266 | child: TickerMode( 267 | enabled: _page == 2, 268 | child: Center( 269 | child: ListView.builder( 270 | itemCount: _downloads == null ? 0 : _downloads.length, 271 | itemBuilder: (_, int position){ 272 | 273 | return Card( 274 | elevation: 2.0, 275 | color: Colors.white, 276 | child: ListTile( 277 | title: Text("${Download.fromMap(_downloads[position]).name}"), 278 | leading: CircleAvatar( 279 | backgroundColor: Colors.red, 280 | child: Text("${Download.fromMap(_downloads[position]).id}"), 281 | ), 282 | ), 283 | ); 284 | }, 285 | ), 286 | ) 287 | ) 288 | ), 289 | ], 290 | controller: _pageController, 291 | onPageChanged: onPageChanged, 292 | ), 293 | 294 | //BottomNav 295 | bottomNavigationBar: BottomNavigationBar(items: [ 296 | 297 | BottomNavigationBarItem( 298 | icon: Icon( 299 | Icons.home, 300 | color: Colors.blue, 301 | ), 302 | title: Text( 303 | "Home", 304 | style: TextStyle( 305 | color: Colors.blue, 306 | ), 307 | ) 308 | ), 309 | 310 | BottomNavigationBarItem( 311 | icon: Icon( 312 | Icons.trending_up, 313 | color: Colors.blue,), 314 | title: Text( 315 | "Top Rated", 316 | style: TextStyle( 317 | color: Colors.blue, 318 | ), 319 | ) 320 | ), 321 | 322 | BottomNavigationBarItem( 323 | icon: Icon( 324 | Icons.arrow_downward, 325 | color: Colors.blue,), 326 | title: Text( 327 | "Downloads", 328 | style: TextStyle( 329 | color: Colors.blue, 330 | ), 331 | ) 332 | ), 333 | 334 | ], 335 | onTap: navigationTapped, 336 | currentIndex: _page, 337 | fixedColor: Colors.white, 338 | ), 339 | ); 340 | } 341 | 342 | 343 | void navigationTapped(int page) { 344 | _pageController.animateToPage( 345 | page, 346 | duration: Duration(milliseconds: 300), 347 | curve: Curves.easeIn, 348 | ); 349 | } 350 | 351 | @override 352 | void initState() { 353 | super.initState(); 354 | _pageController = new PageController(); 355 | getDls(); 356 | } 357 | 358 | @override 359 | void dispose() { 360 | super.dispose(); 361 | _pageController.dispose(); 362 | } 363 | 364 | void onPageChanged(int page) { 365 | setState(() { 366 | this._page = page; 367 | }); 368 | } 369 | 370 | 371 | //Function to Show Alert Dialog for showing app details 372 | void _showAlertInfo(BuildContext context){ 373 | var alert = new AlertDialog( 374 | title: Text("Info"), 375 | content: Text("Made With Flutter by JideGuru"), 376 | 377 | actions: [ 378 | 379 | FlatButton( 380 | onPressed: (){Navigator.pop(context);}, 381 | child: Text("OK"), 382 | ) 383 | ], 384 | ); 385 | 386 | showDialog(context: context, builder: (context)=> alert); 387 | } 388 | } 389 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | E9C2DFDEAE78FCDD41955FFE /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 344F207D2D23AB94E93392E8 /* Pods_Runner.framework */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXCopyFilesBuildPhase section */ 26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 27 | isa = PBXCopyFilesBuildPhase; 28 | buildActionMask = 2147483647; 29 | dstPath = ""; 30 | dstSubfolderSpec = 10; 31 | files = ( 32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 34 | ); 35 | name = "Embed Frameworks"; 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXCopyFilesBuildPhase section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 02C8B4EBEBB530B26C778F4D /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 22EFF52D49FF5271484D0FFC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 45 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 46 | 344F207D2D23AB94E93392E8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 48 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 49 | 6B5CB175F6232659ABE6A769 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 50 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 51 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 52 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 53 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 54 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 55 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 56 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 58 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 59 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 60 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 69 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 70 | E9C2DFDEAE78FCDD41955FFE /* Pods_Runner.framework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 0C4A1A4530140CA5AB6F4CD7 /* Pods */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 22EFF52D49FF5271484D0FFC /* Pods-Runner.debug.xcconfig */, 81 | 02C8B4EBEBB530B26C778F4D /* Pods-Runner.release.xcconfig */, 82 | 6B5CB175F6232659ABE6A769 /* Pods-Runner.profile.xcconfig */, 83 | ); 84 | name = Pods; 85 | path = Pods; 86 | sourceTree = ""; 87 | }; 88 | 9740EEB11CF90186004384FC /* Flutter */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 92 | 3B80C3931E831B6300D905FE /* App.framework */, 93 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 94 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 95 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 96 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 97 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 98 | ); 99 | name = Flutter; 100 | sourceTree = ""; 101 | }; 102 | 97C146E51CF9000F007C117D = { 103 | isa = PBXGroup; 104 | children = ( 105 | 9740EEB11CF90186004384FC /* Flutter */, 106 | 97C146F01CF9000F007C117D /* Runner */, 107 | 97C146EF1CF9000F007C117D /* Products */, 108 | 0C4A1A4530140CA5AB6F4CD7 /* Pods */, 109 | E9D816457A6F9C4E59D139CF /* Frameworks */, 110 | ); 111 | sourceTree = ""; 112 | }; 113 | 97C146EF1CF9000F007C117D /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 97C146EE1CF9000F007C117D /* Runner.app */, 117 | ); 118 | name = Products; 119 | sourceTree = ""; 120 | }; 121 | 97C146F01CF9000F007C117D /* Runner */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 125 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 126 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 127 | 97C147021CF9000F007C117D /* Info.plist */, 128 | 97C146F11CF9000F007C117D /* Supporting Files */, 129 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 130 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 131 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 132 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 133 | ); 134 | path = Runner; 135 | sourceTree = ""; 136 | }; 137 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | ); 141 | name = "Supporting Files"; 142 | sourceTree = ""; 143 | }; 144 | E9D816457A6F9C4E59D139CF /* Frameworks */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 344F207D2D23AB94E93392E8 /* Pods_Runner.framework */, 148 | ); 149 | name = Frameworks; 150 | sourceTree = ""; 151 | }; 152 | /* End PBXGroup section */ 153 | 154 | /* Begin PBXNativeTarget section */ 155 | 97C146ED1CF9000F007C117D /* Runner */ = { 156 | isa = PBXNativeTarget; 157 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 158 | buildPhases = ( 159 | EB3FF5615A79EDB1E6BBE5A3 /* [CP] Check Pods Manifest.lock */, 160 | 9740EEB61CF901F6004384FC /* Run Script */, 161 | 97C146EA1CF9000F007C117D /* Sources */, 162 | 97C146EB1CF9000F007C117D /* Frameworks */, 163 | 97C146EC1CF9000F007C117D /* Resources */, 164 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 165 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 166 | 8F6DB0B5E02FB713B2A0C233 /* [CP] Embed Pods Frameworks */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | ); 172 | name = Runner; 173 | productName = Runner; 174 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 175 | productType = "com.apple.product-type.application"; 176 | }; 177 | /* End PBXNativeTarget section */ 178 | 179 | /* Begin PBXProject section */ 180 | 97C146E61CF9000F007C117D /* Project object */ = { 181 | isa = PBXProject; 182 | attributes = { 183 | LastUpgradeCheck = 0910; 184 | ORGANIZATIONNAME = "The Chromium Authors"; 185 | TargetAttributes = { 186 | 97C146ED1CF9000F007C117D = { 187 | CreatedOnToolsVersion = 7.3.1; 188 | LastSwiftMigration = 0910; 189 | }; 190 | }; 191 | }; 192 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 193 | compatibilityVersion = "Xcode 3.2"; 194 | developmentRegion = English; 195 | hasScannedForEncodings = 0; 196 | knownRegions = ( 197 | en, 198 | Base, 199 | ); 200 | mainGroup = 97C146E51CF9000F007C117D; 201 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 202 | projectDirPath = ""; 203 | projectRoot = ""; 204 | targets = ( 205 | 97C146ED1CF9000F007C117D /* Runner */, 206 | ); 207 | }; 208 | /* End PBXProject section */ 209 | 210 | /* Begin PBXResourcesBuildPhase section */ 211 | 97C146EC1CF9000F007C117D /* Resources */ = { 212 | isa = PBXResourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 216 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 217 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 218 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 219 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 220 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | /* End PBXResourcesBuildPhase section */ 225 | 226 | /* Begin PBXShellScriptBuildPhase section */ 227 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 228 | isa = PBXShellScriptBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | ); 232 | inputPaths = ( 233 | ); 234 | name = "Thin Binary"; 235 | outputPaths = ( 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | shellPath = /bin/sh; 239 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 240 | }; 241 | 8F6DB0B5E02FB713B2A0C233 /* [CP] Embed Pods Frameworks */ = { 242 | isa = PBXShellScriptBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | inputFileListPaths = ( 247 | ); 248 | inputPaths = ( 249 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 250 | "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", 251 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 252 | "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework", 253 | "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", 254 | ); 255 | name = "[CP] Embed Pods Frameworks"; 256 | outputFileListPaths = ( 257 | ); 258 | outputPaths = ( 259 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", 260 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 261 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework", 262 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | shellPath = /bin/sh; 266 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 267 | showEnvVarsInLog = 0; 268 | }; 269 | 9740EEB61CF901F6004384FC /* Run Script */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputPaths = ( 275 | ); 276 | name = "Run Script"; 277 | outputPaths = ( 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | shellPath = /bin/sh; 281 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 282 | }; 283 | EB3FF5615A79EDB1E6BBE5A3 /* [CP] Check Pods Manifest.lock */ = { 284 | isa = PBXShellScriptBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | ); 288 | inputFileListPaths = ( 289 | ); 290 | inputPaths = ( 291 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 292 | "${PODS_ROOT}/Manifest.lock", 293 | ); 294 | name = "[CP] Check Pods Manifest.lock"; 295 | outputFileListPaths = ( 296 | ); 297 | outputPaths = ( 298 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | shellPath = /bin/sh; 302 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 303 | showEnvVarsInLog = 0; 304 | }; 305 | /* End PBXShellScriptBuildPhase section */ 306 | 307 | /* Begin PBXSourcesBuildPhase section */ 308 | 97C146EA1CF9000F007C117D /* Sources */ = { 309 | isa = PBXSourcesBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 313 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | /* End PBXSourcesBuildPhase section */ 318 | 319 | /* Begin PBXVariantGroup section */ 320 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 321 | isa = PBXVariantGroup; 322 | children = ( 323 | 97C146FB1CF9000F007C117D /* Base */, 324 | ); 325 | name = Main.storyboard; 326 | sourceTree = ""; 327 | }; 328 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 329 | isa = PBXVariantGroup; 330 | children = ( 331 | 97C147001CF9000F007C117D /* Base */, 332 | ); 333 | name = LaunchScreen.storyboard; 334 | sourceTree = ""; 335 | }; 336 | /* End PBXVariantGroup section */ 337 | 338 | /* Begin XCBuildConfiguration section */ 339 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 340 | isa = XCBuildConfiguration; 341 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 342 | buildSettings = { 343 | ALWAYS_SEARCH_USER_PATHS = NO; 344 | CLANG_ANALYZER_NONNULL = YES; 345 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 346 | CLANG_CXX_LIBRARY = "libc++"; 347 | CLANG_ENABLE_MODULES = YES; 348 | CLANG_ENABLE_OBJC_ARC = YES; 349 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 350 | CLANG_WARN_BOOL_CONVERSION = YES; 351 | CLANG_WARN_COMMA = YES; 352 | CLANG_WARN_CONSTANT_CONVERSION = YES; 353 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 354 | CLANG_WARN_EMPTY_BODY = YES; 355 | CLANG_WARN_ENUM_CONVERSION = YES; 356 | CLANG_WARN_INFINITE_RECURSION = YES; 357 | CLANG_WARN_INT_CONVERSION = YES; 358 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 361 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 362 | CLANG_WARN_STRICT_PROTOTYPES = YES; 363 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 364 | CLANG_WARN_UNREACHABLE_CODE = YES; 365 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 366 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 367 | COPY_PHASE_STRIP = NO; 368 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 369 | ENABLE_NS_ASSERTIONS = NO; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | GCC_C_LANGUAGE_STANDARD = gnu99; 372 | GCC_NO_COMMON_BLOCKS = YES; 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = NO; 381 | SDKROOT = iphoneos; 382 | TARGETED_DEVICE_FAMILY = "1,2"; 383 | VALIDATE_PRODUCT = YES; 384 | }; 385 | name = Profile; 386 | }; 387 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 390 | buildSettings = { 391 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 392 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 393 | DEVELOPMENT_TEAM = S8QB4VV633; 394 | ENABLE_BITCODE = NO; 395 | FRAMEWORK_SEARCH_PATHS = ( 396 | "$(inherited)", 397 | "$(PROJECT_DIR)/Flutter", 398 | ); 399 | INFOPLIST_FILE = Runner/Info.plist; 400 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 401 | LIBRARY_SEARCH_PATHS = ( 402 | "$(inherited)", 403 | "$(PROJECT_DIR)/Flutter", 404 | ); 405 | PRODUCT_BUNDLE_IDENTIFIER = com.jideguru.trailers; 406 | PRODUCT_NAME = "$(TARGET_NAME)"; 407 | SWIFT_VERSION = 4.0; 408 | VERSIONING_SYSTEM = "apple-generic"; 409 | }; 410 | name = Profile; 411 | }; 412 | 97C147031CF9000F007C117D /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 415 | buildSettings = { 416 | ALWAYS_SEARCH_USER_PATHS = NO; 417 | CLANG_ANALYZER_NONNULL = YES; 418 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 419 | CLANG_CXX_LIBRARY = "libc++"; 420 | CLANG_ENABLE_MODULES = YES; 421 | CLANG_ENABLE_OBJC_ARC = YES; 422 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 423 | CLANG_WARN_BOOL_CONVERSION = YES; 424 | CLANG_WARN_COMMA = YES; 425 | CLANG_WARN_CONSTANT_CONVERSION = YES; 426 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 427 | CLANG_WARN_EMPTY_BODY = YES; 428 | CLANG_WARN_ENUM_CONVERSION = YES; 429 | CLANG_WARN_INFINITE_RECURSION = YES; 430 | CLANG_WARN_INT_CONVERSION = YES; 431 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 432 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 433 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 434 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 435 | CLANG_WARN_STRICT_PROTOTYPES = YES; 436 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 437 | CLANG_WARN_UNREACHABLE_CODE = YES; 438 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 439 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 440 | COPY_PHASE_STRIP = NO; 441 | DEBUG_INFORMATION_FORMAT = dwarf; 442 | ENABLE_STRICT_OBJC_MSGSEND = YES; 443 | ENABLE_TESTABILITY = YES; 444 | GCC_C_LANGUAGE_STANDARD = gnu99; 445 | GCC_DYNAMIC_NO_PIC = NO; 446 | GCC_NO_COMMON_BLOCKS = YES; 447 | GCC_OPTIMIZATION_LEVEL = 0; 448 | GCC_PREPROCESSOR_DEFINITIONS = ( 449 | "DEBUG=1", 450 | "$(inherited)", 451 | ); 452 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 453 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 454 | GCC_WARN_UNDECLARED_SELECTOR = YES; 455 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 456 | GCC_WARN_UNUSED_FUNCTION = YES; 457 | GCC_WARN_UNUSED_VARIABLE = YES; 458 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 459 | MTL_ENABLE_DEBUG_INFO = YES; 460 | ONLY_ACTIVE_ARCH = YES; 461 | SDKROOT = iphoneos; 462 | TARGETED_DEVICE_FAMILY = "1,2"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147041CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ALWAYS_SEARCH_USER_PATHS = NO; 471 | CLANG_ANALYZER_NONNULL = YES; 472 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 473 | CLANG_CXX_LIBRARY = "libc++"; 474 | CLANG_ENABLE_MODULES = YES; 475 | CLANG_ENABLE_OBJC_ARC = YES; 476 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 477 | CLANG_WARN_BOOL_CONVERSION = YES; 478 | CLANG_WARN_COMMA = YES; 479 | CLANG_WARN_CONSTANT_CONVERSION = YES; 480 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 481 | CLANG_WARN_EMPTY_BODY = YES; 482 | CLANG_WARN_ENUM_CONVERSION = YES; 483 | CLANG_WARN_INFINITE_RECURSION = YES; 484 | CLANG_WARN_INT_CONVERSION = YES; 485 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 486 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 487 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 488 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 489 | CLANG_WARN_STRICT_PROTOTYPES = YES; 490 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 491 | CLANG_WARN_UNREACHABLE_CODE = YES; 492 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 493 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 494 | COPY_PHASE_STRIP = NO; 495 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 496 | ENABLE_NS_ASSERTIONS = NO; 497 | ENABLE_STRICT_OBJC_MSGSEND = YES; 498 | GCC_C_LANGUAGE_STANDARD = gnu99; 499 | GCC_NO_COMMON_BLOCKS = YES; 500 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 501 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 502 | GCC_WARN_UNDECLARED_SELECTOR = YES; 503 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 504 | GCC_WARN_UNUSED_FUNCTION = YES; 505 | GCC_WARN_UNUSED_VARIABLE = YES; 506 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 507 | MTL_ENABLE_DEBUG_INFO = NO; 508 | SDKROOT = iphoneos; 509 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 510 | TARGETED_DEVICE_FAMILY = "1,2"; 511 | VALIDATE_PRODUCT = YES; 512 | }; 513 | name = Release; 514 | }; 515 | 97C147061CF9000F007C117D /* Debug */ = { 516 | isa = XCBuildConfiguration; 517 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 518 | buildSettings = { 519 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 520 | CLANG_ENABLE_MODULES = YES; 521 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 522 | ENABLE_BITCODE = NO; 523 | FRAMEWORK_SEARCH_PATHS = ( 524 | "$(inherited)", 525 | "$(PROJECT_DIR)/Flutter", 526 | ); 527 | INFOPLIST_FILE = Runner/Info.plist; 528 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 529 | LIBRARY_SEARCH_PATHS = ( 530 | "$(inherited)", 531 | "$(PROJECT_DIR)/Flutter", 532 | ); 533 | PRODUCT_BUNDLE_IDENTIFIER = com.jideguru.trailers; 534 | PRODUCT_NAME = "$(TARGET_NAME)"; 535 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 536 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 537 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 538 | SWIFT_VERSION = 4.0; 539 | VERSIONING_SYSTEM = "apple-generic"; 540 | }; 541 | name = Debug; 542 | }; 543 | 97C147071CF9000F007C117D /* Release */ = { 544 | isa = XCBuildConfiguration; 545 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 546 | buildSettings = { 547 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 548 | CLANG_ENABLE_MODULES = YES; 549 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 550 | ENABLE_BITCODE = NO; 551 | FRAMEWORK_SEARCH_PATHS = ( 552 | "$(inherited)", 553 | "$(PROJECT_DIR)/Flutter", 554 | ); 555 | INFOPLIST_FILE = Runner/Info.plist; 556 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 557 | LIBRARY_SEARCH_PATHS = ( 558 | "$(inherited)", 559 | "$(PROJECT_DIR)/Flutter", 560 | ); 561 | PRODUCT_BUNDLE_IDENTIFIER = com.jideguru.trailers; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 564 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 565 | SWIFT_VERSION = 4.0; 566 | VERSIONING_SYSTEM = "apple-generic"; 567 | }; 568 | name = Release; 569 | }; 570 | /* End XCBuildConfiguration section */ 571 | 572 | /* Begin XCConfigurationList section */ 573 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 574 | isa = XCConfigurationList; 575 | buildConfigurations = ( 576 | 97C147031CF9000F007C117D /* Debug */, 577 | 97C147041CF9000F007C117D /* Release */, 578 | 249021D3217E4FDB00AE95B9 /* Profile */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 584 | isa = XCConfigurationList; 585 | buildConfigurations = ( 586 | 97C147061CF9000F007C117D /* Debug */, 587 | 97C147071CF9000F007C117D /* Release */, 588 | 249021D4217E4FDB00AE95B9 /* Profile */, 589 | ); 590 | defaultConfigurationIsVisible = 0; 591 | defaultConfigurationName = Release; 592 | }; 593 | /* End XCConfigurationList section */ 594 | }; 595 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 596 | } 597 | --------------------------------------------------------------------------------