├── 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-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 │ ├── 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 ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── 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 │ │ │ │ │ └── example │ │ │ │ │ └── tako │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── assets └── images │ ├── no-results.png │ ├── logo-circle.png │ ├── logo-nobackground.png │ └── screenshots │ ├── photo_1.jpg │ ├── photo_10.jpg │ ├── photo_11.jpg │ ├── photo_12.jpg │ ├── photo_13.jpg │ ├── photo_2.jpg │ ├── photo_3.jpg │ ├── photo_4.jpg │ ├── photo_5.jpg │ ├── photo_6.jpg │ ├── photo_7.jpg │ ├── photo_8.jpg │ └── photo_9.jpg ├── lib ├── provider │ ├── tabmanager.dart │ ├── navmanager.dart │ └── connectivitymanager.dart ├── services │ ├── json_serializable_converter.dart │ ├── repository.dart │ ├── json_to_type_converter.dart │ ├── model_converter.dart │ ├── anime_service.dart │ └── anime_service.chopper.dart ├── util │ ├── constant.dart │ ├── custom_rect_tween.dart │ └── hero_page_route.dart ├── screens │ ├── no_internet_screen.dart │ ├── splash_screen.dart │ ├── youtubeview_screen.dart │ ├── main_screen.dart │ ├── search_by_genre.dart │ ├── genre_categories_screen.dart │ ├── voice_actor_screen.dart │ ├── video_list_screen.dart │ ├── home_screen.dart │ ├── searched_result_screen.dart │ └── anime_detail_screen.dart ├── models │ ├── genre.dart │ ├── anime_model.dart │ └── anime_model.g.dart ├── main.dart ├── theme │ └── tako_theme.dart └── components │ └── anime_card.dart ├── .metadata ├── .gitignore ├── LICENSE ├── test └── widget_test.dart ├── analysis_options.yaml ├── README.md ├── pubspec.yaml └── 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 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/images/no-results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/no-results.png -------------------------------------------------------------------------------- /assets/images/logo-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/logo-circle.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/images/logo-nobackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/logo-nobackground.png -------------------------------------------------------------------------------- /assets/images/screenshots/photo_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_1.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_10.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_11.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_12.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_13.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_2.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_3.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_4.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_5.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_6.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_7.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_8.jpg -------------------------------------------------------------------------------- /assets/images/screenshots/photo_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/assets/images/screenshots/photo_9.jpg -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/tako/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.tako 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaungsatthe1n/Tako-AnimeTracker/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/kaungsatthe1n/Tako-AnimeTracker/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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/provider/tabmanager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TabManager extends ChangeNotifier { 4 | int _selectedIndex = 0; 5 | 6 | int get selectedIndex => _selectedIndex; 7 | 8 | void goToTab(index) { 9 | _selectedIndex = index; 10 | notifyListeners(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/provider/navmanager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | 3 | class NavManager extends ChangeNotifier{ 4 | 5 | int _selectedIndex = 0; 6 | 7 | int get selectedIndex => _selectedIndex; 8 | 9 | void goToNav(index){ 10 | _selectedIndex = index; 11 | notifyListeners(); 12 | } 13 | 14 | 15 | 16 | } -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/services/json_serializable_converter.dart: -------------------------------------------------------------------------------- 1 | import 'package:chopper/chopper.dart'; 2 | 3 | class JsonSerializableConverter extends Converter { 4 | @override 5 | Request convertRequest(Request request) { 6 | // TODO: implement convertRequest 7 | throw UnimplementedError(); 8 | } 9 | 10 | @override 11 | Response convertResponse( 12 | Response response) { 13 | // TODO: implement convertResponse 14 | throw UnimplementedError(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/services/repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:chopper/chopper.dart'; 2 | import 'package:tako/models/anime_model.dart'; 3 | 4 | abstract class Repository { 5 | Future> queryAnime(String query); 6 | Future> getCurrentSeasonList(int id); 7 | Future> getUpComingList(int id); 8 | Future> getCharacterList(int id); 9 | Future> getAnimeById(int id); 10 | Future> getPromoVideo(int id); 11 | Future> getAnimeListByGenres( 12 | int index, List genres); 13 | } 14 | -------------------------------------------------------------------------------- /lib/util/constant.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/painting.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | // ignore: non_constant_identifier_names 6 | Color HexColor(String hex) => Color(int.parse('0xFF$hex')); 7 | 8 | const Color tkDarkBlue = Color(0xFF0D1321); 9 | const Color tkDarkerBlue = Color(0xFF060B16); 10 | const Color tkDarkGreen = Color(0xFF1D4C4F); 11 | const Color tkLightGreen = Color(0xFF28B67E); 12 | 13 | const Color tkGrey = Color(0xFFD3DCDE); 14 | const Color tkwhite = Color(0xFFECE9E9); 15 | final screenWidth = ScreenUtil().screenWidth; 16 | final screenHeight = ScreenUtil().screenHeight; -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 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 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/util/custom_rect_tween.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class CustomRectTween extends RectTween { 6 | /// {@macro custom_rect_tween} 7 | CustomRectTween({ 8 | required Rect begin, 9 | required Rect end, 10 | }) : super(begin: begin, end: end); 11 | 12 | @override 13 | Rect lerp(double t) { 14 | final elasticCurveValue = Curves.easeOut.transform(t); 15 | return Rect.fromLTRB( 16 | lerpDouble(begin!.left, end!.left, elasticCurveValue)!, 17 | lerpDouble(begin!.top, end!.top, elasticCurveValue)!, 18 | lerpDouble(begin!.right, end!.right, elasticCurveValue)!, 19 | lerpDouble(begin!.bottom, end!.bottom, elasticCurveValue)!, 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /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 | 9.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 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /lib/util/hero_page_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:tako/util/constant.dart'; 4 | 5 | class HeroPageRoute extends PageRoute { 6 | HeroPageRoute({required this.builder}); 7 | 8 | final WidgetBuilder builder; 9 | 10 | @override 11 | Color? get barrierColor => tkDarkerBlue; 12 | 13 | @override 14 | bool get opaque => false; 15 | 16 | @override 17 | String? get barrierLabel => 'Hero Page Route'; 18 | 19 | @override 20 | Widget buildPage(BuildContext context, Animation animation, 21 | Animation secondaryAnimation) { 22 | return builder(context); 23 | } 24 | 25 | @override 26 | Widget buildTransitions(BuildContext context, Animation animation, 27 | Animation secondaryAnimation, Widget child) { 28 | return child; 29 | } 30 | 31 | @override 32 | bool get maintainState => true; 33 | 34 | @override 35 | Duration get transitionDuration => const Duration(milliseconds: 500); 36 | } 37 | -------------------------------------------------------------------------------- /lib/services/json_to_type_converter.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:chopper/chopper.dart'; 4 | 5 | class JsonToTypeConverter extends JsonConverter { 6 | final Map typeToJsonFactoryMap; 7 | 8 | const JsonToTypeConverter(this.typeToJsonFactoryMap); 9 | 10 | @override 11 | Response convertResponse(Response response) { 12 | final body = response.copyWith( 13 | body: fromJsonData( 14 | response.body, typeToJsonFactoryMap[InnerType] as Function), 15 | ); 16 | 17 | return body; 18 | } 19 | 20 | BodyType fromJsonData( 21 | String jsonData, Function jsonParser) { 22 | var jsonMap = json.decode(jsonData); 23 | 24 | if (jsonMap is List) { 25 | return jsonMap 26 | .map((item) => jsonParser(item as Map) as InnerType) 27 | .toList() as BodyType; 28 | } 29 | // jsonParser(jsonMap,'String'); 30 | return jsonParser(jsonMap) as BodyType; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tako", 3 | "short_name": "tako", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Kaung Satt Hein 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:tako/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/provider/connectivitymanager.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectivity/connectivity.dart'; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:flutter/services.dart'; 4 | 5 | class ConnectivityManager extends ChangeNotifier { 6 | final Connectivity _connectivity = Connectivity(); 7 | bool _isOnline = false; 8 | 9 | bool get isOnline => _isOnline; 10 | 11 | startMornitoring() async { 12 | await initConnectivity(); 13 | _connectivity.onConnectivityChanged.listen((result) { 14 | if (result == ConnectivityResult.none) { 15 | _isOnline = false; 16 | notifyListeners(); 17 | } else { 18 | _isOnline = true; 19 | notifyListeners(); 20 | } 21 | }); 22 | } 23 | 24 | Future initConnectivity() async { 25 | try { 26 | var status = await _connectivity.checkConnectivity(); 27 | if (status == ConnectivityResult.none) { 28 | _isOnline = false; 29 | notifyListeners(); 30 | } else { 31 | _isOnline = true; 32 | notifyListeners(); 33 | } 34 | } on PlatformException catch (e) { 35 | // ignore: avoid_print 36 | print(e.toString()); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/services/model_converter.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:chopper/chopper.dart'; 4 | import 'package:tako/models/anime_model.dart'; 5 | 6 | class ModelConverter implements Converter { 7 | @override 8 | Request convertRequest(Request request) { 9 | final req = applyHeader( 10 | request, 11 | contentTypeKey, 12 | jsonHeaders, 13 | override: false, 14 | ); 15 | 16 | return encodeJson(req); 17 | } 18 | 19 | @override 20 | Response convertResponse(Response response) { 21 | return decodeJson(response); 22 | } 23 | } 24 | 25 | Request encodeJson(Request request) { 26 | var contentType = request.headers[contentTypeKey]; 27 | if (contentType != null && contentType.contains(jsonHeaders)) { 28 | return request.copyWith(body: json.encode(request.body)); 29 | } 30 | return request; 31 | } 32 | 33 | Response decodeJson(Response response) { 34 | var contentType = response.headers[contentTypeKey]; 35 | var body = response.body; 36 | if (contentType != null && contentType.contains(jsonHeaders)) { 37 | body = utf8.decode(response.bodyBytes); 38 | } 39 | try { 40 | var mapData = json.decode(body); 41 | var animeQuery = APISeasonResult.fromJson(mapData); 42 | 43 | return response.copyWith(body: animeQuery as BodyType); 44 | } catch (e) { 45 | chopperLogger.shout(e); 46 | return response.copyWith(body: body); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /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 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /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 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | tako 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 | -------------------------------------------------------------------------------- /lib/screens/no_internet_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:tako/theme/tako_theme.dart'; 3 | import 'package:tako/util/constant.dart'; 4 | 5 | class NoInternetScreen extends StatelessWidget { 6 | const NoInternetScreen({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 20), 12 | alignment: Alignment.center, 13 | child: Column( 14 | mainAxisAlignment: MainAxisAlignment.center, 15 | children: [ 16 | const Icon( 17 | Icons.wifi_off_rounded, 18 | size: 80, 19 | ), 20 | const SizedBox(height: 3), 21 | Text( 22 | 'Oops !', 23 | style: TakoTheme.darkTextTheme.headline1, 24 | ), 25 | const SizedBox(height: 15), 26 | Text( 27 | 'There is no internet connection', 28 | style: TakoTheme.darkTextTheme.subtitle2, 29 | ), 30 | const SizedBox(height: 10), 31 | Text( 32 | 'Please check your internet connection', 33 | style: TakoTheme.darkTextTheme.subtitle2, 34 | ), 35 | const SizedBox(height: 15), 36 | MaterialButton( 37 | onPressed: () {}, 38 | padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 12), 39 | shape: RoundedRectangleBorder( 40 | borderRadius: BorderRadius.circular(15), 41 | ), 42 | color: tkLightGreen, 43 | child: const Text('Try Again'), 44 | ), 45 | ], 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/screens/splash_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:tako/screens/main_screen.dart'; 3 | import 'package:tako/util/constant.dart'; 4 | 5 | class SplashScreen extends StatefulWidget { 6 | const SplashScreen({Key? key}) : super(key: key); 7 | 8 | @override 9 | _SplashScreenState createState() => _SplashScreenState(); 10 | } 11 | 12 | class _SplashScreenState extends State { 13 | @override 14 | void initState() { 15 | super.initState(); 16 | navigateToMainScreen(); 17 | } 18 | 19 | @override 20 | void dispose() { 21 | super.dispose(); 22 | } 23 | 24 | navigateToMainScreen() async { 25 | await Future.delayed(const Duration(milliseconds: 1500)); 26 | Navigator.pushReplacement( 27 | context, MaterialPageRoute(builder: (context) => const MainScreen())); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Scaffold( 33 | body: Column( 34 | children: [ 35 | Container( 36 | alignment: Alignment.center, 37 | decoration: const BoxDecoration(color: tkDarkerBlue), 38 | width: screenWidth, 39 | height: screenHeight * .8, 40 | child: Image.asset( 41 | 'assets/images/logo-nobackground.png', 42 | width: screenWidth * .5, 43 | ), 44 | ), 45 | Container( 46 | width: screenWidth * .4, 47 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(15)), 48 | child: const LinearProgressIndicator( 49 | backgroundColor: Colors.grey, 50 | color: Colors.white, 51 | ), 52 | ) 53 | ], 54 | ), 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/screens/youtubeview_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | import 'package:tako/util/constant.dart'; 5 | import 'package:webview_flutter/webview_flutter.dart'; 6 | 7 | class YouTubeViewScreen extends StatefulWidget { 8 | const YouTubeViewScreen({Key? key, required this.url}) : super(key: key); 9 | final String url; 10 | 11 | @override 12 | State createState() => _YouTubeViewScreenState(); 13 | } 14 | 15 | class _YouTubeViewScreenState extends State { 16 | @override 17 | void initState() { 18 | super.initState(); 19 | SystemChrome.setPreferredOrientations([ 20 | DeviceOrientation.portraitUp, 21 | DeviceOrientation.landscapeLeft, 22 | DeviceOrientation.landscapeRight 23 | ]); 24 | } 25 | 26 | @override 27 | void dispose() { 28 | SystemChrome.setPreferredOrientations([ 29 | DeviceOrientation.portraitUp, 30 | ]); 31 | super.dispose(); 32 | } 33 | 34 | final Completer _controller = 35 | Completer(); 36 | @override 37 | Widget build(BuildContext context) { 38 | return Scaffold( 39 | appBar: AppBar( 40 | title: Text(widget.url), 41 | ), 42 | body: Builder( 43 | builder: (BuildContext context) { 44 | return SizedBox.fromSize( 45 | size: Size(screenWidth, screenHeight), 46 | child: WebView( 47 | initialUrl: widget.url, 48 | javascriptMode: JavascriptMode.unrestricted, 49 | onWebViewCreated: (WebViewController webviewctrl) { 50 | _controller.complete(webviewctrl); 51 | }, 52 | ), 53 | ); 54 | }, 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/models/genre.dart: -------------------------------------------------------------------------------- 1 | class Genre { 2 | String name; 3 | int id; 4 | bool selected = false; 5 | 6 | Genre({ 7 | required this.name, 8 | required this.id, 9 | }); 10 | } 11 | 12 | List genreList = [ 13 | Genre(id: 1, name: 'Action'), 14 | Genre(id: 2, name: 'Adventure'), 15 | Genre(id: 3, name: 'Cars'), 16 | Genre(id: 4, name: 'Comedy'), 17 | Genre(id: 5, name: 'Avante Garte'), 18 | Genre(id: 6, name: 'Demons'), 19 | Genre(id: 7, name: 'Mystery'), 20 | Genre(id: 8, name: 'Drama'), 21 | Genre(id: 9, name: 'Ecchi'), 22 | Genre(id: 10, name: 'Fantasy'), 23 | Genre(id: 11, name: 'Game'), 24 | Genre(id: 12, name: 'Hentai'), 25 | Genre(id: 13, name: 'Historical'), 26 | Genre(id: 14, name: 'Horror'), 27 | Genre(id: 15, name: 'Kids'), 28 | Genre(id: 17, name: 'Material Arts'), 29 | Genre(id: 18, name: 'Mecha'), 30 | Genre(id: 19, name: 'Music'), 31 | Genre(id: 20, name: 'Parody'), 32 | Genre(id: 21, name: 'Samurai'), 33 | Genre(id: 22, name: 'Romance'), 34 | Genre(id: 23, name: 'School'), 35 | Genre(id: 24, name: 'Sci Fi'), 36 | Genre(id: 25, name: 'Shoujo'), 37 | Genre(id: 26, name: 'Girls Love'), 38 | Genre(id: 27, name: 'Shounen'), 39 | Genre(id: 28, name: 'Boys Love'), 40 | Genre(id: 29, name: 'Space'), 41 | Genre(id: 30, name: 'Sports'), 42 | Genre(id: 31, name: 'Super Power'), 43 | Genre(id: 32, name: 'Vampire'), 44 | Genre(id: 35, name: 'Harem'), 45 | Genre(id: 36, name: 'Slice Of Life'), 46 | Genre(id: 37, name: 'Supernatural'), 47 | Genre(id: 38, name: 'Military'), 48 | Genre(id: 39, name: 'Police'), 49 | Genre(id: 40, name: 'Psychological'), 50 | Genre(id: 41, name: 'Suspense'), 51 | Genre(id: 42, name: 'Seinen'), 52 | Genre(id: 43, name: 'Josei'), 53 | Genre(id: 46, name: 'Award Winning'), 54 | Genre(id: 47, name: 'Gourmet'), 55 | Genre(id: 48, name: 'Work Life'), 56 | Genre(id: 49, name: 'Erotica'), 57 | ]; 58 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:logging/logging.dart'; 5 | import 'package:provider/provider.dart'; 6 | import './provider/connectivitymanager.dart'; 7 | import './provider/navmanager.dart'; 8 | import './provider/tabmanager.dart'; 9 | import './screens/splash_screen.dart'; 10 | import './services/anime_service.dart'; 11 | import './theme/tako_theme.dart'; 12 | 13 | void main() async { 14 | _setUpLogging(); 15 | WidgetsFlutterBinding.ensureInitialized(); 16 | await SystemChrome.setPreferredOrientations([ 17 | DeviceOrientation.portraitUp, 18 | DeviceOrientation.portraitDown, 19 | ]); 20 | runApp(const MyApp()); 21 | } 22 | 23 | void _setUpLogging() { 24 | Logger.root.level = Level.ALL; 25 | Logger.root.onRecord.listen((rec) { 26 | print('${rec.level.name}: ${rec.time}: ${rec.message}'); 27 | }); 28 | } 29 | 30 | class MyApp extends StatelessWidget { 31 | const MyApp({Key? key}) : super(key: key); 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return MultiProvider( 36 | providers: [ 37 | ChangeNotifierProvider(create: (_) => TabManager()), 38 | ChangeNotifierProvider(create: (_) => NavManager()), 39 | ChangeNotifierProvider(create: (_) => ConnectivityManager()), 40 | Provider( 41 | create: (_) => AnimeService.create(), 42 | dispose: (_, AnimeService service) => service.client.dispose(), 43 | ), 44 | ], 45 | child: ScreenUtilInit( 46 | designSize: const Size(360, 690), 47 | builder: () => MaterialApp( 48 | builder: (context, widget) { 49 | ScreenUtil.setContext(context); 50 | return MediaQuery( 51 | data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), 52 | child: widget!); 53 | }, 54 | debugShowCheckedModeBanner: false, 55 | title: 'Tako Anime Tracker', 56 | theme: TakoTheme.dark(), 57 | home: const SplashScreen(), 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /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 30 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.tako" 47 | minSdkVersion 21 48 | targetSdkVersion 30 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /lib/services/anime_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:chopper/chopper.dart'; 2 | import 'package:tako/models/anime_model.dart'; 3 | import 'package:tako/services/json_to_type_converter.dart'; 4 | import 'package:tako/services/repository.dart'; 5 | 6 | part 'anime_service.chopper.dart'; 7 | 8 | @ChopperApi(baseUrl: 'https://api.jikan.moe/v3') 9 | abstract class AnimeService extends ChopperService implements Repository { 10 | 11 | @override 12 | @Get(path: 'search/anime?') 13 | Future> queryAnime( 14 | @Query('q') String query, 15 | ); 16 | @override 17 | @Get(path: 'top/anime/{page}/airing') 18 | Future> getCurrentSeasonList(@Path('page') int id); 19 | 20 | @override 21 | @Get(path: 'top/anime/{page}/upcoming') 22 | Future> getUpComingList(@Path('page') int id); 23 | 24 | @override 25 | @Get(path: 'anime/{id}/characters_staff') 26 | Future> getCharacterList(@Path('id') int id); 27 | 28 | @override 29 | @Get(path: 'anime/{id}') 30 | Future> getAnimeById(@Path('id') int id); 31 | 32 | @override 33 | @Get(path: 'anime/{id}/videos') 34 | Future> getPromoVideo(@Path('id') int id); 35 | 36 | @override 37 | @Get(path: 'search/anime?q=&page={page}&genre={genre}&order_by=start_date&sort=desc') 38 | Future> getAnimeListByGenres( 39 | @Path('page') int index, 40 | @Path('genre') List genres, 41 | ); 42 | 43 | static AnimeService create() { 44 | final client = ChopperClient( 45 | interceptors: [HttpLoggingInterceptor()], 46 | converter: JsonToTypeConverter({ 47 | APISeasonResult: (jsonData) => APISeasonResult.fromJson(jsonData), 48 | APIAnimeQueryResult: (jsonData) => 49 | APIAnimeQueryResult.fromJson(jsonData), 50 | APICharactersResult: (jsonData) => 51 | APICharactersResult.fromJson(jsonData), 52 | Anime: (jsonData) => Anime.fromJson(jsonData), 53 | APIVideoResult: (jsonData) => APIVideoResult.fromJson(jsonData), 54 | }), 55 | errorConverter: const JsonConverter(), 56 | services: [ 57 | _$AnimeService(), 58 | ], 59 | ); 60 | return _$AnimeService(client); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /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/theme/tako_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | import 'package:tako/util/constant.dart'; 4 | 5 | class TakoTheme { 6 | static TextTheme darkTextTheme = const TextTheme( 7 | bodyText1: TextStyle( 8 | fontSize: 14.0, 9 | fontWeight: FontWeight.w700, 10 | color: Colors.white, 11 | ), 12 | subtitle1: TextStyle( 13 | fontSize: 12.0, 14 | fontWeight: FontWeight.w700, 15 | color: Colors.white, 16 | ), 17 | subtitle2: TextStyle( 18 | fontSize: 14.0, 19 | color: Colors.white, 20 | ), 21 | headline1: TextStyle( 22 | fontSize: 24.0, 23 | fontWeight: FontWeight.bold, 24 | color: Colors.white, 25 | ), 26 | headline2: TextStyle( 27 | fontSize: 17.0, 28 | fontWeight: FontWeight.w700, 29 | color: Colors.white, 30 | ), 31 | headline3: TextStyle( 32 | fontSize: 14.0, 33 | fontWeight: FontWeight.w600, 34 | color: Colors.white, 35 | decoration: TextDecoration.none, 36 | ), 37 | headline4: TextStyle( 38 | fontSize: 21.0, 39 | fontWeight: FontWeight.w700, 40 | color: Colors.white, 41 | decoration: TextDecoration.none, 42 | ), 43 | headline6: TextStyle( 44 | fontSize: 16.0, 45 | fontWeight: FontWeight.w600, 46 | color: Colors.white, 47 | ), 48 | ); 49 | 50 | static ThemeData dark() { 51 | return ThemeData( 52 | brightness: Brightness.dark, 53 | backgroundColor: Colors.black, 54 | scaffoldBackgroundColor: tkDarkerBlue, 55 | appBarTheme: const AppBarTheme( 56 | foregroundColor: Colors.white, 57 | backgroundColor: tkDarkBlue, 58 | ), 59 | progressIndicatorTheme: const ProgressIndicatorThemeData( 60 | color: Colors.white, 61 | ), 62 | floatingActionButtonTheme: const FloatingActionButtonThemeData( 63 | foregroundColor: Colors.white, 64 | backgroundColor: Colors.green, 65 | ), 66 | bottomNavigationBarTheme: const BottomNavigationBarThemeData( 67 | selectedItemColor: tkLightGreen, 68 | unselectedItemColor: tkGrey, 69 | backgroundColor: tkDarkBlue, 70 | ), 71 | checkboxTheme: CheckboxThemeData( 72 | checkColor: MaterialStateProperty.all(Colors.black), 73 | fillColor: MaterialStateProperty.all(tkLightGreen.withAlpha(205)), 74 | ), 75 | textTheme: darkTextTheme, 76 | fontFamily: GoogleFonts.poppins().fontFamily, 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 10 | 17 | 21 | 25 | 30 | 34 | 35 | 36 | 37 | 38 | 39 | 41 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /lib/screens/main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:tako/provider/connectivitymanager.dart'; 4 | import 'package:tako/provider/tabmanager.dart'; 5 | import 'package:tako/screens/genre_categories_screen.dart'; 6 | import 'package:tako/screens/no_internet_screen.dart'; 7 | import 'package:tako/screens/searched_result_screen.dart'; 8 | import 'package:tako/screens/home_screen.dart'; 9 | 10 | class MainScreen extends StatefulWidget { 11 | const MainScreen({Key? key}) : super(key: key); 12 | 13 | @override 14 | _MainScreenState createState() => _MainScreenState(); 15 | } 16 | 17 | class _MainScreenState extends State { 18 | final List _pages = [ 19 | const HomeScreen(), 20 | const GenreCategoriesScreen(), 21 | ]; 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | Provider.of(context, listen: false).startMornitoring(); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return Consumer( 32 | builder: (context, tabManager, _) => Scaffold( 33 | resizeToAvoidBottomInset: false, 34 | appBar: AppBar( 35 | actions: [ 36 | IconButton( 37 | onPressed: () { 38 | Navigator.of(context).push(MaterialPageRoute( 39 | builder: (_) => const SearchResultScreen())); 40 | }, 41 | icon: const Icon(Icons.search)), 42 | ], 43 | centerTitle: true, 44 | title: const Text( 45 | 'Tako Anime Tracker', 46 | ), 47 | ), 48 | bottomNavigationBar: BottomNavigationBar( 49 | onTap: tabManager.goToTab, 50 | currentIndex: tabManager.selectedIndex, 51 | items: const [ 52 | BottomNavigationBarItem( 53 | icon: Icon( 54 | Icons.home, 55 | ), 56 | label: 'Home', 57 | ), 58 | BottomNavigationBarItem( 59 | icon: Icon( 60 | Icons.list, 61 | ), 62 | label: 'Genres', 63 | ), 64 | ], 65 | ), 66 | body: Consumer( 67 | builder: (context, connectivityManager, child) { 68 | return connectivityManager.isOnline == true 69 | ? IndexedStack( 70 | children: _pages, 71 | index: tabManager.selectedIndex, 72 | ) 73 | : const NoInternetScreen(); 74 | }), 75 | )); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/services/anime_service.chopper.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'anime_service.dart'; 4 | 5 | // ************************************************************************** 6 | // ChopperGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: always_put_control_body_on_new_line, always_specify_types, prefer_const_declarations 10 | class _$AnimeService extends AnimeService { 11 | _$AnimeService([ChopperClient? client]) { 12 | if (client == null) return; 13 | this.client = client; 14 | } 15 | 16 | @override 17 | final definitionType = AnimeService; 18 | 19 | @override 20 | Future> queryAnime(String query) { 21 | final $url = 'https://api.jikan.moe/v3/search/anime?'; 22 | final $params = {'q': query}; 23 | final $request = Request('GET', $url, client.baseUrl, parameters: $params); 24 | return client.send($request); 25 | } 26 | 27 | @override 28 | Future> getCurrentSeasonList(int id) { 29 | final $url = 'https://api.jikan.moe/v3/top/anime/${id}/airing'; 30 | final $request = Request('GET', $url, client.baseUrl); 31 | return client.send($request); 32 | } 33 | 34 | @override 35 | Future> getUpComingList(int id) { 36 | final $url = 'https://api.jikan.moe/v3/top/anime/${id}/upcoming'; 37 | final $request = Request('GET', $url, client.baseUrl); 38 | return client.send($request); 39 | } 40 | 41 | @override 42 | Future> getCharacterList(int id) { 43 | final $url = 'https://api.jikan.moe/v3/anime/${id}/characters_staff'; 44 | final $request = Request('GET', $url, client.baseUrl); 45 | return client.send($request); 46 | } 47 | 48 | @override 49 | Future> getAnimeById(int id) { 50 | final $url = 'https://api.jikan.moe/v3/anime/${id}'; 51 | final $request = Request('GET', $url, client.baseUrl); 52 | return client.send($request); 53 | } 54 | 55 | @override 56 | Future> getPromoVideo(int id) { 57 | final $url = 'https://api.jikan.moe/v3/anime/${id}/videos'; 58 | final $request = Request('GET', $url, client.baseUrl); 59 | return client.send($request); 60 | } 61 | 62 | @override 63 | Future> getAnimeListByGenres( 64 | int index, List genres) { 65 | final $url = 66 | 'https://api.jikan.moe/v3/search/anime?q=&page=${index}&genre=${genres}&order_by=start_date&sort=desc'; 67 | final $request = Request('GET', $url, client.baseUrl); 68 | return client.send($request); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lib/components/anime_card.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:tako/screens/anime_detail_screen.dart'; 6 | import 'package:tako/theme/tako_theme.dart'; 7 | import 'package:tako/util/hero_page_route.dart'; 8 | 9 | class AnimeCard extends StatelessWidget { 10 | const AnimeCard({ 11 | Key? key, 12 | required this.id, 13 | required this.imageUrl, 14 | required this.title, 15 | required this.itemWidth, 16 | required this.itemHeight, 17 | }) : super(key: key); 18 | 19 | final String title; 20 | final String imageUrl; 21 | final int id; 22 | final double itemWidth; 23 | final int itemHeight; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Hero( 28 | tag: id, 29 | child: GestureDetector( 30 | onTap: () { 31 | Navigator.of(context).push(HeroPageRoute( 32 | builder: (context) => AnimeDetailScreen( 33 | id: id, 34 | imageUrl: imageUrl, 35 | ), 36 | )); 37 | }, 38 | child: ClipRRect( 39 | borderRadius: const BorderRadius.all(Radius.circular(20)), 40 | child: Stack( 41 | fit: StackFit.expand, 42 | children: [ 43 | CachedNetworkImage( 44 | fit: BoxFit.cover, 45 | width: itemWidth, 46 | imageUrl: imageUrl, 47 | ), 48 | Positioned( 49 | bottom: 0, 50 | left: 0, 51 | right: 0, 52 | child: ClipRRect( 53 | borderRadius: BorderRadius.zero, 54 | child: BackdropFilter( 55 | filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), 56 | child: Container( 57 | height: itemHeight * .25, 58 | alignment: Alignment.center, 59 | child: Column( 60 | mainAxisAlignment: MainAxisAlignment.center, 61 | children: [ 62 | Container( 63 | alignment: Alignment.center, 64 | margin: const EdgeInsets.symmetric(horizontal: 10), 65 | child: Text( 66 | title, 67 | style: TakoTheme.darkTextTheme.headline3, 68 | overflow: TextOverflow.fade, 69 | textAlign: TextAlign.center, 70 | maxLines: 2, 71 | ), 72 | ), 73 | ], 74 | ), 75 | decoration: const BoxDecoration( 76 | color: Colors.black54, 77 | ), 78 | ), 79 | ), 80 | ), 81 | ), 82 | ], 83 | ), 84 | ), 85 | ), 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tako Anime Tracker 2 | 3 |

4 | 5 |

A Mobile App to Track Your Favourite Anime in One Place.

6 | 7 | ## Download App 8 | 9 | - #### Android : [Tako-release.apk](https://github.com/kaungsatthe1n/Tako-AnimeTracker/releases/download/v1.0.2/Tako-AnimeTracker-v1.0.2.apk) 10 | 11 | - #### IOS : _Coming soon ..._ 12 | 13 | ## ScreenShots 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ## Clone Repository 26 | 27 | Open Your `Terminal` and `Paste` 28 | 29 | ```bash 30 | $ git clone https://github.com/kaungsatthe1n/Tako-AnimeTracker.git 31 | ``` 32 | 33 | ## Build Setup 34 | 35 | ```bash 36 | 37 | # install dependencies 38 | 39 | $ flutter pub get 40 | ``` 41 | 42 | ## Brief About App 43 | 44 | ### API That I use : 45 | 46 | [Jikan (時間) UNOFFICIAL MYANIMELIST API](https://jikan.moe/) :cloud: 47 | 48 | ### Dependencies that I use : 49 | 50 | - [cached_network_image: ^3.1.0+1](https://pub.dev/packages/cached_network_image) 51 | - [chopper: ^4.0.3](https://pub.dev/packages/chopper) 52 | - [chopper_generator: ^4.0.3](https://pub.dev/packages/chopper_generator) 53 | - [connectivity: ^3.0.6](https://pub.dev/packages/connectivity) 54 | - [font_awesome_flutter: ^9.2.0](https://pub.dev/packages/font_awesome_flutter) 55 | - [google_fonts: ^2.1.0](https://pub.dev/packages/google_fonts) 56 | - [json_annotation: ^4.3.0](https://pub.dev/packages/json_annotation) 57 | - [json_serializable: ^6.0.1](https://pub.dev/packages/json_serializable) 58 | - [logging: ^1.0.2](https://pub.dev/packages/logging) 59 | - [provider: ^6.0.1](https://pub.dev/packages/provider) 60 | - [sizer: ^2.0.15](https://pub.dev/packages/sizer) 61 | - [webview_flutter: ^2.3.1](https://pub.dev/packages/webview_flutter) 62 | - [build_runner: ^2.1.5](https://pub.dev/packages/build_runner) 63 | 64 | ## Special Thanks 65 | 66 | Thanks to Jikan (時間) API Team for Developing Awesome Open Source Anime API 67 | 68 | ## Found This Project Useful ? 69 | 70 | You can leave a star :star: at the top-right corner of this repository. -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: tako 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.2+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | build_runner: ^2.1.5 31 | cached_network_image: ^3.1.0+1 32 | chopper: ^4.0.3 33 | chopper_generator: ^4.0.3 34 | connectivity: ^3.0.6 35 | cupertino_icons: ^1.0.2 36 | flutter: 37 | sdk: flutter 38 | flutter_screenutil: ^5.1.0 39 | font_awesome_flutter: ^9.2.0 40 | google_fonts: ^2.1.0 41 | json_annotation: ^4.3.0 42 | json_serializable: ^6.0.1 43 | logging: ^1.0.2 44 | provider: ^6.0.1 45 | webview_flutter: ^2.3.1 46 | 47 | dev_dependencies: 48 | flutter_lints: ^1.0.0 49 | flutter_test: 50 | sdk: flutter 51 | 52 | # For information on the generic Dart part of this file, see the 53 | # following page: https://dart.dev/tools/pub/pubspec 54 | # The following section is specific to Flutter. 55 | flutter: 56 | # The following line ensures that the Material Icons font is 57 | # included with your application, so that you can use the icons in 58 | # the material Icons class. 59 | uses-material-design: true 60 | # To add assets to your application, add an assets section, like this: 61 | assets: 62 | - assets/images/ 63 | # - images/a_dot_ham.jpeg 64 | # An image asset can refer to one or more resolution-specific "variants", see 65 | # https://flutter.dev/assets-and-images/#resolution-aware. 66 | # For details regarding adding assets from package dependencies, see 67 | # https://flutter.dev/assets-and-images/#from-packages 68 | # To add custom fonts to your application, add a fonts section here, 69 | # in this "flutter" section. Each entry in this list should have a 70 | # "family" key with the font family name, and a "fonts" key with a 71 | # list giving the asset and other descriptors for the font. For 72 | # example: 73 | # fonts: 74 | # - family: Schyler 75 | # fonts: 76 | # - asset: fonts/Schyler-Regular.ttf 77 | # - asset: fonts/Schyler-Italic.ttf 78 | # style: italic 79 | # - family: Trajan Pro 80 | # fonts: 81 | # - asset: fonts/TrajanPro.ttf 82 | # - asset: fonts/TrajanPro_Bold.ttf 83 | # weight: 700 84 | # 85 | # For details regarding fonts from package dependencies, 86 | # see https://flutter.dev/custom-fonts/#from-packages 87 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | tako 30 | 31 | 32 | 33 | 36 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /lib/screens/search_by_genre.dart: -------------------------------------------------------------------------------- 1 | import 'package:chopper/chopper.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:tako/components/anime_card.dart'; 5 | import 'package:tako/models/anime_model.dart'; 6 | import 'package:tako/models/genre.dart'; 7 | import 'package:tako/services/anime_service.dart'; 8 | import 'package:tako/theme/tako_theme.dart'; 9 | import 'package:tako/util/constant.dart'; 10 | 11 | class SearchByGenreScreen extends StatefulWidget { 12 | const SearchByGenreScreen({Key? key, required this.choices}) 13 | : super(key: key); 14 | final List choices; 15 | @override 16 | State createState() => _SearchByGenreScreenState(); 17 | } 18 | 19 | class _SearchByGenreScreenState extends State { 20 | List getGenreIds() { 21 | return widget.choices.map((e) => e.id).toList(); 22 | } 23 | 24 | int currentPage = 1; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | const itemHeight = 300; 29 | final itemWidth = screenWidth / 2; 30 | 31 | return Scaffold( 32 | appBar: AppBar( 33 | title: const Text('Results'), 34 | centerTitle: true, 35 | ), 36 | body: FutureBuilder>( 37 | future: Provider.of(context) 38 | .getAnimeListByGenres(currentPage, getGenreIds()), 39 | builder: (context, snapshot) { 40 | if (snapshot.hasError) { 41 | return Center( 42 | child: Text(snapshot.error.toString()), 43 | ); 44 | } 45 | if (snapshot.connectionState == ConnectionState.done) { 46 | final list = snapshot.data!.body!.results; 47 | return Column( 48 | children: [ 49 | Wrap( 50 | spacing: 15, 51 | children: widget.choices 52 | .map((genre) => Chip( 53 | label: Text( 54 | genre.name, 55 | style: TakoTheme.darkTextTheme.subtitle1, 56 | ), 57 | )) 58 | .toList(), 59 | ), 60 | Expanded( 61 | child: GridView.builder( 62 | padding: const EdgeInsets.symmetric( 63 | horizontal: 20, vertical: 10), 64 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 65 | crossAxisCount: 2, 66 | childAspectRatio: (itemWidth / itemHeight), 67 | mainAxisSpacing: 20, 68 | crossAxisSpacing: 20, 69 | ), 70 | itemCount: list!.length, 71 | itemBuilder: (BuildContext context, int index) { 72 | return AnimeCard( 73 | itemWidth: itemWidth, 74 | itemHeight: itemHeight, 75 | id: list[index].id!, 76 | imageUrl: list[index].imageUrl!, 77 | title: list[index].title!, 78 | ); 79 | }, 80 | ), 81 | ), 82 | Container( 83 | color: tkDarkBlue, 84 | child: Row( 85 | mainAxisAlignment: MainAxisAlignment.center, 86 | children: [ 87 | Text( 88 | 'Prev', 89 | style: TakoTheme.darkTextTheme.subtitle1, 90 | ), 91 | IconButton( 92 | onPressed: () { 93 | setState(() { 94 | if (currentPage == 1) { 95 | currentPage = 1; 96 | } else { 97 | currentPage--; 98 | } 99 | }); 100 | }, 101 | icon: const Icon( 102 | Icons.keyboard_arrow_left_outlined, 103 | size: 25, 104 | color: tkLightGreen, 105 | )), 106 | const SizedBox( 107 | width: 80, 108 | ), 109 | IconButton( 110 | onPressed: () { 111 | setState(() { 112 | currentPage++; 113 | }); 114 | }, 115 | icon: const Icon( 116 | Icons.keyboard_arrow_right_outlined, 117 | size: 25, 118 | color: tkLightGreen, 119 | )), 120 | Text( 121 | 'Next', 122 | style: TakoTheme.darkTextTheme.subtitle1, 123 | ), 124 | ], 125 | ), 126 | ), 127 | ], 128 | ); 129 | } else { 130 | return const Center( 131 | child: CircularProgressIndicator(), 132 | ); 133 | } 134 | }), 135 | ); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /lib/screens/genre_categories_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:tako/models/genre.dart'; 3 | import 'package:tako/screens/search_by_genre.dart'; 4 | import 'package:tako/theme/tako_theme.dart'; 5 | import 'package:tako/util/constant.dart'; 6 | 7 | class GenreCategoriesScreen extends StatefulWidget { 8 | const GenreCategoriesScreen({Key? key}) : super(key: key); 9 | 10 | @override 11 | State createState() => _GenreCategoriesScreenState(); 12 | } 13 | 14 | class _GenreCategoriesScreenState extends State { 15 | bool selected = false; 16 | bool searchFieldTapped = false; 17 | final TextEditingController _controller = TextEditingController(); 18 | final _formKey = GlobalKey(); 19 | List newList = genreList; 20 | 21 | @override 22 | void dispose() { 23 | super.dispose(); 24 | _controller.dispose(); 25 | } 26 | 27 | List getSelectedItems() { 28 | return genreList.where((genre) => genre.selected).toList(); 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Column( 34 | children: [ 35 | Container( 36 | margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 20), 37 | height: 50, 38 | decoration: BoxDecoration( 39 | borderRadius: BorderRadius.circular(15), 40 | border: Border.all( 41 | width: 2, 42 | color: searchFieldTapped ? tkLightGreen : tkwhite.withOpacity(.5), 43 | ), 44 | ), 45 | child: TextField( 46 | key: _formKey, 47 | onTap: () { 48 | setState(() { 49 | searchFieldTapped = true; 50 | }); 51 | }, 52 | onChanged: (val) { 53 | setState(() { 54 | newList = genreList 55 | .where((genre) => 56 | genre.name.toLowerCase().contains(val.toLowerCase())) 57 | .toList(); 58 | }); 59 | }, 60 | controller: _controller, 61 | cursorColor: tkLightGreen, 62 | decoration: InputDecoration( 63 | border: InputBorder.none, 64 | prefixIcon: const Icon( 65 | Icons.search, 66 | color: Colors.grey, 67 | ), 68 | suffixIcon: IconButton( 69 | icon: const Icon( 70 | Icons.clear, 71 | color: Colors.grey, 72 | ), 73 | onPressed: () { 74 | setState(() { 75 | _controller.clear(); 76 | newList = genreList; 77 | FocusScope.of(context).unfocus(); 78 | }); 79 | }, 80 | ), 81 | hintText: 'Search Genre', 82 | ), 83 | ), 84 | ), 85 | Expanded( 86 | child: ListView.builder( 87 | padding: const EdgeInsets.symmetric( 88 | horizontal: 20, 89 | ), 90 | itemCount: newList.length, 91 | itemBuilder: (context, index) { 92 | return GenreItem( 93 | onChanged: (val) { 94 | setState(() { 95 | newList[index].selected = val!; 96 | }); 97 | }, 98 | genre: newList[index], 99 | ); 100 | }), 101 | ), 102 | GestureDetector( 103 | onTap: () { 104 | getSelectedItems(); 105 | Navigator.of(context).push(MaterialPageRoute( 106 | builder: (context) => SearchByGenreScreen( 107 | choices: getSelectedItems(), 108 | ))); 109 | }, 110 | child: Container( 111 | margin: const EdgeInsets.symmetric(vertical: 20, horizontal: 20), 112 | padding: const EdgeInsets.symmetric(horizontal: 20), 113 | alignment: Alignment.center, 114 | height: 50, 115 | child: Text( 116 | 'Submit', 117 | style: TakoTheme.darkTextTheme.headline2, 118 | ), 119 | decoration: BoxDecoration( 120 | boxShadow: [ 121 | BoxShadow( 122 | color: Colors.black.withOpacity(0.7), 123 | spreadRadius: 5, 124 | blurRadius: 7, 125 | offset: const Offset(0, 3), 126 | ), 127 | ], 128 | color: tkLightGreen, 129 | borderRadius: BorderRadius.circular(25), 130 | ), 131 | ), 132 | ), 133 | ], 134 | ); 135 | } 136 | } 137 | 138 | class GenreItem extends StatelessWidget { 139 | const GenreItem({Key? key, required this.onChanged, required this.genre}) 140 | : super(key: key); 141 | final Function(bool?)? onChanged; 142 | final Genre genre; 143 | 144 | @override 145 | Widget build(BuildContext context) { 146 | return Row( 147 | mainAxisAlignment: MainAxisAlignment.start, 148 | children: [ 149 | Transform.scale( 150 | scale: 1.2, 151 | child: Checkbox( 152 | onChanged: onChanged, 153 | value: genre.selected, 154 | ), 155 | ), 156 | const SizedBox( 157 | width: 20, 158 | ), 159 | Text( 160 | genre.name, 161 | style: TakoTheme.darkTextTheme.headline6!.copyWith( 162 | color: genre.selected 163 | ? tkLightGreen.withAlpha(200) 164 | : Colors.white.withAlpha(200), 165 | ), 166 | ), 167 | ], 168 | ); 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /lib/screens/voice_actor_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:chopper/chopper.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:tako/models/anime_model.dart'; 6 | import 'package:tako/services/anime_service.dart'; 7 | import 'package:tako/theme/tako_theme.dart'; 8 | import 'package:tako/util/constant.dart'; 9 | 10 | class VoiceActorScreen extends StatelessWidget { 11 | const VoiceActorScreen({Key? key, required this.id}) : super(key: key); 12 | final int id; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | title: const Text('Voice Actors'), 19 | centerTitle: true, 20 | ), 21 | body: FutureBuilder>( 22 | future: Provider.of(context).getCharacterList(id), 23 | builder: (context, snapshot) { 24 | if (snapshot.hasError) { 25 | return Text(snapshot.error.toString()); 26 | } 27 | 28 | if (snapshot.connectionState == ConnectionState.done) { 29 | final characters = snapshot.data!.body!.characters; 30 | 31 | return ListView.builder( 32 | itemCount: characters.length, 33 | itemBuilder: (context, index) { 34 | return Container( 35 | margin: const EdgeInsets.symmetric( 36 | horizontal: 20, vertical: 20), 37 | height: 200, 38 | decoration: BoxDecoration( 39 | color: Colors.black26, 40 | borderRadius: BorderRadius.circular(10)), 41 | child: Row( 42 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 43 | children: [ 44 | ClipRRect( 45 | borderRadius: const BorderRadius.only( 46 | topLeft: Radius.circular(10), 47 | bottomLeft: Radius.circular(10)), 48 | child: CachedNetworkImage( 49 | width: screenWidth * .4, 50 | fit: BoxFit.cover, 51 | // ignore: unnecessary_null_comparison 52 | imageUrl: characters[index].voiceActors!.isEmpty 53 | ? 'https://cdn.myanimelist.net/r/42x62/images/questionmark_23.gif?s=f7dcbc4a4603d18356d3dfef8abd655c' 54 | : characters[index].voiceActors![0].imageUrl!, 55 | ), 56 | ), 57 | Expanded( 58 | child: ClipRRect( 59 | borderRadius: const BorderRadius.only( 60 | bottomRight: Radius.circular(10), 61 | topRight: Radius.circular(10)), 62 | child: Stack( 63 | fit: StackFit.expand, 64 | children: [ 65 | CachedNetworkImage( 66 | width: double.infinity, 67 | imageUrl: characters[index].imageUrl!, 68 | fit: BoxFit.cover, 69 | ), 70 | Container( 71 | color: Colors.black.withOpacity(.75), 72 | ), 73 | Positioned( 74 | top: 10, 75 | right: 10, 76 | left: 10, 77 | child: Text( 78 | // ignore: unnecessary_null_comparison 79 | characters[index].voiceActors!.isEmpty 80 | ? '' 81 | : characters[index] 82 | .voiceActors![0] 83 | .name!, 84 | style: TakoTheme.darkTextTheme.headline4, 85 | ), 86 | ), 87 | Positioned( 88 | bottom: 0, 89 | left: 0, 90 | right: 0, 91 | child: Container( 92 | alignment: Alignment.center, 93 | height: 50, 94 | decoration: BoxDecoration( 95 | color: tkLightGreen.withAlpha(170), 96 | ), 97 | child: Text( 98 | characters[index].name!, 99 | style: 100 | TakoTheme.darkTextTheme.headline2, 101 | ), 102 | )), 103 | ], 104 | ), 105 | ), 106 | ), 107 | const SizedBox(), 108 | ], 109 | ), 110 | ); 111 | }, 112 | ); 113 | } else { 114 | return const Center( 115 | child: CircularProgressIndicator(), 116 | ); 117 | } 118 | }), 119 | ); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /lib/screens/video_list_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:chopper/chopper.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:tako/models/anime_model.dart'; 6 | import 'package:tako/screens/youtubeview_screen.dart'; 7 | import 'package:tako/services/anime_service.dart'; 8 | import 'package:tako/theme/tako_theme.dart'; 9 | import 'package:tako/util/constant.dart'; 10 | 11 | class VideoListScreen extends StatelessWidget { 12 | const VideoListScreen({Key? key, required this.id}) : super(key: key); 13 | final int id; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: AppBar( 19 | title: const Text('Videos'), 20 | centerTitle: true, 21 | ), 22 | body: FutureBuilder>( 23 | future: Provider.of(context).getPromoVideo(id), 24 | builder: (context, snapshot) { 25 | if (snapshot.hasError) { 26 | return Center( 27 | child: Text(snapshot.error.toString()), 28 | ); 29 | } 30 | if (snapshot.connectionState == ConnectionState.done) { 31 | final videos = snapshot.data!.body!.promo; 32 | return ListView.separated( 33 | separatorBuilder: (context, index) { 34 | return const SizedBox( 35 | height: 40, 36 | ); 37 | }, 38 | padding: 39 | const EdgeInsets.symmetric(horizontal: 20, vertical: 20), 40 | itemCount: videos!.length, 41 | itemBuilder: (context, index) { 42 | return Container( 43 | decoration: BoxDecoration( 44 | borderRadius: BorderRadius.circular(15), 45 | boxShadow: [ 46 | BoxShadow( 47 | color: Colors.black.withOpacity(0.7), 48 | spreadRadius: 5, 49 | blurRadius: 7, 50 | offset: const Offset(0, 3), 51 | ), 52 | ], 53 | ), 54 | child: Column( 55 | crossAxisAlignment: CrossAxisAlignment.start, 56 | children: [ 57 | ClipRRect( 58 | borderRadius: const BorderRadius.only( 59 | topLeft: Radius.circular(15), 60 | topRight: Radius.circular(15), 61 | ), 62 | child: Container( 63 | alignment: Alignment.center, 64 | decoration: const BoxDecoration( 65 | borderRadius: BorderRadius.only( 66 | topLeft: Radius.circular(15), 67 | topRight: Radius.circular(15), 68 | ), 69 | ), 70 | child: Stack( 71 | children: [ 72 | CachedNetworkImage( 73 | height: 180, 74 | imageUrl: videos[index].imageUrl!, 75 | fit: BoxFit.cover, 76 | ), 77 | Positioned( 78 | top: 0, 79 | left: 0, 80 | right: 0, 81 | bottom: 0, 82 | child: GestureDetector( 83 | onTap: () { 84 | Navigator.of(context).push( 85 | MaterialPageRoute( 86 | builder: (context) => 87 | YouTubeViewScreen( 88 | url: videos[index] 89 | .videoUrl!))); 90 | }, 91 | child: Container( 92 | decoration: const BoxDecoration( 93 | color: Colors.black38, 94 | borderRadius: BorderRadius.only( 95 | topLeft: Radius.circular(15), 96 | topRight: Radius.circular(15), 97 | ), 98 | ), 99 | ), 100 | ), 101 | ), 102 | Positioned( 103 | top: 0, 104 | left: 0, 105 | bottom: 0, 106 | right: 0, 107 | child: GestureDetector( 108 | onTap: () { 109 | Navigator.of(context).push( 110 | MaterialPageRoute( 111 | builder: (context) => 112 | YouTubeViewScreen( 113 | url: videos[index] 114 | .videoUrl!))); 115 | }, 116 | child: const Icon( 117 | Icons.play_circle, 118 | size: 50, 119 | ), 120 | )), 121 | ], 122 | ), 123 | ), 124 | ), 125 | Container( 126 | decoration: BoxDecoration( 127 | color: tkLightGreen.withOpacity(.8), 128 | borderRadius: const BorderRadius.only( 129 | bottomLeft: Radius.circular(15), 130 | bottomRight: Radius.circular(15), 131 | )), 132 | alignment: Alignment.center, 133 | height: 50, 134 | child: Text( 135 | videos[index].title!, 136 | style: TakoTheme.darkTextTheme.headline2, 137 | ), 138 | ), 139 | ], 140 | ), 141 | ); 142 | }); 143 | } else { 144 | return const Center( 145 | child: CircularProgressIndicator(), 146 | ); 147 | } 148 | }, 149 | ), 150 | ); 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /lib/models/anime_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'anime_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class APIAnimeQueryResult { 7 | List? results; 8 | 9 | APIAnimeQueryResult({required this.results}); 10 | 11 | factory APIAnimeQueryResult.fromJson(Map json) => 12 | _$APIAnimeQueryResultFromJson(json); 13 | Map toJson() => _$APIAnimeQueryResultToJson(this); 14 | } 15 | 16 | @JsonSerializable() 17 | class APIAnime { 18 | @JsonKey(name: 'mal_id') 19 | int? id; 20 | String?url; 21 | @JsonKey(name: 'image_url') 22 | String? imageUrl; 23 | String? title; 24 | bool airing; 25 | String? type; 26 | int? episodes; 27 | double? score; 28 | @JsonKey(name: 'start_date') 29 | String? startDate; 30 | @JsonKey(name: 'end_date') 31 | String? endDate; 32 | int? members; 33 | String? rated; 34 | 35 | APIAnime({ 36 | required this.id, 37 | required this.url, 38 | required this.airing, 39 | required this.endDate, 40 | required this.episodes, 41 | required this.imageUrl, 42 | required this.members, 43 | required this.rated, 44 | required this.score, 45 | required this.startDate, 46 | required this.title, 47 | required this.type, 48 | }); 49 | 50 | factory APIAnime.fromJson(Map json) => 51 | _$APIAnimeFromJson(json); 52 | Map toJson() => _$APIAnimeToJson(this); 53 | } 54 | 55 | @JsonSerializable() 56 | class APISeasonResult { 57 | List? top; 58 | 59 | APISeasonResult({required this.top}); 60 | 61 | factory APISeasonResult.fromJson(Map json) => 62 | _$APISeasonResultFromJson(json); 63 | Map toJson() => _$APISeasonResultToJson(this); 64 | } 65 | 66 | @JsonSerializable() 67 | class APISeasonAnime { 68 | @JsonKey(name: 'mal_id') 69 | int? id; 70 | int? rank; 71 | String? title; 72 | String? url; 73 | @JsonKey(name: 'image_url') 74 | String? imageUrl; 75 | int? episodes; 76 | @JsonKey(name: 'start_date') 77 | String? startDate; 78 | @JsonKey(name: 'end_date') 79 | String? endDate; 80 | double? score; 81 | 82 | APISeasonAnime({ 83 | required this.id, 84 | required this.endDate, 85 | required this.episodes, 86 | required this.imageUrl, 87 | required this.score, 88 | required this.startDate, 89 | required this.title, 90 | required this.url, 91 | required this.rank, 92 | }); 93 | 94 | factory APISeasonAnime.fromJson(Map json) => 95 | _$APISeasonAnimeFromJson(json); 96 | Map toJson() => _$APISeasonAnimeToJson(this); 97 | } 98 | 99 | @JsonSerializable() 100 | class APICharactersResult { 101 | List characters; 102 | 103 | APICharactersResult({required this.characters}); 104 | 105 | factory APICharactersResult.fromJson(Map json) => 106 | _$APICharactersResultFromJson(json); 107 | 108 | Map toJson() => _$APICharactersResultToJson(this); 109 | } 110 | 111 | @JsonSerializable() 112 | class APICharacter { 113 | @JsonKey(name: 'mal_id') 114 | int? id; 115 | String? url; 116 | @JsonKey(name: 'image_url') 117 | String? imageUrl; 118 | String? name; 119 | String? role; 120 | @JsonKey(name: 'voice_actors') 121 | List? voiceActors; 122 | 123 | APICharacter( 124 | {required this.name, 125 | required this.role, 126 | required this.url, 127 | required this.imageUrl, 128 | required this.id, 129 | required this.voiceActors}); 130 | 131 | factory APICharacter.fromJson(Map json) => 132 | _$APICharacterFromJson(json); 133 | Map toJson() => _$APICharacterToJson(this); 134 | } 135 | 136 | @JsonSerializable() 137 | class VoiceActor { 138 | @JsonKey(name: 'mal_id') 139 | int? id; 140 | String? name; 141 | String? url; 142 | @JsonKey(name: 'image_url') 143 | String? imageUrl; 144 | String? language; 145 | 146 | VoiceActor({ 147 | required this.id, 148 | required this.imageUrl, 149 | required this.url, 150 | required this.language, 151 | required this.name, 152 | }); 153 | 154 | factory VoiceActor.fromJson(Map json) => 155 | _$VoiceActorFromJson(json); 156 | Map toJson() => _$VoiceActorToJson(this); 157 | } 158 | 159 | @JsonSerializable() 160 | class Anime { 161 | @JsonKey(name: 'mal_id') 162 | int? id; 163 | String? url; 164 | @JsonKey(name: 'image_url') 165 | String? imageUrl; 166 | @JsonKey(name: 'trailer_url') 167 | String? trailerUrl; 168 | String? title; 169 | @JsonKey(name: 'title_japanese') 170 | String? titleJp; 171 | String? type; 172 | int? episodes; 173 | String? premiered; 174 | String? status; 175 | String? duration; 176 | String? rating; 177 | double? score; 178 | int? rank; 179 | int? popularity; 180 | String? synopsis; 181 | List? producers; 182 | List? studios; 183 | List genres; 184 | @JsonKey(name: 'opening_themes') 185 | List? openingThemes; 186 | @JsonKey(name: 'ending_themes') 187 | List? endingThemes; 188 | 189 | Anime({ 190 | required this.episodes, 191 | required this.id, 192 | required this.imageUrl, 193 | required this.rank, 194 | required this.score, 195 | required this.title, 196 | required this.url, 197 | required this.duration, 198 | required this.endingThemes, 199 | required this.genres, 200 | required this.openingThemes, 201 | required this.premiered, 202 | required this.popularity, 203 | required this.producers, 204 | required this.rating, 205 | required this.status, 206 | required this.studios, 207 | required this.synopsis, 208 | required this.titleJp, 209 | required this.trailerUrl, 210 | required this.type, 211 | }); 212 | factory Anime.fromJson(Map json) => _$AnimeFromJson(json); 213 | Map toJson() => _$AnimeToJson(this); 214 | } 215 | 216 | @JsonSerializable() 217 | class APIGenre { 218 | @JsonKey(name: 'mal_id') 219 | int? id; 220 | String? name; 221 | 222 | APIGenre({ 223 | required this.id, 224 | required this.name, 225 | }); 226 | factory APIGenre.fromJson(Map json) => _$APIGenreFromJson(json); 227 | Map toJson() => _$APIGenreToJson(this); 228 | } 229 | 230 | @JsonSerializable() 231 | class Studio { 232 | @JsonKey(name: 'mal_id') 233 | int? id; 234 | String? name; 235 | 236 | Studio({ 237 | required this.name, 238 | required this.id, 239 | }); 240 | factory Studio.fromJson(Map json) => _$StudioFromJson(json); 241 | Map toJson() => _$StudioToJson(this); 242 | } 243 | 244 | @JsonSerializable() 245 | class Producer { 246 | @JsonKey(name: 'mal_id') 247 | int? id; 248 | String? name; 249 | 250 | Producer({ 251 | required this.id, 252 | required this.name, 253 | }); 254 | factory Producer.fromJson(Map json) => 255 | _$ProducerFromJson(json); 256 | Map toJson() => _$ProducerToJson(this); 257 | } 258 | 259 | @JsonSerializable() 260 | class APIVideoResult { 261 | List? promo; 262 | 263 | APIVideoResult({required this.promo}); 264 | 265 | factory APIVideoResult.fromJson(Map json) => 266 | _$APIVideoResultFromJson(json); 267 | 268 | Map toJson() => _$APIVideoResultToJson(this); 269 | } 270 | 271 | @JsonSerializable() 272 | class Promo { 273 | String? title; 274 | @JsonKey(name: 'image_url') 275 | String? imageUrl; 276 | @JsonKey(name: 'video_url') 277 | String? videoUrl; 278 | 279 | Promo({ 280 | required this.imageUrl, 281 | required this.title, 282 | required this.videoUrl, 283 | }); 284 | factory Promo.fromJson(Map json) => _$PromoFromJson(json); 285 | 286 | Map toJson() => _$PromoToJson(this); 287 | } 288 | -------------------------------------------------------------------------------- /lib/screens/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | import 'package:chopper/chopper.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:tako/components/anime_card.dart'; 6 | import 'package:tako/models/anime_model.dart'; 7 | import 'package:tako/services/anime_service.dart'; 8 | import 'package:tako/theme/tako_theme.dart'; 9 | import 'package:tako/util/constant.dart'; 10 | 11 | class HomeScreen extends StatefulWidget { 12 | const HomeScreen({Key? key}) : super(key: key); 13 | 14 | @override 15 | State createState() => _HomeScreenState(); 16 | } 17 | 18 | class _HomeScreenState extends State { 19 | int currentPage = 1; 20 | int defaultPage = 1; 21 | bool categoryChanged = false; 22 | int selectedCategory = 1; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final animeService = Provider.of(context); 27 | const itemHeight = 300; 28 | final itemWidth = screenWidth / 2; 29 | return FutureBuilder>( 30 | future: selectedCategory == 1 31 | ? animeService.getCurrentSeasonList( 32 | categoryChanged ? defaultPage : currentPage) 33 | : animeService 34 | .getUpComingList(categoryChanged ? defaultPage : currentPage), 35 | builder: (context, snapshot) { 36 | if (snapshot.hasError) { 37 | return Center( 38 | child: Text(snapshot.error.toString()), 39 | ); 40 | } 41 | 42 | if (snapshot.connectionState == ConnectionState.done) { 43 | if (snapshot.data!.statusCode == 404) { 44 | return NoMoreResult(onTap: () { 45 | setState(() { 46 | --currentPage; 47 | }); 48 | }); 49 | } 50 | 51 | final list = snapshot.data!.body!.top; 52 | return Column( 53 | crossAxisAlignment: CrossAxisAlignment.start, 54 | children: [ 55 | Container( 56 | margin: 57 | const EdgeInsets.symmetric(horizontal: 20, vertical: 20), 58 | child: Row( 59 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 60 | children: [ 61 | Text( 62 | 'Popular', 63 | style: TakoTheme.darkTextTheme.headline1, 64 | ), 65 | DropdownButtonHideUnderline( 66 | child: DropdownButton( 67 | icon: const Icon(Icons.keyboard_arrow_down_rounded), 68 | dropdownColor: tkDarkBlue, 69 | value: selectedCategory, 70 | onChanged: (int? newCategory) { 71 | setState(() { 72 | selectedCategory = newCategory!; 73 | categoryChanged = true; 74 | }); 75 | }, 76 | items: [ 77 | DropdownMenuItem( 78 | child: Text( 79 | 'Trending', 80 | style: TakoTheme.darkTextTheme.headline3! 81 | .copyWith(color: Colors.grey), 82 | ), 83 | value: 1, 84 | ), 85 | DropdownMenuItem( 86 | child: Text( 87 | 'Upcoming', 88 | style: TakoTheme.darkTextTheme.headline3! 89 | .copyWith(color: Colors.grey), 90 | ), 91 | value: 2, 92 | ), 93 | ]), 94 | ), 95 | ], 96 | ), 97 | ), 98 | Expanded( 99 | child: GridView.builder( 100 | padding: const EdgeInsets.symmetric( 101 | horizontal: 20, vertical: 10), 102 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 103 | crossAxisCount: 2, 104 | childAspectRatio: (itemWidth / itemHeight), 105 | mainAxisSpacing: 20, 106 | crossAxisSpacing: 20, 107 | ), 108 | itemCount: list?.length, 109 | itemBuilder: (BuildContext context, int index) { 110 | return AnimeCard( 111 | id: list![index].id!, 112 | imageUrl: list[index].imageUrl!, 113 | title: list[index].title!, 114 | itemWidth: itemWidth, 115 | itemHeight: itemHeight); 116 | }, 117 | ), 118 | ), 119 | Row( 120 | mainAxisAlignment: MainAxisAlignment.center, 121 | children: [ 122 | IconButton( 123 | onPressed: () { 124 | setState(() { 125 | if (currentPage == 1) { 126 | currentPage = 1; 127 | } else { 128 | currentPage--; 129 | } 130 | 131 | categoryChanged = false; 132 | }); 133 | }, 134 | icon: const Icon( 135 | Icons.keyboard_arrow_left_outlined, 136 | size: 25, 137 | color: tkLightGreen, 138 | )), 139 | const SizedBox( 140 | width: 80, 141 | ), 142 | IconButton( 143 | onPressed: () { 144 | setState(() { 145 | currentPage++; 146 | categoryChanged = false; 147 | }); 148 | }, 149 | icon: const Icon( 150 | Icons.keyboard_arrow_right_outlined, 151 | size: 25, 152 | color: tkLightGreen, 153 | )), 154 | ], 155 | ) 156 | ], 157 | ); 158 | } else { 159 | return const Center( 160 | child: CircularProgressIndicator(), 161 | ); 162 | } 163 | }); 164 | } 165 | 166 | void goPrevPage(int index) { 167 | if (index <= 0) { 168 | index = 1; 169 | setState(() { 170 | currentPage = index; 171 | }); 172 | } 173 | } 174 | } 175 | 176 | class NoMoreResult extends StatelessWidget { 177 | const NoMoreResult({ 178 | Key? key, 179 | required this.onTap, 180 | }) : super(key: key); 181 | final Function()? onTap; 182 | 183 | @override 184 | Widget build(BuildContext context) { 185 | return Container( 186 | alignment: Alignment.center, 187 | child: Column( 188 | mainAxisAlignment: MainAxisAlignment.center, 189 | children: [ 190 | Image.asset( 191 | 'assets/images/no-results.png', 192 | fit: BoxFit.cover, 193 | width: 200, 194 | height: 200, 195 | ), 196 | Text( 197 | 'No More Result ', 198 | style: TakoTheme.darkTextTheme.subtitle2, 199 | ), 200 | SizedBox( 201 | height: screenHeight * .15, 202 | ), 203 | MaterialButton( 204 | onPressed: onTap, 205 | padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 12), 206 | shape: RoundedRectangleBorder( 207 | borderRadius: BorderRadius.circular(15), 208 | ), 209 | color: tkLightGreen, 210 | child: const Text('Go Back'), 211 | ), 212 | ], 213 | ), 214 | ); 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /lib/models/anime_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'anime_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | APIAnimeQueryResult _$APIAnimeQueryResultFromJson(Map json) => 10 | APIAnimeQueryResult( 11 | results: (json['results'] as List?) 12 | ?.map((e) => APIAnime.fromJson(e as Map)) 13 | .toList(), 14 | ); 15 | 16 | Map _$APIAnimeQueryResultToJson( 17 | APIAnimeQueryResult instance) => 18 | { 19 | 'results': instance.results, 20 | }; 21 | 22 | APIAnime _$APIAnimeFromJson(Map json) => APIAnime( 23 | id: json['mal_id'] as int?, 24 | url: json['url'] as String?, 25 | airing: json['airing'] as bool, 26 | endDate: json['end_date'] as String?, 27 | episodes: json['episodes'] as int?, 28 | imageUrl: json['image_url'] as String?, 29 | members: json['members'] as int?, 30 | rated: json['rated'] as String?, 31 | score: (json['score'] as num?)?.toDouble(), 32 | startDate: json['start_date'] as String?, 33 | title: json['title'] as String?, 34 | type: json['type'] as String?, 35 | ); 36 | 37 | Map _$APIAnimeToJson(APIAnime instance) => { 38 | 'mal_id': instance.id, 39 | 'url': instance.url, 40 | 'image_url': instance.imageUrl, 41 | 'title': instance.title, 42 | 'airing': instance.airing, 43 | 'type': instance.type, 44 | 'episodes': instance.episodes, 45 | 'score': instance.score, 46 | 'start_date': instance.startDate, 47 | 'end_date': instance.endDate, 48 | 'members': instance.members, 49 | 'rated': instance.rated, 50 | }; 51 | 52 | APISeasonResult _$APISeasonResultFromJson(Map json) => 53 | APISeasonResult( 54 | top: (json['top'] as List?) 55 | ?.map((e) => APISeasonAnime.fromJson(e as Map)) 56 | .toList(), 57 | ); 58 | 59 | Map _$APISeasonResultToJson(APISeasonResult instance) => 60 | { 61 | 'top': instance.top, 62 | }; 63 | 64 | APISeasonAnime _$APISeasonAnimeFromJson(Map json) => 65 | APISeasonAnime( 66 | id: json['mal_id'] as int?, 67 | endDate: json['end_date'] as String?, 68 | episodes: json['episodes'] as int?, 69 | imageUrl: json['image_url'] as String?, 70 | score: (json['score'] as num?)?.toDouble(), 71 | startDate: json['start_date'] as String?, 72 | title: json['title'] as String?, 73 | url: json['url'] as String?, 74 | rank: json['rank'] as int?, 75 | ); 76 | 77 | Map _$APISeasonAnimeToJson(APISeasonAnime instance) => 78 | { 79 | 'mal_id': instance.id, 80 | 'rank': instance.rank, 81 | 'title': instance.title, 82 | 'url': instance.url, 83 | 'image_url': instance.imageUrl, 84 | 'episodes': instance.episodes, 85 | 'start_date': instance.startDate, 86 | 'end_date': instance.endDate, 87 | 'score': instance.score, 88 | }; 89 | 90 | APICharactersResult _$APICharactersResultFromJson(Map json) => 91 | APICharactersResult( 92 | characters: (json['characters'] as List) 93 | .map((e) => APICharacter.fromJson(e as Map)) 94 | .toList(), 95 | ); 96 | 97 | Map _$APICharactersResultToJson( 98 | APICharactersResult instance) => 99 | { 100 | 'characters': instance.characters, 101 | }; 102 | 103 | APICharacter _$APICharacterFromJson(Map json) => APICharacter( 104 | name: json['name'] as String?, 105 | role: json['role'] as String?, 106 | url: json['url'] as String?, 107 | imageUrl: json['image_url'] as String?, 108 | id: json['mal_id'] as int?, 109 | voiceActors: (json['voice_actors'] as List?) 110 | ?.map((e) => VoiceActor.fromJson(e as Map)) 111 | .toList(), 112 | ); 113 | 114 | Map _$APICharacterToJson(APICharacter instance) => 115 | { 116 | 'mal_id': instance.id, 117 | 'url': instance.url, 118 | 'image_url': instance.imageUrl, 119 | 'name': instance.name, 120 | 'role': instance.role, 121 | 'voice_actors': instance.voiceActors, 122 | }; 123 | 124 | VoiceActor _$VoiceActorFromJson(Map json) => VoiceActor( 125 | id: json['mal_id'] as int?, 126 | imageUrl: json['image_url'] as String?, 127 | url: json['url'] as String?, 128 | language: json['language'] as String?, 129 | name: json['name'] as String?, 130 | ); 131 | 132 | Map _$VoiceActorToJson(VoiceActor instance) => 133 | { 134 | 'mal_id': instance.id, 135 | 'name': instance.name, 136 | 'url': instance.url, 137 | 'image_url': instance.imageUrl, 138 | 'language': instance.language, 139 | }; 140 | 141 | Anime _$AnimeFromJson(Map json) => Anime( 142 | episodes: json['episodes'] as int?, 143 | id: json['mal_id'] as int?, 144 | imageUrl: json['image_url'] as String?, 145 | rank: json['rank'] as int?, 146 | score: (json['score'] as num?)?.toDouble(), 147 | title: json['title'] as String?, 148 | url: json['url'] as String?, 149 | duration: json['duration'] as String?, 150 | endingThemes: (json['ending_themes'] as List?) 151 | ?.map((e) => e as String) 152 | .toList(), 153 | genres: (json['genres'] as List) 154 | .map((e) => APIGenre.fromJson(e as Map)) 155 | .toList(), 156 | openingThemes: (json['opening_themes'] as List?) 157 | ?.map((e) => e as String) 158 | .toList(), 159 | premiered: json['premiered'] as String?, 160 | popularity: json['popularity'] as int?, 161 | producers: (json['producers'] as List?) 162 | ?.map((e) => Producer.fromJson(e as Map)) 163 | .toList(), 164 | rating: json['rating'] as String?, 165 | status: json['status'] as String?, 166 | studios: (json['studios'] as List?) 167 | ?.map((e) => Studio.fromJson(e as Map)) 168 | .toList(), 169 | synopsis: json['synopsis'] as String?, 170 | titleJp: json['title_japanese'] as String?, 171 | trailerUrl: json['trailer_url'] as String?, 172 | type: json['type'] as String?, 173 | ); 174 | 175 | Map _$AnimeToJson(Anime instance) => { 176 | 'mal_id': instance.id, 177 | 'url': instance.url, 178 | 'image_url': instance.imageUrl, 179 | 'trailer_url': instance.trailerUrl, 180 | 'title': instance.title, 181 | 'title_japanese': instance.titleJp, 182 | 'type': instance.type, 183 | 'episodes': instance.episodes, 184 | 'premiered': instance.premiered, 185 | 'status': instance.status, 186 | 'duration': instance.duration, 187 | 'rating': instance.rating, 188 | 'score': instance.score, 189 | 'rank': instance.rank, 190 | 'popularity': instance.popularity, 191 | 'synopsis': instance.synopsis, 192 | 'producers': instance.producers, 193 | 'studios': instance.studios, 194 | 'genres': instance.genres, 195 | 'opening_themes': instance.openingThemes, 196 | 'ending_themes': instance.endingThemes, 197 | }; 198 | 199 | APIGenre _$APIGenreFromJson(Map json) => APIGenre( 200 | id: json['mal_id'] as int?, 201 | name: json['name'] as String?, 202 | ); 203 | 204 | Map _$APIGenreToJson(APIGenre instance) => { 205 | 'mal_id': instance.id, 206 | 'name': instance.name, 207 | }; 208 | 209 | Studio _$StudioFromJson(Map json) => Studio( 210 | name: json['name'] as String?, 211 | id: json['mal_id'] as int?, 212 | ); 213 | 214 | Map _$StudioToJson(Studio instance) => { 215 | 'mal_id': instance.id, 216 | 'name': instance.name, 217 | }; 218 | 219 | Producer _$ProducerFromJson(Map json) => Producer( 220 | id: json['mal_id'] as int?, 221 | name: json['name'] as String?, 222 | ); 223 | 224 | Map _$ProducerToJson(Producer instance) => { 225 | 'mal_id': instance.id, 226 | 'name': instance.name, 227 | }; 228 | 229 | APIVideoResult _$APIVideoResultFromJson(Map json) => 230 | APIVideoResult( 231 | promo: (json['promo'] as List?) 232 | ?.map((e) => Promo.fromJson(e as Map)) 233 | .toList(), 234 | ); 235 | 236 | Map _$APIVideoResultToJson(APIVideoResult instance) => 237 | { 238 | 'promo': instance.promo, 239 | }; 240 | 241 | Promo _$PromoFromJson(Map json) => Promo( 242 | imageUrl: json['image_url'] as String?, 243 | title: json['title'] as String?, 244 | videoUrl: json['video_url'] as String?, 245 | ); 246 | 247 | Map _$PromoToJson(Promo instance) => { 248 | 'title': instance.title, 249 | 'image_url': instance.imageUrl, 250 | 'video_url': instance.videoUrl, 251 | }; 252 | -------------------------------------------------------------------------------- /lib/screens/searched_result_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:chopper/chopper.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:tako/models/anime_model.dart'; 6 | import 'package:tako/screens/anime_detail_screen.dart'; 7 | import 'package:tako/services/anime_service.dart'; 8 | import 'package:tako/theme/tako_theme.dart'; 9 | import 'package:tako/util/constant.dart'; 10 | 11 | class SearchResultScreen extends StatefulWidget { 12 | const SearchResultScreen({Key? key}) : super(key: key); 13 | 14 | @override 15 | State createState() => _SearchResultScreenState(); 16 | } 17 | 18 | class _SearchResultScreenState extends State { 19 | bool hasValue = false; 20 | String value = ''; 21 | final TextEditingController _controller = TextEditingController(); 22 | final _formKey = GlobalKey(); 23 | 24 | @override 25 | void dispose() { 26 | super.dispose(); 27 | _controller.dispose(); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Scaffold( 33 | appBar: AppBar( 34 | title: TextField( 35 | key: _formKey, 36 | controller: _controller, 37 | decoration: InputDecoration( 38 | prefixIcon: const Icon( 39 | Icons.search, 40 | color: Colors.white, 41 | ), 42 | suffixIcon: IconButton( 43 | icon: const Icon( 44 | Icons.clear, 45 | color: Colors.white, 46 | ), 47 | onPressed: () { 48 | _controller.clear(); 49 | }, 50 | ), 51 | hintText: 'Search...', 52 | border: InputBorder.none), 53 | onSubmitted: (val) { 54 | setState(() { 55 | hasValue = true; 56 | }); 57 | value = val; 58 | }, 59 | ), 60 | ), 61 | body: hasValue 62 | ? FutureBuilder>( 63 | future: Provider.of(context).queryAnime(value), 64 | builder: (BuildContext context, snapshot) { 65 | if (snapshot.hasError) { 66 | return Center( 67 | child: Text(snapshot.error.toString()), 68 | ); 69 | } 70 | if (snapshot.connectionState == ConnectionState.done) { 71 | return Column( 72 | crossAxisAlignment: CrossAxisAlignment.start, 73 | children: [ 74 | Container( 75 | margin: const EdgeInsets.symmetric( 76 | horizontal: 20, vertical: 20), 77 | child: RichText( 78 | text: TextSpan(children: [ 79 | TextSpan( 80 | text: 'Search : ', 81 | style: TakoTheme.darkTextTheme.headline1, 82 | ), 83 | TextSpan( 84 | text: value, 85 | style: TakoTheme.darkTextTheme.headline4, 86 | ), 87 | ]), 88 | ), 89 | ), 90 | Expanded( 91 | child: ListView.builder( 92 | // padding: const EdgeInsets.symmetric(vertical: 10), 93 | itemCount: snapshot.data!.body!.results!.length, 94 | itemBuilder: (context, index) { 95 | final body = snapshot.data!.body; 96 | final anime = body!.results![index]; 97 | 98 | return GestureDetector( 99 | onTap: () { 100 | Navigator.of(context).push(MaterialPageRoute( 101 | builder: (context) => AnimeDetailScreen( 102 | id: anime.id!, 103 | imageUrl: anime.imageUrl!))); 104 | }, 105 | child: Container( 106 | decoration: BoxDecoration( 107 | boxShadow: [ 108 | BoxShadow( 109 | color: Colors.black.withOpacity(0.7), 110 | spreadRadius: 5, 111 | blurRadius: 7, 112 | offset: const Offset(0, 3), 113 | ), 114 | ], 115 | gradient: const LinearGradient( 116 | colors: [ 117 | tkDarkGreen, 118 | tkDarkBlue, 119 | ], 120 | begin: Alignment.topLeft, 121 | end: Alignment.bottomRight), 122 | borderRadius: BorderRadius.circular(15), 123 | ), 124 | margin: const EdgeInsets.symmetric( 125 | vertical: 20, horizontal: 20), 126 | child: Column( 127 | mainAxisAlignment: 128 | MainAxisAlignment.spaceBetween, 129 | children: [ 130 | Row( 131 | crossAxisAlignment: 132 | CrossAxisAlignment.start, 133 | children: [ 134 | ClipRRect( 135 | borderRadius: 136 | BorderRadius.circular(10), 137 | child: CachedNetworkImage( 138 | imageUrl: anime.imageUrl!, 139 | fit: BoxFit.cover, 140 | width: 100, 141 | height: 150, 142 | ), 143 | ), 144 | Expanded( 145 | child: Container( 146 | padding: 147 | const EdgeInsets.symmetric( 148 | horizontal: 20), 149 | child: Column( 150 | crossAxisAlignment: 151 | CrossAxisAlignment.start, 152 | children: [ 153 | const SizedBox( 154 | height: 8, 155 | ), 156 | Text( 157 | anime.title!, 158 | style: TakoTheme 159 | .darkTextTheme 160 | .headline2, 161 | ), 162 | const SizedBox( 163 | height: 20, 164 | ), 165 | Row( 166 | mainAxisAlignment: 167 | MainAxisAlignment.start, 168 | children: [ 169 | const Icon( 170 | Icons.star, 171 | color: tkLightGreen, 172 | ), 173 | const SizedBox( 174 | width: 5, 175 | ), 176 | Text( 177 | 'Rating : ${anime.score.toString()}', 178 | style: const TextStyle( 179 | color: Colors.white, 180 | fontSize: 18, 181 | ), 182 | ), 183 | ], 184 | ), 185 | const SizedBox( 186 | height: 10, 187 | ), 188 | ], 189 | ), 190 | ), 191 | ), 192 | ], 193 | ), 194 | ], 195 | ), 196 | ), 197 | ); 198 | }), 199 | ), 200 | ], 201 | ); 202 | } else { 203 | return const Center( 204 | child: CircularProgressIndicator(), 205 | ); 206 | } 207 | }) 208 | : Container(), 209 | ); 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /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 | 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 = 1020; 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 = 9.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 = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.tako; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.tako; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.tako; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /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: "31.0.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.8.0" 18 | args: 19 | dependency: transitive 20 | description: 21 | name: args 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.3.0" 25 | async: 26 | dependency: transitive 27 | description: 28 | name: async 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.8.2" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.1.0" 39 | build: 40 | dependency: transitive 41 | description: 42 | name: build 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "2.1.1" 46 | build_config: 47 | dependency: transitive 48 | description: 49 | name: build_config 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.0" 53 | build_daemon: 54 | dependency: transitive 55 | description: 56 | name: build_daemon 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "3.0.1" 60 | build_resolvers: 61 | dependency: transitive 62 | description: 63 | name: build_resolvers 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.0.5" 67 | build_runner: 68 | dependency: "direct main" 69 | description: 70 | name: build_runner 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.5" 74 | build_runner_core: 75 | dependency: transitive 76 | description: 77 | name: build_runner_core 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "7.2.2" 81 | built_collection: 82 | dependency: transitive 83 | description: 84 | name: built_collection 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "5.1.1" 88 | built_value: 89 | dependency: transitive 90 | description: 91 | name: built_value 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "8.1.3" 95 | cached_network_image: 96 | dependency: "direct main" 97 | description: 98 | name: cached_network_image 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "3.1.0+1" 102 | cached_network_image_platform_interface: 103 | dependency: transitive 104 | description: 105 | name: cached_network_image_platform_interface 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.0.0" 109 | cached_network_image_web: 110 | dependency: transitive 111 | description: 112 | name: cached_network_image_web 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.0.1" 116 | characters: 117 | dependency: transitive 118 | description: 119 | name: characters 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "1.2.0" 123 | charcode: 124 | dependency: transitive 125 | description: 126 | name: charcode 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.3.1" 130 | checked_yaml: 131 | dependency: transitive 132 | description: 133 | name: checked_yaml 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "2.0.1" 137 | chopper: 138 | dependency: "direct main" 139 | description: 140 | name: chopper 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "4.0.3" 144 | chopper_generator: 145 | dependency: "direct main" 146 | description: 147 | name: chopper_generator 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "4.0.3" 151 | cli_util: 152 | dependency: transitive 153 | description: 154 | name: cli_util 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "0.3.5" 158 | clock: 159 | dependency: transitive 160 | description: 161 | name: clock 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "1.1.0" 165 | code_builder: 166 | dependency: transitive 167 | description: 168 | name: code_builder 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "4.1.0" 172 | collection: 173 | dependency: transitive 174 | description: 175 | name: collection 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "1.15.0" 179 | connectivity: 180 | dependency: "direct main" 181 | description: 182 | name: connectivity 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "3.0.6" 186 | connectivity_for_web: 187 | dependency: transitive 188 | description: 189 | name: connectivity_for_web 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "0.4.0+1" 193 | connectivity_macos: 194 | dependency: transitive 195 | description: 196 | name: connectivity_macos 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "0.2.1+2" 200 | connectivity_platform_interface: 201 | dependency: transitive 202 | description: 203 | name: connectivity_platform_interface 204 | url: "https://pub.dartlang.org" 205 | source: hosted 206 | version: "2.0.1" 207 | convert: 208 | dependency: transitive 209 | description: 210 | name: convert 211 | url: "https://pub.dartlang.org" 212 | source: hosted 213 | version: "3.0.1" 214 | crypto: 215 | dependency: transitive 216 | description: 217 | name: crypto 218 | url: "https://pub.dartlang.org" 219 | source: hosted 220 | version: "3.0.1" 221 | cupertino_icons: 222 | dependency: "direct main" 223 | description: 224 | name: cupertino_icons 225 | url: "https://pub.dartlang.org" 226 | source: hosted 227 | version: "1.0.4" 228 | dart_style: 229 | dependency: transitive 230 | description: 231 | name: dart_style 232 | url: "https://pub.dartlang.org" 233 | source: hosted 234 | version: "2.2.0" 235 | fake_async: 236 | dependency: transitive 237 | description: 238 | name: fake_async 239 | url: "https://pub.dartlang.org" 240 | source: hosted 241 | version: "1.2.0" 242 | ffi: 243 | dependency: transitive 244 | description: 245 | name: ffi 246 | url: "https://pub.dartlang.org" 247 | source: hosted 248 | version: "1.1.2" 249 | file: 250 | dependency: transitive 251 | description: 252 | name: file 253 | url: "https://pub.dartlang.org" 254 | source: hosted 255 | version: "6.1.2" 256 | fixnum: 257 | dependency: transitive 258 | description: 259 | name: fixnum 260 | url: "https://pub.dartlang.org" 261 | source: hosted 262 | version: "1.0.0" 263 | flutter: 264 | dependency: "direct main" 265 | description: flutter 266 | source: sdk 267 | version: "0.0.0" 268 | flutter_blurhash: 269 | dependency: transitive 270 | description: 271 | name: flutter_blurhash 272 | url: "https://pub.dartlang.org" 273 | source: hosted 274 | version: "0.6.0" 275 | flutter_cache_manager: 276 | dependency: transitive 277 | description: 278 | name: flutter_cache_manager 279 | url: "https://pub.dartlang.org" 280 | source: hosted 281 | version: "3.1.3" 282 | flutter_lints: 283 | dependency: "direct dev" 284 | description: 285 | name: flutter_lints 286 | url: "https://pub.dartlang.org" 287 | source: hosted 288 | version: "1.0.4" 289 | flutter_screenutil: 290 | dependency: "direct main" 291 | description: 292 | name: flutter_screenutil 293 | url: "https://pub.dartlang.org" 294 | source: hosted 295 | version: "5.1.0" 296 | flutter_test: 297 | dependency: "direct dev" 298 | description: flutter 299 | source: sdk 300 | version: "0.0.0" 301 | flutter_web_plugins: 302 | dependency: transitive 303 | description: flutter 304 | source: sdk 305 | version: "0.0.0" 306 | font_awesome_flutter: 307 | dependency: "direct main" 308 | description: 309 | name: font_awesome_flutter 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "9.2.0" 313 | frontend_server_client: 314 | dependency: transitive 315 | description: 316 | name: frontend_server_client 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "2.1.2" 320 | glob: 321 | dependency: transitive 322 | description: 323 | name: glob 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "2.0.2" 327 | google_fonts: 328 | dependency: "direct main" 329 | description: 330 | name: google_fonts 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "2.1.0" 334 | graphs: 335 | dependency: transitive 336 | description: 337 | name: graphs 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "2.1.0" 341 | http: 342 | dependency: transitive 343 | description: 344 | name: http 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.13.4" 348 | http_multi_server: 349 | dependency: transitive 350 | description: 351 | name: http_multi_server 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "3.0.1" 355 | http_parser: 356 | dependency: transitive 357 | description: 358 | name: http_parser 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "4.0.0" 362 | io: 363 | dependency: transitive 364 | description: 365 | name: io 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "1.0.3" 369 | js: 370 | dependency: transitive 371 | description: 372 | name: js 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "0.6.3" 376 | json_annotation: 377 | dependency: "direct main" 378 | description: 379 | name: json_annotation 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "4.3.0" 383 | json_serializable: 384 | dependency: "direct main" 385 | description: 386 | name: json_serializable 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "6.0.1" 390 | lints: 391 | dependency: transitive 392 | description: 393 | name: lints 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "1.0.1" 397 | logging: 398 | dependency: "direct main" 399 | description: 400 | name: logging 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "1.0.2" 404 | matcher: 405 | dependency: transitive 406 | description: 407 | name: matcher 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "0.12.11" 411 | meta: 412 | dependency: transitive 413 | description: 414 | name: meta 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "1.7.0" 418 | mime: 419 | dependency: transitive 420 | description: 421 | name: mime 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "1.0.1" 425 | nested: 426 | dependency: transitive 427 | description: 428 | name: nested 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "1.0.0" 432 | octo_image: 433 | dependency: transitive 434 | description: 435 | name: octo_image 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "1.0.0+1" 439 | package_config: 440 | dependency: transitive 441 | description: 442 | name: package_config 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "2.0.2" 446 | path: 447 | dependency: transitive 448 | description: 449 | name: path 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "1.8.0" 453 | path_provider: 454 | dependency: transitive 455 | description: 456 | name: path_provider 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "2.0.6" 460 | path_provider_linux: 461 | dependency: transitive 462 | description: 463 | name: path_provider_linux 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "2.1.1" 467 | path_provider_macos: 468 | dependency: transitive 469 | description: 470 | name: path_provider_macos 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "2.0.2" 474 | path_provider_platform_interface: 475 | dependency: transitive 476 | description: 477 | name: path_provider_platform_interface 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "2.0.1" 481 | path_provider_windows: 482 | dependency: transitive 483 | description: 484 | name: path_provider_windows 485 | url: "https://pub.dartlang.org" 486 | source: hosted 487 | version: "2.0.4" 488 | pedantic: 489 | dependency: transitive 490 | description: 491 | name: pedantic 492 | url: "https://pub.dartlang.org" 493 | source: hosted 494 | version: "1.11.1" 495 | platform: 496 | dependency: transitive 497 | description: 498 | name: platform 499 | url: "https://pub.dartlang.org" 500 | source: hosted 501 | version: "3.0.2" 502 | plugin_platform_interface: 503 | dependency: transitive 504 | description: 505 | name: plugin_platform_interface 506 | url: "https://pub.dartlang.org" 507 | source: hosted 508 | version: "2.0.2" 509 | pool: 510 | dependency: transitive 511 | description: 512 | name: pool 513 | url: "https://pub.dartlang.org" 514 | source: hosted 515 | version: "1.5.0" 516 | process: 517 | dependency: transitive 518 | description: 519 | name: process 520 | url: "https://pub.dartlang.org" 521 | source: hosted 522 | version: "4.2.4" 523 | provider: 524 | dependency: "direct main" 525 | description: 526 | name: provider 527 | url: "https://pub.dartlang.org" 528 | source: hosted 529 | version: "6.0.1" 530 | pub_semver: 531 | dependency: transitive 532 | description: 533 | name: pub_semver 534 | url: "https://pub.dartlang.org" 535 | source: hosted 536 | version: "2.1.0" 537 | pubspec_parse: 538 | dependency: transitive 539 | description: 540 | name: pubspec_parse 541 | url: "https://pub.dartlang.org" 542 | source: hosted 543 | version: "1.1.0" 544 | rxdart: 545 | dependency: transitive 546 | description: 547 | name: rxdart 548 | url: "https://pub.dartlang.org" 549 | source: hosted 550 | version: "0.27.2" 551 | shelf: 552 | dependency: transitive 553 | description: 554 | name: shelf 555 | url: "https://pub.dartlang.org" 556 | source: hosted 557 | version: "1.2.0" 558 | shelf_web_socket: 559 | dependency: transitive 560 | description: 561 | name: shelf_web_socket 562 | url: "https://pub.dartlang.org" 563 | source: hosted 564 | version: "1.0.1" 565 | sky_engine: 566 | dependency: transitive 567 | description: flutter 568 | source: sdk 569 | version: "0.0.99" 570 | source_gen: 571 | dependency: transitive 572 | description: 573 | name: source_gen 574 | url: "https://pub.dartlang.org" 575 | source: hosted 576 | version: "1.2.0" 577 | source_helper: 578 | dependency: transitive 579 | description: 580 | name: source_helper 581 | url: "https://pub.dartlang.org" 582 | source: hosted 583 | version: "1.3.0" 584 | source_span: 585 | dependency: transitive 586 | description: 587 | name: source_span 588 | url: "https://pub.dartlang.org" 589 | source: hosted 590 | version: "1.8.1" 591 | sqflite: 592 | dependency: transitive 593 | description: 594 | name: sqflite 595 | url: "https://pub.dartlang.org" 596 | source: hosted 597 | version: "2.0.0+4" 598 | sqflite_common: 599 | dependency: transitive 600 | description: 601 | name: sqflite_common 602 | url: "https://pub.dartlang.org" 603 | source: hosted 604 | version: "2.0.1+1" 605 | stack_trace: 606 | dependency: transitive 607 | description: 608 | name: stack_trace 609 | url: "https://pub.dartlang.org" 610 | source: hosted 611 | version: "1.10.0" 612 | stream_channel: 613 | dependency: transitive 614 | description: 615 | name: stream_channel 616 | url: "https://pub.dartlang.org" 617 | source: hosted 618 | version: "2.1.0" 619 | stream_transform: 620 | dependency: transitive 621 | description: 622 | name: stream_transform 623 | url: "https://pub.dartlang.org" 624 | source: hosted 625 | version: "2.0.0" 626 | string_scanner: 627 | dependency: transitive 628 | description: 629 | name: string_scanner 630 | url: "https://pub.dartlang.org" 631 | source: hosted 632 | version: "1.1.0" 633 | synchronized: 634 | dependency: transitive 635 | description: 636 | name: synchronized 637 | url: "https://pub.dartlang.org" 638 | source: hosted 639 | version: "3.0.0" 640 | term_glyph: 641 | dependency: transitive 642 | description: 643 | name: term_glyph 644 | url: "https://pub.dartlang.org" 645 | source: hosted 646 | version: "1.2.0" 647 | test_api: 648 | dependency: transitive 649 | description: 650 | name: test_api 651 | url: "https://pub.dartlang.org" 652 | source: hosted 653 | version: "0.4.3" 654 | timing: 655 | dependency: transitive 656 | description: 657 | name: timing 658 | url: "https://pub.dartlang.org" 659 | source: hosted 660 | version: "1.0.0" 661 | typed_data: 662 | dependency: transitive 663 | description: 664 | name: typed_data 665 | url: "https://pub.dartlang.org" 666 | source: hosted 667 | version: "1.3.0" 668 | uuid: 669 | dependency: transitive 670 | description: 671 | name: uuid 672 | url: "https://pub.dartlang.org" 673 | source: hosted 674 | version: "3.0.5" 675 | vector_math: 676 | dependency: transitive 677 | description: 678 | name: vector_math 679 | url: "https://pub.dartlang.org" 680 | source: hosted 681 | version: "2.1.1" 682 | watcher: 683 | dependency: transitive 684 | description: 685 | name: watcher 686 | url: "https://pub.dartlang.org" 687 | source: hosted 688 | version: "1.0.1" 689 | web_socket_channel: 690 | dependency: transitive 691 | description: 692 | name: web_socket_channel 693 | url: "https://pub.dartlang.org" 694 | source: hosted 695 | version: "2.1.0" 696 | webview_flutter: 697 | dependency: "direct main" 698 | description: 699 | name: webview_flutter 700 | url: "https://pub.dartlang.org" 701 | source: hosted 702 | version: "2.3.1" 703 | webview_flutter_android: 704 | dependency: transitive 705 | description: 706 | name: webview_flutter_android 707 | url: "https://pub.dartlang.org" 708 | source: hosted 709 | version: "2.3.0" 710 | webview_flutter_platform_interface: 711 | dependency: transitive 712 | description: 713 | name: webview_flutter_platform_interface 714 | url: "https://pub.dartlang.org" 715 | source: hosted 716 | version: "1.5.1" 717 | webview_flutter_wkwebview: 718 | dependency: transitive 719 | description: 720 | name: webview_flutter_wkwebview 721 | url: "https://pub.dartlang.org" 722 | source: hosted 723 | version: "2.4.0" 724 | win32: 725 | dependency: transitive 726 | description: 727 | name: win32 728 | url: "https://pub.dartlang.org" 729 | source: hosted 730 | version: "2.3.0" 731 | xdg_directories: 732 | dependency: transitive 733 | description: 734 | name: xdg_directories 735 | url: "https://pub.dartlang.org" 736 | source: hosted 737 | version: "0.2.0" 738 | yaml: 739 | dependency: transitive 740 | description: 741 | name: yaml 742 | url: "https://pub.dartlang.org" 743 | source: hosted 744 | version: "3.1.0" 745 | sdks: 746 | dart: ">=2.14.0 <3.0.0" 747 | flutter: ">=2.5.0" 748 | -------------------------------------------------------------------------------- /lib/screens/anime_detail_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:ui'; 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:chopper/chopper.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 7 | import 'package:provider/provider.dart'; 8 | import 'package:tako/models/anime_model.dart'; 9 | import 'package:tako/provider/navmanager.dart'; 10 | import 'package:tako/screens/video_list_screen.dart'; 11 | import 'package:tako/screens/voice_actor_screen.dart'; 12 | import 'package:tako/services/anime_service.dart'; 13 | import 'package:tako/theme/tako_theme.dart'; 14 | import 'package:tako/util/constant.dart'; 15 | 16 | class AnimeDetailScreen extends StatefulWidget { 17 | const AnimeDetailScreen({ 18 | Key? key, 19 | required this.id, 20 | required this.imageUrl, 21 | }) : super(key: key); 22 | final int id; 23 | final String imageUrl; 24 | 25 | @override 26 | State createState() => _AnimeDetailScreenState(); 27 | } 28 | 29 | class _AnimeDetailScreenState extends State { 30 | late final ScrollController _scrollController = ScrollController(); 31 | 32 | void _goToElement(int index) { 33 | _scrollController.animateTo((100.0 * index), 34 | duration: const Duration(milliseconds: 500), 35 | curve: Curves.easeInOutCirc); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return Hero( 41 | tag: widget.id, 42 | child: WillPopScope( 43 | onWillPop: () async { 44 | Provider.of(context, listen: false).goToNav(0); 45 | return true; 46 | }, 47 | child: Scaffold( 48 | appBar: AppBar( 49 | centerTitle: true, 50 | title: const Text('Anime Detail'), 51 | ), 52 | body: FutureBuilder>( 53 | future: AnimeService.create().getAnimeById(widget.id), 54 | builder: (context, snapshot) { 55 | if (snapshot.hasError) { 56 | return Center( 57 | child: Text(snapshot.error.toString()), 58 | ); 59 | } 60 | if (snapshot.connectionState == ConnectionState.done) { 61 | final anime = snapshot.data?.body!; 62 | 63 | return SingleChildScrollView( 64 | child: SizedBox( 65 | height: screenHeight, 66 | child: Stack( 67 | fit: StackFit.expand, 68 | children: [ 69 | Positioned( 70 | child: CachedNetworkImage( 71 | imageUrl: widget.imageUrl, 72 | fit: BoxFit.cover, 73 | ), 74 | ), 75 | BackdropFilter( 76 | filter: ImageFilter.blur( 77 | sigmaX: 8, 78 | sigmaY: 8, 79 | ), 80 | child: Container( 81 | color: Colors.black87, 82 | width: double.infinity, 83 | height: screenHeight, 84 | ), 85 | ), 86 | Positioned( 87 | top: 20, 88 | left: 30, 89 | right: 30, 90 | bottom: 0, 91 | child: Column( 92 | crossAxisAlignment: CrossAxisAlignment.start, 93 | children: [ 94 | Text( 95 | anime?.title == null 96 | ? '' 97 | : anime!.title.toString(), 98 | style: TakoTheme.darkTextTheme.headline1, 99 | ), 100 | const SizedBox( 101 | height: 20, 102 | ), 103 | Row( 104 | mainAxisAlignment: 105 | MainAxisAlignment.spaceEvenly, 106 | children: [ 107 | IconBox( 108 | title: 'Rating', 109 | iconData: Icons.star, 110 | value: anime?.score == null 111 | ? 'Unknown' 112 | : anime!.score.toString(), 113 | ), 114 | IconBox( 115 | title: 'Rank', 116 | iconData: FontAwesomeIcons.trophy, 117 | value: anime?.rank == null 118 | ? 'Unknown' 119 | : anime!.rank.toString(), 120 | ), 121 | ], 122 | ), 123 | Row( 124 | mainAxisAlignment: 125 | MainAxisAlignment.spaceEvenly, 126 | children: [ 127 | IconBox( 128 | title: 'Duration', 129 | iconData: Icons.access_time_filled_sharp, 130 | value: anime?.duration == null 131 | ? 'Unknown' 132 | : anime!.duration.toString(), 133 | ), 134 | IconBox( 135 | title: 'Episodes', 136 | iconData: FontAwesomeIcons.film, 137 | value: anime?.episodes == null 138 | ? 'Unknown' 139 | : anime!.episodes.toString(), 140 | ), 141 | ], 142 | ), 143 | const SizedBox( 144 | height: 30, 145 | ), 146 | anime?.genres == null 147 | ? Container() 148 | : Wrap( 149 | spacing: 10, 150 | children: anime!.genres 151 | .map((genre) => Chip( 152 | label: Text( 153 | genre.name!, 154 | style: TakoTheme 155 | .darkTextTheme 156 | .subtitle1, 157 | ), 158 | // backgroundColor: tkDarkGreen, 159 | )) 160 | .toList(), 161 | ), 162 | const Divider(), 163 | Consumer( 164 | builder: (BuildContext context, navManager, 165 | Widget? child) { 166 | return SizedBox( 167 | height: 40, 168 | child: ListView( 169 | controller: _scrollController, 170 | scrollDirection: Axis.horizontal, 171 | children: [ 172 | NavItem( 173 | index: 0, 174 | onTap: () { 175 | navManager.goToNav(0); 176 | _goToElement(0); 177 | }, 178 | name: 'Synopsis', 179 | selectedIndex: 180 | navManager.selectedIndex, 181 | ), 182 | const SizedBox( 183 | width: 20, 184 | ), 185 | NavItem( 186 | index: 1, 187 | onTap: () { 188 | navManager.goToNav(1); 189 | _goToElement(1); 190 | }, 191 | name: 'Premiered', 192 | selectedIndex: 193 | navManager.selectedIndex, 194 | ), 195 | const SizedBox( 196 | width: 20, 197 | ), 198 | NavItem( 199 | index: 2, 200 | onTap: () { 201 | navManager.goToNav(2); 202 | _goToElement(2); 203 | }, 204 | name: 'Studio', 205 | selectedIndex: 206 | navManager.selectedIndex, 207 | ), 208 | const SizedBox( 209 | width: 20, 210 | ), 211 | NavItem( 212 | index: 3, 213 | onTap: () { 214 | navManager.goToNav(3); 215 | _goToElement(3); 216 | }, 217 | name: 'Theme Songs', 218 | selectedIndex: 219 | navManager.selectedIndex, 220 | ), 221 | const SizedBox( 222 | width: 20, 223 | ), 224 | NavItem( 225 | index: 4, 226 | onTap: () { 227 | navManager.goToNav(4); 228 | _goToElement(4); 229 | }, 230 | name: 'More', 231 | selectedIndex: 232 | navManager.selectedIndex, 233 | ), 234 | ], 235 | ), 236 | ); 237 | }, 238 | ), 239 | const SizedBox(height: 10), 240 | Expanded( 241 | child: Consumer( 242 | builder: (context, navManager, child) { 243 | if (navManager.selectedIndex == 0) { 244 | return SingleChildScrollView( 245 | child: Text( 246 | anime?.synopsis == null 247 | ? '' 248 | : anime!.synopsis.toString(), 249 | ), 250 | ); 251 | } else if (navManager.selectedIndex == 252 | 1) { 253 | return Text(anime?.premiered == null 254 | ? '' 255 | : anime!.premiered.toString()); 256 | } else if (navManager.selectedIndex == 257 | 2) { 258 | return anime?.studios == null 259 | ? Container() 260 | : ListView.builder( 261 | itemCount: 262 | anime!.studios!.length, 263 | itemBuilder: (context, index) { 264 | return Text(anime 265 | .studios![index].name!); 266 | }); 267 | } else if (navManager.selectedIndex == 268 | 3) { 269 | return ListView.builder( 270 | itemCount: 271 | getThemeSongs(anime!).length, 272 | itemBuilder: (context, index) { 273 | return Text( 274 | getThemeSongs(anime)[index]); 275 | }); 276 | } else if (navManager.selectedIndex == 277 | 4) { 278 | return ListView( 279 | children: [ 280 | BrowseItem( 281 | onTap: () { 282 | Navigator.of(context).push( 283 | MaterialPageRoute( 284 | builder: (context) => 285 | VoiceActorScreen( 286 | id: anime!.id!, 287 | ))); 288 | }, 289 | title: 'Voice Actors', 290 | iconData: FontAwesomeIcons 291 | .microphoneAlt, 292 | ), 293 | const SizedBox( 294 | height: 10, 295 | ), 296 | BrowseItem( 297 | onTap: () { 298 | Navigator.of(context).push( 299 | MaterialPageRoute( 300 | builder: (context) => 301 | VideoListScreen( 302 | id: anime!.id!, 303 | ))); 304 | }, 305 | title: 'Videos', 306 | iconData: FontAwesomeIcons.video, 307 | ), 308 | ], 309 | ); 310 | } else { 311 | return Container(); 312 | } 313 | }, 314 | ), 315 | ), 316 | const SizedBox(height: 20), 317 | ], 318 | ), 319 | ), 320 | ], 321 | ), 322 | ), 323 | ); 324 | } else { 325 | return Stack( 326 | fit: StackFit.expand, 327 | children: [ 328 | CachedNetworkImage( 329 | imageUrl: widget.imageUrl, 330 | fit: BoxFit.cover, 331 | ), 332 | BackdropFilter( 333 | filter: ImageFilter.blur( 334 | sigmaX: 8, 335 | sigmaY: 8, 336 | ), 337 | child: Container( 338 | color: Colors.black87, 339 | width: double.infinity, 340 | height: screenHeight, 341 | ), 342 | ), 343 | ], 344 | ); 345 | } 346 | }), 347 | ), 348 | ), 349 | ); 350 | } 351 | } 352 | 353 | class NavItem extends StatelessWidget { 354 | const NavItem({ 355 | required this.onTap, 356 | required this.name, 357 | required this.index, 358 | required this.selectedIndex, 359 | Key? key, 360 | }) : super(key: key); 361 | 362 | final Function()? onTap; 363 | final int selectedIndex; 364 | final int index; 365 | final String name; 366 | 367 | @override 368 | Widget build(BuildContext context) { 369 | return GestureDetector( 370 | onTap: onTap, 371 | child: AnimatedContainer( 372 | decoration: BoxDecoration( 373 | border: Border( 374 | bottom: BorderSide( 375 | color: selectedIndex == index ? tkDarkGreen : Colors.transparent, 376 | width: 4, 377 | ))), 378 | duration: const Duration(milliseconds: 300), 379 | child: Text( 380 | name, 381 | style: TakoTheme.darkTextTheme.headline6, 382 | ), 383 | ), 384 | ); 385 | } 386 | } 387 | 388 | class BrowseItem extends StatelessWidget { 389 | const BrowseItem({ 390 | required this.onTap, 391 | required this.title, 392 | required this.iconData, 393 | Key? key, 394 | }) : super(key: key); 395 | 396 | final IconData iconData; 397 | final String title; 398 | final Function()? onTap; 399 | 400 | @override 401 | Widget build(BuildContext context) { 402 | return Material( 403 | color: Colors.transparent, 404 | shadowColor: Colors.black54, 405 | child: InkWell( 406 | borderRadius: BorderRadius.circular(10), 407 | onTap: onTap, 408 | splashColor: tkDarkGreen, 409 | child: Container( 410 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(10)), 411 | child: Row( 412 | mainAxisAlignment: MainAxisAlignment.start, 413 | children: [ 414 | Icon(iconData), 415 | const SizedBox( 416 | width: 20, 417 | ), 418 | Container( 419 | padding: const EdgeInsets.symmetric(vertical: 10), 420 | child: Text(title), 421 | ), 422 | ], 423 | ), 424 | ), 425 | ), 426 | ); 427 | } 428 | } 429 | 430 | List getThemeSongs(Anime anime) { 431 | List totalResult = []; 432 | if (anime.openingThemes!.isNotEmpty) { 433 | totalResult.add('Opening Theme'); 434 | totalResult.add(''); 435 | for (var val in anime.openingThemes!) { 436 | totalResult.add(val); 437 | } 438 | totalResult.add(''); 439 | } 440 | if (anime.endingThemes!.isNotEmpty) { 441 | totalResult.add('Ending Theme'); 442 | totalResult.add(''); 443 | for (var val in anime.endingThemes!) { 444 | totalResult.add(val); 445 | } 446 | } 447 | 448 | return totalResult; 449 | } 450 | 451 | class IconBox extends StatelessWidget { 452 | const IconBox({ 453 | Key? key, 454 | required this.iconData, 455 | required this.title, 456 | required this.value, 457 | }) : super(key: key); 458 | 459 | final IconData iconData; 460 | final String title; 461 | final String value; 462 | 463 | @override 464 | Widget build(BuildContext context) { 465 | return Container( 466 | padding: const EdgeInsets.all(10), 467 | child: Column( 468 | children: [ 469 | Text( 470 | title, 471 | style: TakoTheme.darkTextTheme.headline6, 472 | ), 473 | const SizedBox( 474 | height: 5, 475 | ), 476 | Icon( 477 | iconData, 478 | semanticLabel: 'Score', 479 | color: tkLightGreen, 480 | ), 481 | const SizedBox( 482 | height: 5, 483 | ), 484 | Text( 485 | value, 486 | style: TakoTheme.darkTextTheme.headline3, 487 | ), 488 | ], 489 | ), 490 | ); 491 | } 492 | } 493 | --------------------------------------------------------------------------------