├── .github └── FUNDING.yml ├── .gitignore ├── .metadata ├── README.md ├── ScreenShots ├── 01.png ├── 02.png ├── 03.png ├── 04.png ├── 05.png └── 06.png ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutter_newsapp │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ ├── ic_launcher_background.xml │ │ │ └── launch_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 180.png │ │ ├── 29.png │ │ ├── 40.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 80.png │ │ ├── 87.png │ │ └── Contents.json │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── artical_news.dart ├── constants.dart ├── list_of_country.dart └── main.dart ├── pubspec.lock └── pubspec.yaml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | #custom: ["https://www.paypal.com/paypalme/jjgajjar?locale.x=en_GB"] 3 | github: [j-j-gajjar] 4 | -------------------------------------------------------------------------------- /.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 | /.vscode 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 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 18 | - platform: android 19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 21 | - platform: ios 22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 24 | - platform: linux 25 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 26 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 27 | - platform: macos 28 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 29 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 30 | - platform: web 31 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 32 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 33 | - platform: windows 34 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 35 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## News App Flutter [![GitHub stars](https://img.shields.io/github/stars/j-j-gajjar/FLUTTER_NewsApp?style=social)](https://github.com/login?return_to=%2Fj-j-gajjar%FLUTTER_NewsApp) ![GitHub forks](https://img.shields.io/github/forks/j-j-gajjar/FLUTTER_NewsApp?style=social) 2 | 3 | News App Flutter is a simple news app built with Flutter that displays top news from newsapi.org. The app includes a home page that displays top news, and a category page where users can choose from a range of news categories. The app also features a smooth and intuitive design with gestures and a seamless experience on both Android and iOS platforms. 4 | 5 | > [!IMPORTANT] 6 | > New News app is currently under construction using the Bloc pattern. 7 | > The Bloc implementation leverages various code generation packages for enhanced functionality and maintainability, including: 8 | > - auto_route_generator 9 | > - build_runner 10 | > - injectable_generator 11 | > - retrofit_generator 12 | > - freezed 13 | > - json_serializable 14 | > For more details and to follow the development progress, visit the [GitHub repository](https://github.com/j-j-gajjar/flutter_news_bloc). Contributions to this project are welcome! Feel free to fork the repository and submit pull requests. 15 | 16 | 17 | ## Todos 18 | 19 | - [x] Sound null safety 20 | - [x] News Home page 21 | - [x] Live News 22 | - [x] Select news category page 23 | - [x] Live News 24 | - [x] Sort By Category | Country | News Channel 25 | - [x] Beautiful UI with Dual themes, ie. Light Theme and Dark Theme 26 | - [x] Fetch news from API 27 | - [x] Parse complicated JSON. 28 | - [x] Find With Keyword 29 | - [x] Display full news detail 30 | 31 | [With GetX Project](https://github.com/j-j-gajjar/Flutter_News_App_Using_GetX_MVC) 32 | 33 | 34 | # Getting Started 35 | To get started with this project, follow these steps: 36 | 37 | * Clone the project to your local machine. 38 | * Open the project in your preferred IDE or text editor. 39 | * Run flutter pub get to install the required dependencies. 40 | 41 |
42 | 43 | 44 | 45 | 48 | 51 | 54 | 57 | 60 | 63 | 64 | 65 | 68 | 71 | 74 | 77 | 78 |
46 | Dark mode 47 | 49 | 50 | 52 | Light Mode 53 | 55 | 56 | 58 | Countries 59 | 61 | 62 |
66 | Category 67 | 69 | 70 | 72 | News Channels 73 | 75 | 76 |
79 | 80 | # Contributing 81 | Contributions are welcome and encouraged! If you find a bug, have a suggestion for improvement, or want to add a feature, feel free to submit a pull request or open an issue. 82 | -------------------------------------------------------------------------------- /ScreenShots/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ScreenShots/01.png -------------------------------------------------------------------------------- /ScreenShots/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ScreenShots/02.png -------------------------------------------------------------------------------- /ScreenShots/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ScreenShots/03.png -------------------------------------------------------------------------------- /ScreenShots/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ScreenShots/04.png -------------------------------------------------------------------------------- /ScreenShots/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ScreenShots/05.png -------------------------------------------------------------------------------- /ScreenShots/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ScreenShots/06.png -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | analyzer: 2 | language: 3 | strict-casts: true 4 | strict-raw-types: true 5 | errors: 6 | missing_required_param: warning 7 | missing_return: warning 8 | todo: ignore 9 | deprecated_member_use_from_same_package: ignore 10 | unnecessary_null_comparison: ignore 11 | exclude: 12 | - "bin/cache/**" 13 | - "dev/conductor/lib/proto/*" 14 | 15 | linter: 16 | rules: 17 | - always_declare_return_types 18 | - always_put_control_body_on_new_line 19 | - always_require_non_null_named_parameters 20 | - annotate_overrides 21 | - avoid_bool_literals_in_conditional_expressions 22 | - avoid_classes_with_only_static_members 23 | - avoid_double_and_int_checks 24 | - avoid_empty_else 25 | - avoid_equals_and_hash_code_on_mutable_classes 26 | - avoid_escaping_inner_quotes 27 | - avoid_field_initializers_in_const_classes 28 | - avoid_function_literals_in_foreach_calls 29 | - avoid_implementing_value_types 30 | - avoid_init_to_null 31 | - avoid_js_rounded_ints 32 | - avoid_null_checks_in_equality_operators 33 | - avoid_print 34 | - avoid_redundant_argument_values 35 | - avoid_relative_lib_imports 36 | - avoid_renaming_method_parameters 37 | - avoid_return_types_on_setters 38 | - avoid_returning_null_for_future 39 | - avoid_returning_null_for_void 40 | - avoid_setters_without_getters 41 | - avoid_shadowing_type_parameters 42 | - avoid_single_cascade_in_expression_statements 43 | - avoid_slow_async_io 44 | - avoid_type_to_string 45 | - avoid_types_as_parameter_names 46 | - avoid_unnecessary_containers 47 | - avoid_unused_constructor_parameters 48 | - avoid_void_async 49 | - await_only_futures 50 | - camel_case_extensions 51 | - camel_case_types 52 | - cancel_subscriptions 53 | - cast_nullable_to_non_nullable 54 | - control_flow_in_finally 55 | - depend_on_referenced_packages 56 | - deprecated_consistency 57 | - directives_ordering 58 | - empty_catches 59 | - empty_constructor_bodies 60 | - empty_statements 61 | - eol_at_end_of_file 62 | - exhaustive_cases 63 | - file_names 64 | - flutter_style_todos 65 | - hash_and_equals 66 | - implementation_imports 67 | - iterable_contains_unrelated_type 68 | - leading_newlines_in_multiline_strings 69 | - library_names 70 | - library_prefixes 71 | - list_remove_unrelated_type 72 | - missing_whitespace_between_adjacent_strings 73 | - no_adjacent_strings_in_list 74 | - no_default_cases 75 | - no_duplicate_case_values 76 | - no_leading_underscores_for_library_prefixes 77 | - no_leading_underscores_for_local_identifiers 78 | - no_logic_in_create_state 79 | - non_constant_identifier_names 80 | - noop_primitive_operations 81 | - null_check_on_nullable_type_parameter 82 | - null_closures 83 | - only_throw_errors # this does get disabled in a few places where we have legacy code that uses strings et al 84 | - overridden_fields 85 | - package_api_docs 86 | - package_names 87 | - package_prefixed_library_names 88 | - prefer_adjacent_string_concatenation 89 | - prefer_asserts_in_initializer_lists 90 | - prefer_collection_literals 91 | - prefer_conditional_assignment 92 | - prefer_const_constructors 93 | - prefer_const_constructors_in_immutables 94 | - prefer_const_declarations 95 | - prefer_const_literals_to_create_immutables 96 | - prefer_contains 97 | - prefer_equal_for_default_values 98 | - prefer_final_fields 99 | - prefer_final_locals 100 | - prefer_for_elements_to_map_fromIterable 101 | - prefer_function_declarations_over_variables 102 | - prefer_generic_function_type_aliases 103 | - prefer_if_elements_to_conditional_expressions 104 | - prefer_if_null_operators 105 | - prefer_initializing_formals 106 | - prefer_inlined_adds 107 | # - prefer_int_literals # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#use-double-literals-for-double-constants 108 | - prefer_interpolation_to_compose_strings 109 | - prefer_is_empty 110 | - prefer_is_not_empty 111 | - prefer_is_not_operator 112 | - prefer_iterable_whereType 113 | - prefer_null_aware_operators 114 | - prefer_relative_imports 115 | - prefer_single_quotes 116 | - prefer_spread_collections 117 | - prefer_typing_uninitialized_variables 118 | - prefer_void_to_null 119 | - provide_deprecation_message 120 | - recursive_getters 121 | - secure_pubspec_urls 122 | - sized_box_for_whitespace 123 | - slash_for_doc_comments 124 | - sort_child_properties_last 125 | - sort_constructors_first 126 | - sort_unnamed_constructors_first 127 | - test_types_in_equals 128 | - throw_in_finally 129 | - tighten_type_of_initializing_formals 130 | - type_init_formals 131 | - unnecessary_await_in_return 132 | - unnecessary_brace_in_string_interps 133 | - unnecessary_const 134 | - unnecessary_constructor_name 135 | - unnecessary_getters_setters 136 | - unnecessary_late 137 | - unnecessary_new 138 | - unnecessary_null_aware_assignments 139 | - unnecessary_null_checks 140 | - unnecessary_null_in_if_null_operators 141 | - unnecessary_nullable_for_final_variable_declarations 142 | - unnecessary_overrides 143 | - unnecessary_parenthesis 144 | - unnecessary_statements 145 | - unnecessary_string_escapes 146 | - unnecessary_string_interpolations 147 | - unnecessary_this 148 | - unrelated_type_equality_checks 149 | - unsafe_html 150 | - use_build_context_synchronously 151 | - use_full_hex_values_for_flutter_colors 152 | - use_function_type_syntax_for_parameters 153 | - use_if_null_to_convert_nulls_to_bools 154 | - use_is_even_rather_than_modulo 155 | - use_key_in_widget_constructors 156 | - use_late_for_private_fields_and_variables 157 | - use_named_constants 158 | - use_raw_strings 159 | - use_rethrow_when_possible 160 | - use_setters_to_change_properties 161 | - use_super_parameters 162 | - use_test_throws_matchers 163 | - valid_regexps 164 | - void_checks -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.flutter_newsapp" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion 21 51 | targetSdkVersion 30 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 16 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_newsapp/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_newsapp 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 75 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /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-7.4-all.zip 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - FMDB (2.7.5): 4 | - FMDB/standard (= 2.7.5) 5 | - FMDB/standard (2.7.5) 6 | - path_provider_ios (0.0.1): 7 | - Flutter 8 | - sqflite (0.0.2): 9 | - Flutter 10 | - FMDB (>= 2.7.5) 11 | - webview_flutter_wkwebview (0.0.1): 12 | - Flutter 13 | 14 | DEPENDENCIES: 15 | - Flutter (from `Flutter`) 16 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) 17 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 18 | - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) 19 | 20 | SPEC REPOS: 21 | trunk: 22 | - FMDB 23 | 24 | EXTERNAL SOURCES: 25 | Flutter: 26 | :path: Flutter 27 | path_provider_ios: 28 | :path: ".symlinks/plugins/path_provider_ios/ios" 29 | sqflite: 30 | :path: ".symlinks/plugins/sqflite/ios" 31 | webview_flutter_wkwebview: 32 | :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" 33 | 34 | SPEC CHECKSUMS: 35 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 36 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 37 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 38 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 39 | webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f 40 | 41 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 42 | 43 | COCOAPODS: 1.11.3 44 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 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 | 4F55F4DBEC7711FD3E9AA321 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3392F0E1E540D619C6506E7 /* Pods_Runner.framework */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 36 | 44C2B96505B3BB86EEAB5387 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 37 | 48E56C8A0E13A27F54D51C14 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 805E054CCDA21A240D3A5DEF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | E3392F0E1E540D619C6506E7 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 4F55F4DBEC7711FD3E9AA321 /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 4D5717BA062C63E34902D9EB /* Frameworks */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | E3392F0E1E540D619C6506E7 /* Pods_Runner.framework */, 68 | ); 69 | name = Frameworks; 70 | sourceTree = ""; 71 | }; 72 | 9740EEB11CF90186004384FC /* Flutter */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 77 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 78 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 79 | ); 80 | name = Flutter; 81 | sourceTree = ""; 82 | }; 83 | 97C146E51CF9000F007C117D = { 84 | isa = PBXGroup; 85 | children = ( 86 | 9740EEB11CF90186004384FC /* Flutter */, 87 | 97C146F01CF9000F007C117D /* Runner */, 88 | 97C146EF1CF9000F007C117D /* Products */, 89 | EC2163D68F7046A21E960062 /* Pods */, 90 | 4D5717BA062C63E34902D9EB /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 108 | 97C147021CF9000F007C117D /* Info.plist */, 109 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 110 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 111 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 112 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 113 | ); 114 | path = Runner; 115 | sourceTree = ""; 116 | }; 117 | EC2163D68F7046A21E960062 /* Pods */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 44C2B96505B3BB86EEAB5387 /* Pods-Runner.debug.xcconfig */, 121 | 48E56C8A0E13A27F54D51C14 /* Pods-Runner.release.xcconfig */, 122 | 805E054CCDA21A240D3A5DEF /* Pods-Runner.profile.xcconfig */, 123 | ); 124 | path = Pods; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXNativeTarget section */ 130 | 97C146ED1CF9000F007C117D /* Runner */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 133 | buildPhases = ( 134 | 560F8473B12B180F6A5E3734 /* [CP] Check Pods Manifest.lock */, 135 | 9740EEB61CF901F6004384FC /* Run Script */, 136 | 97C146EA1CF9000F007C117D /* Sources */, 137 | 97C146EB1CF9000F007C117D /* Frameworks */, 138 | 97C146EC1CF9000F007C117D /* Resources */, 139 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 140 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 141 | 218000B4F0EFB8B16C4CE285 /* [CP] Embed Pods Frameworks */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = Runner; 148 | productName = Runner; 149 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | /* End PBXNativeTarget section */ 153 | 154 | /* Begin PBXProject section */ 155 | 97C146E61CF9000F007C117D /* Project object */ = { 156 | isa = PBXProject; 157 | attributes = { 158 | LastUpgradeCheck = 1300; 159 | ORGANIZATIONNAME = ""; 160 | TargetAttributes = { 161 | 97C146ED1CF9000F007C117D = { 162 | CreatedOnToolsVersion = 7.3.1; 163 | LastSwiftMigration = 1100; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 9.3"; 169 | developmentRegion = en; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 191 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 192 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 193 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXResourcesBuildPhase section */ 198 | 199 | /* Begin PBXShellScriptBuildPhase section */ 200 | 218000B4F0EFB8B16C4CE285 /* [CP] Embed Pods Frameworks */ = { 201 | isa = PBXShellScriptBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | ); 205 | inputFileListPaths = ( 206 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 207 | ); 208 | name = "[CP] Embed Pods Frameworks"; 209 | outputFileListPaths = ( 210 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | shellPath = /bin/sh; 214 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 215 | showEnvVarsInLog = 0; 216 | }; 217 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | name = "Thin Binary"; 225 | outputPaths = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 230 | }; 231 | 560F8473B12B180F6A5E3734 /* [CP] Check Pods Manifest.lock */ = { 232 | isa = PBXShellScriptBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | ); 236 | inputFileListPaths = ( 237 | ); 238 | inputPaths = ( 239 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 240 | "${PODS_ROOT}/Manifest.lock", 241 | ); 242 | name = "[CP] Check Pods Manifest.lock"; 243 | outputFileListPaths = ( 244 | ); 245 | outputPaths = ( 246 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | shellPath = /bin/sh; 250 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 251 | showEnvVarsInLog = 0; 252 | }; 253 | 9740EEB61CF901F6004384FC /* Run Script */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | ); 260 | name = "Run Script"; 261 | outputPaths = ( 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | shellPath = /bin/sh; 265 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 266 | }; 267 | /* End PBXShellScriptBuildPhase section */ 268 | 269 | /* Begin PBXSourcesBuildPhase section */ 270 | 97C146EA1CF9000F007C117D /* Sources */ = { 271 | isa = PBXSourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 275 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXSourcesBuildPhase section */ 280 | 281 | /* Begin PBXVariantGroup section */ 282 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 283 | isa = PBXVariantGroup; 284 | children = ( 285 | 97C146FB1CF9000F007C117D /* Base */, 286 | ); 287 | name = Main.storyboard; 288 | sourceTree = ""; 289 | }; 290 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 291 | isa = PBXVariantGroup; 292 | children = ( 293 | 97C147001CF9000F007C117D /* Base */, 294 | ); 295 | name = LaunchScreen.storyboard; 296 | sourceTree = ""; 297 | }; 298 | /* End PBXVariantGroup section */ 299 | 300 | /* Begin XCBuildConfiguration section */ 301 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ALWAYS_SEARCH_USER_PATHS = NO; 305 | CLANG_ANALYZER_NONNULL = YES; 306 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 307 | CLANG_CXX_LIBRARY = "libc++"; 308 | CLANG_ENABLE_MODULES = YES; 309 | CLANG_ENABLE_OBJC_ARC = YES; 310 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 311 | CLANG_WARN_BOOL_CONVERSION = YES; 312 | CLANG_WARN_COMMA = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 316 | CLANG_WARN_EMPTY_BODY = YES; 317 | CLANG_WARN_ENUM_CONVERSION = YES; 318 | CLANG_WARN_INFINITE_RECURSION = YES; 319 | CLANG_WARN_INT_CONVERSION = YES; 320 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 321 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 322 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 324 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 325 | CLANG_WARN_STRICT_PROTOTYPES = YES; 326 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 327 | CLANG_WARN_UNREACHABLE_CODE = YES; 328 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 329 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 330 | COPY_PHASE_STRIP = NO; 331 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 332 | ENABLE_NS_ASSERTIONS = NO; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | GCC_C_LANGUAGE_STANDARD = gnu99; 335 | GCC_NO_COMMON_BLOCKS = YES; 336 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 337 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 338 | GCC_WARN_UNDECLARED_SELECTOR = YES; 339 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 340 | GCC_WARN_UNUSED_FUNCTION = YES; 341 | GCC_WARN_UNUSED_VARIABLE = YES; 342 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 343 | MTL_ENABLE_DEBUG_INFO = NO; 344 | SDKROOT = iphoneos; 345 | SUPPORTED_PLATFORMS = iphoneos; 346 | TARGETED_DEVICE_FAMILY = "1,2"; 347 | VALIDATE_PRODUCT = YES; 348 | }; 349 | name = Profile; 350 | }; 351 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 352 | isa = XCBuildConfiguration; 353 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 354 | buildSettings = { 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | CLANG_ENABLE_MODULES = YES; 357 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 358 | DEVELOPMENT_TEAM = U7392ZFZYM; 359 | ENABLE_BITCODE = NO; 360 | INFOPLIST_FILE = Runner/Info.plist; 361 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 362 | LD_RUNPATH_SEARCH_PATHS = ( 363 | "$(inherited)", 364 | "@executable_path/Frameworks", 365 | ); 366 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterNewsapp; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 369 | SWIFT_VERSION = 5.0; 370 | VERSIONING_SYSTEM = "apple-generic"; 371 | }; 372 | name = Profile; 373 | }; 374 | 97C147031CF9000F007C117D /* Debug */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | ALWAYS_SEARCH_USER_PATHS = NO; 378 | CLANG_ANALYZER_NONNULL = YES; 379 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 380 | CLANG_CXX_LIBRARY = "libc++"; 381 | CLANG_ENABLE_MODULES = YES; 382 | CLANG_ENABLE_OBJC_ARC = YES; 383 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 384 | CLANG_WARN_BOOL_CONVERSION = YES; 385 | CLANG_WARN_COMMA = YES; 386 | CLANG_WARN_CONSTANT_CONVERSION = YES; 387 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 388 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 389 | CLANG_WARN_EMPTY_BODY = YES; 390 | CLANG_WARN_ENUM_CONVERSION = YES; 391 | CLANG_WARN_INFINITE_RECURSION = YES; 392 | CLANG_WARN_INT_CONVERSION = YES; 393 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 394 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 395 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 397 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 398 | CLANG_WARN_STRICT_PROTOTYPES = YES; 399 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 400 | CLANG_WARN_UNREACHABLE_CODE = YES; 401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 402 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 403 | COPY_PHASE_STRIP = NO; 404 | DEBUG_INFORMATION_FORMAT = dwarf; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | ENABLE_TESTABILITY = YES; 407 | GCC_C_LANGUAGE_STANDARD = gnu99; 408 | GCC_DYNAMIC_NO_PIC = NO; 409 | GCC_NO_COMMON_BLOCKS = YES; 410 | GCC_OPTIMIZATION_LEVEL = 0; 411 | GCC_PREPROCESSOR_DEFINITIONS = ( 412 | "DEBUG=1", 413 | "$(inherited)", 414 | ); 415 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 416 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 417 | GCC_WARN_UNDECLARED_SELECTOR = YES; 418 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 419 | GCC_WARN_UNUSED_FUNCTION = YES; 420 | GCC_WARN_UNUSED_VARIABLE = YES; 421 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 422 | MTL_ENABLE_DEBUG_INFO = YES; 423 | ONLY_ACTIVE_ARCH = YES; 424 | SDKROOT = iphoneos; 425 | TARGETED_DEVICE_FAMILY = "1,2"; 426 | }; 427 | name = Debug; 428 | }; 429 | 97C147041CF9000F007C117D /* Release */ = { 430 | isa = XCBuildConfiguration; 431 | buildSettings = { 432 | ALWAYS_SEARCH_USER_PATHS = NO; 433 | CLANG_ANALYZER_NONNULL = YES; 434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 435 | CLANG_CXX_LIBRARY = "libc++"; 436 | CLANG_ENABLE_MODULES = YES; 437 | CLANG_ENABLE_OBJC_ARC = YES; 438 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 439 | CLANG_WARN_BOOL_CONVERSION = YES; 440 | CLANG_WARN_COMMA = YES; 441 | CLANG_WARN_CONSTANT_CONVERSION = YES; 442 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 443 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 444 | CLANG_WARN_EMPTY_BODY = YES; 445 | CLANG_WARN_ENUM_CONVERSION = YES; 446 | CLANG_WARN_INFINITE_RECURSION = YES; 447 | CLANG_WARN_INT_CONVERSION = YES; 448 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 449 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 450 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 452 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 453 | CLANG_WARN_STRICT_PROTOTYPES = YES; 454 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 455 | CLANG_WARN_UNREACHABLE_CODE = YES; 456 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 458 | COPY_PHASE_STRIP = NO; 459 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 460 | ENABLE_NS_ASSERTIONS = NO; 461 | ENABLE_STRICT_OBJC_MSGSEND = YES; 462 | GCC_C_LANGUAGE_STANDARD = gnu99; 463 | GCC_NO_COMMON_BLOCKS = YES; 464 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 465 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 466 | GCC_WARN_UNDECLARED_SELECTOR = YES; 467 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 468 | GCC_WARN_UNUSED_FUNCTION = YES; 469 | GCC_WARN_UNUSED_VARIABLE = YES; 470 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 471 | MTL_ENABLE_DEBUG_INFO = NO; 472 | SDKROOT = iphoneos; 473 | SUPPORTED_PLATFORMS = iphoneos; 474 | SWIFT_COMPILATION_MODE = wholemodule; 475 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 476 | TARGETED_DEVICE_FAMILY = "1,2"; 477 | VALIDATE_PRODUCT = YES; 478 | }; 479 | name = Release; 480 | }; 481 | 97C147061CF9000F007C117D /* Debug */ = { 482 | isa = XCBuildConfiguration; 483 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 484 | buildSettings = { 485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 486 | CLANG_ENABLE_MODULES = YES; 487 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 488 | DEVELOPMENT_TEAM = U7392ZFZYM; 489 | ENABLE_BITCODE = NO; 490 | INFOPLIST_FILE = Runner/Info.plist; 491 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 492 | LD_RUNPATH_SEARCH_PATHS = ( 493 | "$(inherited)", 494 | "@executable_path/Frameworks", 495 | ); 496 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterNewsapp; 497 | PRODUCT_NAME = "$(TARGET_NAME)"; 498 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 499 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 500 | SWIFT_VERSION = 5.0; 501 | VERSIONING_SYSTEM = "apple-generic"; 502 | }; 503 | name = Debug; 504 | }; 505 | 97C147071CF9000F007C117D /* Release */ = { 506 | isa = XCBuildConfiguration; 507 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 508 | buildSettings = { 509 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 510 | CLANG_ENABLE_MODULES = YES; 511 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 512 | DEVELOPMENT_TEAM = U7392ZFZYM; 513 | ENABLE_BITCODE = NO; 514 | INFOPLIST_FILE = Runner/Info.plist; 515 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 516 | LD_RUNPATH_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "@executable_path/Frameworks", 519 | ); 520 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterNewsapp; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 523 | SWIFT_VERSION = 5.0; 524 | VERSIONING_SYSTEM = "apple-generic"; 525 | }; 526 | name = Release; 527 | }; 528 | /* End XCBuildConfiguration section */ 529 | 530 | /* Begin XCConfigurationList section */ 531 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 532 | isa = XCConfigurationList; 533 | buildConfigurations = ( 534 | 97C147031CF9000F007C117D /* Debug */, 535 | 97C147041CF9000F007C117D /* Release */, 536 | 249021D3217E4FDB00AE95B9 /* Profile */, 537 | ); 538 | defaultConfigurationIsVisible = 0; 539 | defaultConfigurationName = Release; 540 | }; 541 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 542 | isa = XCConfigurationList; 543 | buildConfigurations = ( 544 | 97C147061CF9000F007C117D /* Debug */, 545 | 97C147071CF9000F007C117D /* Release */, 546 | 249021D4217E4FDB00AE95B9 /* Profile */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | defaultConfigurationName = Release; 550 | }; 551 | /* End XCConfigurationList section */ 552 | }; 553 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 554 | } 555 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "40.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "60.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "29.png", 17 | "idiom" : "iphone", 18 | "scale" : "1x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "58.png", 23 | "idiom" : "iphone", 24 | "scale" : "2x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "87.png", 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "29x29" 32 | }, 33 | { 34 | "filename" : "80.png", 35 | "idiom" : "iphone", 36 | "scale" : "2x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "120.png", 41 | "idiom" : "iphone", 42 | "scale" : "3x", 43 | "size" : "40x40" 44 | }, 45 | { 46 | "filename" : "57.png", 47 | "idiom" : "iphone", 48 | "scale" : "1x", 49 | "size" : "57x57" 50 | }, 51 | { 52 | "filename" : "114.png", 53 | "idiom" : "iphone", 54 | "scale" : "2x", 55 | "size" : "57x57" 56 | }, 57 | { 58 | "filename" : "120.png", 59 | "idiom" : "iphone", 60 | "scale" : "2x", 61 | "size" : "60x60" 62 | }, 63 | { 64 | "filename" : "180.png", 65 | "idiom" : "iphone", 66 | "scale" : "3x", 67 | "size" : "60x60" 68 | }, 69 | { 70 | "filename" : "1024.png", 71 | "idiom" : "ios-marketing", 72 | "scale" : "1x", 73 | "size" : "1024x1024" 74 | } 75 | ], 76 | "info" : { 77 | "author" : "xcode", 78 | "version" : 1 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/j-j-gajjar/FLUTTER_NewsApp/59a8921708ce10ec006b7990e27bfce8d7c92b51/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Newsapp 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_newsapp 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | io.flutter.embedded_views_preview 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | CADisableMinimumFrameDurationOnPhone 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/artical_news.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:webview_flutter/webview_flutter.dart'; 5 | 6 | class ArticalNews extends StatefulWidget { 7 | const ArticalNews({super.key, required this.newsUrl}); 8 | final String newsUrl; 9 | @override 10 | _ArticalNewsState createState() => _ArticalNewsState(); 11 | } 12 | 13 | class _ArticalNewsState extends State { 14 | final Completer _completer = 15 | Completer(); 16 | late bool _isLoadingPage; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | _isLoadingPage = true; 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: AppBar(centerTitle: true, title: const Text('News',),), 28 | body: Stack( 29 | children: [ 30 | WebView( 31 | initialUrl: widget.newsUrl, 32 | javascriptMode: JavascriptMode.unrestricted, 33 | onWebViewCreated: (WebViewController controller) { 34 | _completer.complete(controller); 35 | }, 36 | onPageFinished: (String finish) => 37 | setState(() => _isLoadingPage = false), 38 | ), 39 | if (_isLoadingPage) 40 | Container( 41 | alignment: FractionalOffset.center, 42 | child: const CircularProgressIndicator( 43 | backgroundColor: Colors.yellow, 44 | ), 45 | ) 46 | else 47 | SizedBox.shrink() 48 | ], 49 | ), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/constants.dart: -------------------------------------------------------------------------------- 1 | const String apiKey = '58b98b48d2c74d9c94dd5dc296ccf7b6'; 2 | -------------------------------------------------------------------------------- /lib/list_of_country.dart: -------------------------------------------------------------------------------- 1 | const List> listOfCountry = [ 2 | {'name': 'INDIA', 'code': 'in'}, 3 | {'name': 'USA', 'code': 'us'}, 4 | {'name': 'MEXICO', 'code': 'mx'}, 5 | {'name': 'United Arab Emirates', 'code': 'ae'}, 6 | {'name': 'New Zealand', 'code': 'nz'}, 7 | {'name': 'Israel', 'code': 'il'}, 8 | {'name': 'Indonesia', 'code': 'id'}, 9 | ]; 10 | 11 | const List> listOfCategory = [ 12 | {'name': 'science', 'code': 'science'}, 13 | {'name': 'business', 'code': 'business'}, 14 | {'name': 'technology', 'code': 'technology'}, 15 | {'name': 'sports', 'code': 'sports'}, 16 | {'name': 'health', 'code': 'health'}, 17 | {'name': 'general', 'code': 'general'}, 18 | {'name': 'entertainment', 'code': 'entertainment'}, 19 | {'name': 'ALL', 'code': null}, 20 | ]; 21 | const List> listOfNewsChannel = [ 22 | {'name': 'BBC News', 'code': 'bbc-news'}, 23 | {'name': 'The Times of India', 'code': 'the-times-of-india'}, 24 | {'code': 'politico', 'name': 'politico'}, 25 | {'code': 'the-washington-post', 'name': 'The Washington Post'}, 26 | {'code': 'reuters', 'name': 'reuters'}, 27 | {'code': 'cnn', 'name': 'cnn'}, 28 | {'code': 'nbc-news', 'name': 'nbc news'}, 29 | {'code': 'the-hill', 'name': 'The Hill'}, 30 | {'code': 'fox-news', 'name': 'Fox News'}, 31 | {'code': 'fox-news', 'name': 'Fox News'}, 32 | ]; 33 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'artical_news.dart'; 8 | import 'constants.dart'; 9 | import 'list_of_country.dart'; 10 | 11 | void main() => runApp(const MyApp()); 12 | 13 | GlobalKey _scaffoldKey = GlobalKey(); 14 | 15 | void toggleDrawer() { 16 | if (_scaffoldKey.currentState?.isDrawerOpen ?? false) { 17 | _scaffoldKey.currentState?.openEndDrawer(); 18 | } else { 19 | _scaffoldKey.currentState?.openDrawer(); 20 | } 21 | } 22 | 23 | class DropDownList extends StatelessWidget { 24 | const DropDownList({super.key, required this.name, required this.call}); 25 | final String name; 26 | final Function call; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return GestureDetector( 31 | child: ListTile(title: Text(name)), 32 | onTap: () => call(), 33 | ); 34 | } 35 | } 36 | 37 | class MyApp extends StatefulWidget { 38 | const MyApp({super.key}); 39 | 40 | @override 41 | _MyAppState createState() => _MyAppState(); 42 | } 43 | 44 | class _MyAppState extends State { 45 | dynamic cName; 46 | dynamic country; 47 | dynamic category; 48 | dynamic findNews; 49 | int pageNum = 1; 50 | bool isPageLoading = false; 51 | late ScrollController controller; 52 | int pageSize = 10; 53 | bool isSwitched = false; 54 | List news = []; 55 | bool notFound = false; 56 | List data = []; 57 | bool isLoading = false; 58 | String baseApi = 'https://newsapi.org/v2/top-headlines?'; 59 | 60 | @override 61 | Widget build(BuildContext context) { 62 | return MaterialApp( 63 | debugShowCheckedModeBanner: false, 64 | title: 'News', 65 | theme: isSwitched 66 | ? ThemeData( 67 | fontFamily: GoogleFonts.poppins().fontFamily, 68 | brightness: Brightness.light, 69 | ) 70 | : ThemeData( 71 | fontFamily: GoogleFonts.poppins().fontFamily, 72 | brightness: Brightness.dark, 73 | ), 74 | home: Scaffold( 75 | key: _scaffoldKey, 76 | drawer: Drawer( 77 | child: ListView( 78 | padding: const EdgeInsets.symmetric(vertical: 32), 79 | children: [ 80 | Column( 81 | crossAxisAlignment: CrossAxisAlignment.start, 82 | children: [ 83 | if (country != null) 84 | Text('Country = $cName') 85 | else 86 | Container(), 87 | const SizedBox(height: 10), 88 | if (category != null) 89 | Text('Category = $category') 90 | else 91 | Container(), 92 | const SizedBox(height: 20), 93 | ], 94 | ), 95 | ListTile( 96 | title: TextFormField( 97 | decoration: const InputDecoration(hintText: 'Find Keyword'), 98 | scrollPadding: const EdgeInsets.all(5), 99 | onChanged: (String val) => setState(() => findNews = val), 100 | ), 101 | trailing: IconButton( 102 | onPressed: () async => getNews(searchKey: findNews as String), 103 | icon: const Icon(Icons.search), 104 | ), 105 | ), 106 | ExpansionTile( 107 | title: const Text('Country'), 108 | children: [ 109 | for (int i = 0; i < listOfCountry.length; i++) 110 | DropDownList( 111 | call: () { 112 | country = listOfCountry[i]['code']; 113 | cName = listOfCountry[i]['name']!.toUpperCase(); 114 | getNews(); 115 | }, 116 | name: listOfCountry[i]['name']!.toUpperCase(), 117 | ), 118 | ], 119 | ), 120 | ExpansionTile( 121 | title: const Text('Category'), 122 | children: [ 123 | for (int i = 0; i < listOfCategory.length; i++) 124 | DropDownList( 125 | call: () { 126 | category = listOfCategory[i]['code']; 127 | getNews(); 128 | }, 129 | name: listOfCategory[i]['name']!.toUpperCase(), 130 | ) 131 | ], 132 | ), 133 | ExpansionTile( 134 | title: const Text('Channel'), 135 | children: [ 136 | for (int i = 0; i < listOfNewsChannel.length; i++) 137 | DropDownList( 138 | call: () => 139 | getNews(channel: listOfNewsChannel[i]['code']), 140 | name: listOfNewsChannel[i]['name']!.toUpperCase(), 141 | ), 142 | ], 143 | ), 144 | //ListTile(title: Text("Exit"), onTap: () => exit(0)), 145 | ], 146 | ), 147 | ), 148 | appBar: AppBar( 149 | centerTitle: true, 150 | title: const Text('News'), 151 | actions: [ 152 | IconButton( 153 | onPressed: () { 154 | country = null; 155 | category = null; 156 | findNews = null; 157 | cName = null; 158 | getNews(reload: true); 159 | }, 160 | icon: const Icon(Icons.refresh), 161 | ), 162 | Switch( 163 | value: isSwitched, 164 | onChanged: (bool value) => setState(() => isSwitched = value), 165 | activeTrackColor: Colors.white, 166 | activeColor: Colors.white, 167 | ), 168 | ], 169 | ), 170 | body: notFound 171 | ? const Center( 172 | child: Text('Not Found', style: TextStyle(fontSize: 30)), 173 | ) 174 | : news.isEmpty 175 | ? const Center( 176 | child: CircularProgressIndicator( 177 | backgroundColor: Colors.yellow, 178 | ), 179 | ) 180 | : ListView.builder( 181 | controller: controller, 182 | itemBuilder: (BuildContext context, int index) { 183 | return Column( 184 | children: [ 185 | Padding( 186 | padding: const EdgeInsets.all(5), 187 | child: Card( 188 | elevation: 5, 189 | shape: RoundedRectangleBorder( 190 | borderRadius: BorderRadius.circular(20), 191 | ), 192 | child: GestureDetector( 193 | onTap: () async { 194 | Navigator.push( 195 | context, 196 | MaterialPageRoute( 197 | fullscreenDialog: true, 198 | builder: (BuildContext context) => 199 | ArticalNews( 200 | newsUrl: news[index]['url'] as String, 201 | ), 202 | ), 203 | ); 204 | }, 205 | child: Container( 206 | padding: const EdgeInsets.symmetric( 207 | vertical: 10, 208 | horizontal: 15, 209 | ), 210 | decoration: BoxDecoration( 211 | borderRadius: BorderRadius.circular(30), 212 | ), 213 | child: Column( 214 | children: [ 215 | Stack( 216 | children: [ 217 | if (news[index]['urlToImage'] == null) 218 | Container() 219 | else 220 | ClipRRect( 221 | borderRadius: 222 | BorderRadius.circular(20), 223 | child: CachedNetworkImage( 224 | placeholder: 225 | (BuildContext context, 226 | String url) => 227 | Container(), 228 | errorWidget: 229 | (BuildContext context, 230 | String url, 231 | error) => 232 | const SizedBox(), 233 | imageUrl: news[index] 234 | ['urlToImage'] as String, 235 | ), 236 | ), 237 | Positioned( 238 | bottom: 8, 239 | right: 8, 240 | child: Card( 241 | elevation: 0, 242 | color: Theme.of(context) 243 | .primaryColor 244 | .withOpacity(0.8), 245 | child: Padding( 246 | padding: 247 | const EdgeInsets.symmetric( 248 | horizontal: 10, 249 | vertical: 8, 250 | ), 251 | child: Text( 252 | "${news[index]['source']['name']}", 253 | style: Theme.of(context) 254 | .textTheme 255 | .subtitle2, 256 | ), 257 | ), 258 | ), 259 | ), 260 | ], 261 | ), 262 | const Divider(), 263 | Text( 264 | "${news[index]['title']}", 265 | style: const TextStyle( 266 | fontWeight: FontWeight.bold, 267 | fontSize: 18, 268 | ), 269 | ) 270 | ], 271 | ), 272 | ), 273 | ), 274 | ), 275 | ), 276 | if (index == news.length - 1 && isLoading) 277 | const Center( 278 | child: CircularProgressIndicator( 279 | backgroundColor: Colors.yellow, 280 | ), 281 | ) 282 | else 283 | const SizedBox(), 284 | ], 285 | ); 286 | }, 287 | itemCount: news.length, 288 | ), 289 | ), 290 | ); 291 | } 292 | 293 | Future getDataFromApi(String url) async { 294 | final http.Response res = await http.get(Uri.parse(url)); 295 | if (res.statusCode == 200) { 296 | if (jsonDecode(res.body)['totalResults'] == 0) { 297 | notFound = !isLoading; 298 | setState(() => isLoading = false); 299 | } else { 300 | if (isLoading) { 301 | final newData = jsonDecode(res.body)['articles'] as List; 302 | for (final e in newData) { 303 | news.add(e); 304 | } 305 | } else { 306 | news = jsonDecode(res.body)['articles'] as List; 307 | } 308 | setState(() { 309 | notFound = false; 310 | isLoading = false; 311 | }); 312 | } 313 | } else { 314 | setState(() => notFound = true); 315 | } 316 | } 317 | 318 | Future getNews({ 319 | String? channel, 320 | String? searchKey, 321 | bool reload = false, 322 | }) async { 323 | setState(() => notFound = false); 324 | 325 | if (!reload && !isLoading) { 326 | toggleDrawer(); 327 | } else { 328 | country = null; 329 | category = null; 330 | } 331 | if (isLoading) { 332 | pageNum++; 333 | } else { 334 | setState(() => news = []); 335 | pageNum = 1; 336 | } 337 | baseApi = 'https://newsapi.org/v2/top-headlines?pageSize=10&page=$pageNum&'; 338 | 339 | baseApi += country == null ? 'country=in&' : 'country=$country&'; 340 | baseApi += category == null ? '' : 'category=$category&'; 341 | baseApi += 'apiKey=$apiKey'; 342 | if (channel != null) { 343 | country = null; 344 | category = null; 345 | baseApi = 346 | 'https://newsapi.org/v2/top-headlines?pageSize=10&page=$pageNum&sources=$channel&apiKey=58b98b48d2c74d9c94dd5dc296ccf7b6'; 347 | } 348 | if (searchKey != null) { 349 | country = null; 350 | category = null; 351 | baseApi = 352 | 'https://newsapi.org/v2/top-headlines?pageSize=10&page=$pageNum&q=$searchKey&apiKey=58b98b48d2c74d9c94dd5dc296ccf7b6'; 353 | } 354 | //print(baseApi); 355 | getDataFromApi(baseApi); 356 | } 357 | 358 | @override 359 | void initState() { 360 | controller = ScrollController()..addListener(_scrollListener); 361 | getNews(); 362 | super.initState(); 363 | } 364 | 365 | void _scrollListener() { 366 | if (controller.position.pixels == controller.position.maxScrollExtent) { 367 | setState(() => isLoading = true); 368 | getNews(); 369 | } 370 | } 371 | } 372 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "2.10.0" 12 | boolean_selector: 13 | dependency: transitive 14 | description: 15 | name: boolean_selector 16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "2.1.1" 20 | cached_network_image: 21 | dependency: "direct main" 22 | description: 23 | name: cached_network_image 24 | sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "3.2.3" 28 | cached_network_image_platform_interface: 29 | dependency: transitive 30 | description: 31 | name: cached_network_image_platform_interface 32 | sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "2.0.0" 36 | cached_network_image_web: 37 | dependency: transitive 38 | description: 39 | name: cached_network_image_web 40 | sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "1.0.2" 44 | characters: 45 | dependency: transitive 46 | description: 47 | name: characters 48 | sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.2.1" 52 | clock: 53 | dependency: transitive 54 | description: 55 | name: clock 56 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "1.1.1" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "1.17.0" 68 | crypto: 69 | dependency: transitive 70 | description: 71 | name: crypto 72 | sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "3.0.3" 76 | cupertino_icons: 77 | dependency: "direct main" 78 | description: 79 | name: cupertino_icons 80 | sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "1.0.5" 84 | fake_async: 85 | dependency: transitive 86 | description: 87 | name: fake_async 88 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "1.3.1" 92 | ffi: 93 | dependency: transitive 94 | description: 95 | name: ffi 96 | sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 97 | url: "https://pub.dev" 98 | source: hosted 99 | version: "2.0.1" 100 | file: 101 | dependency: transitive 102 | description: 103 | name: file 104 | sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" 105 | url: "https://pub.dev" 106 | source: hosted 107 | version: "6.1.4" 108 | flutter: 109 | dependency: "direct main" 110 | description: flutter 111 | source: sdk 112 | version: "0.0.0" 113 | flutter_blurhash: 114 | dependency: transitive 115 | description: 116 | name: flutter_blurhash 117 | sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" 118 | url: "https://pub.dev" 119 | source: hosted 120 | version: "0.7.0" 121 | flutter_cache_manager: 122 | dependency: transitive 123 | description: 124 | name: flutter_cache_manager 125 | sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" 126 | url: "https://pub.dev" 127 | source: hosted 128 | version: "3.3.0" 129 | flutter_test: 130 | dependency: "direct dev" 131 | description: flutter 132 | source: sdk 133 | version: "0.0.0" 134 | google_fonts: 135 | dependency: "direct main" 136 | description: 137 | name: google_fonts 138 | sha256: "8f099045e2f2a30e4d4d0a35f40c6bc941a8f2ca0e10ad9d214ee9edd3f37483" 139 | url: "https://pub.dev" 140 | source: hosted 141 | version: "3.0.1" 142 | http: 143 | dependency: "direct main" 144 | description: 145 | name: http 146 | sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" 147 | url: "https://pub.dev" 148 | source: hosted 149 | version: "0.13.6" 150 | http_parser: 151 | dependency: transitive 152 | description: 153 | name: http_parser 154 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" 155 | url: "https://pub.dev" 156 | source: hosted 157 | version: "4.0.2" 158 | js: 159 | dependency: transitive 160 | description: 161 | name: js 162 | sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" 163 | url: "https://pub.dev" 164 | source: hosted 165 | version: "0.6.5" 166 | lint: 167 | dependency: "direct main" 168 | description: 169 | name: lint 170 | sha256: "4a539aa34ec5721a2c7574ae2ca0336738ea4adc2a34887d54b7596310b33c85" 171 | url: "https://pub.dev" 172 | source: hosted 173 | version: "1.10.0" 174 | matcher: 175 | dependency: transitive 176 | description: 177 | name: matcher 178 | sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" 179 | url: "https://pub.dev" 180 | source: hosted 181 | version: "0.12.13" 182 | material_color_utilities: 183 | dependency: transitive 184 | description: 185 | name: material_color_utilities 186 | sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 187 | url: "https://pub.dev" 188 | source: hosted 189 | version: "0.2.0" 190 | meta: 191 | dependency: transitive 192 | description: 193 | name: meta 194 | sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" 195 | url: "https://pub.dev" 196 | source: hosted 197 | version: "1.8.0" 198 | octo_image: 199 | dependency: transitive 200 | description: 201 | name: octo_image 202 | sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" 203 | url: "https://pub.dev" 204 | source: hosted 205 | version: "1.0.2" 206 | path: 207 | dependency: transitive 208 | description: 209 | name: path 210 | sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b 211 | url: "https://pub.dev" 212 | source: hosted 213 | version: "1.8.2" 214 | path_provider: 215 | dependency: transitive 216 | description: 217 | name: path_provider 218 | sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" 219 | url: "https://pub.dev" 220 | source: hosted 221 | version: "2.0.15" 222 | path_provider_android: 223 | dependency: transitive 224 | description: 225 | name: path_provider_android 226 | sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" 227 | url: "https://pub.dev" 228 | source: hosted 229 | version: "2.0.27" 230 | path_provider_foundation: 231 | dependency: transitive 232 | description: 233 | name: path_provider_foundation 234 | sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" 235 | url: "https://pub.dev" 236 | source: hosted 237 | version: "2.2.3" 238 | path_provider_linux: 239 | dependency: transitive 240 | description: 241 | name: path_provider_linux 242 | sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" 243 | url: "https://pub.dev" 244 | source: hosted 245 | version: "2.1.10" 246 | path_provider_platform_interface: 247 | dependency: transitive 248 | description: 249 | name: path_provider_platform_interface 250 | sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" 251 | url: "https://pub.dev" 252 | source: hosted 253 | version: "2.0.6" 254 | path_provider_windows: 255 | dependency: transitive 256 | description: 257 | name: path_provider_windows 258 | sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 259 | url: "https://pub.dev" 260 | source: hosted 261 | version: "2.1.6" 262 | pedantic: 263 | dependency: transitive 264 | description: 265 | name: pedantic 266 | sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" 267 | url: "https://pub.dev" 268 | source: hosted 269 | version: "1.11.1" 270 | platform: 271 | dependency: transitive 272 | description: 273 | name: platform 274 | sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" 275 | url: "https://pub.dev" 276 | source: hosted 277 | version: "3.1.0" 278 | plugin_platform_interface: 279 | dependency: transitive 280 | description: 281 | name: plugin_platform_interface 282 | sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" 283 | url: "https://pub.dev" 284 | source: hosted 285 | version: "2.1.4" 286 | process: 287 | dependency: transitive 288 | description: 289 | name: process 290 | sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" 291 | url: "https://pub.dev" 292 | source: hosted 293 | version: "4.2.4" 294 | rxdart: 295 | dependency: transitive 296 | description: 297 | name: rxdart 298 | sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" 299 | url: "https://pub.dev" 300 | source: hosted 301 | version: "0.27.7" 302 | sky_engine: 303 | dependency: transitive 304 | description: flutter 305 | source: sdk 306 | version: "0.0.99" 307 | source_span: 308 | dependency: transitive 309 | description: 310 | name: source_span 311 | sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 312 | url: "https://pub.dev" 313 | source: hosted 314 | version: "1.9.1" 315 | sqflite: 316 | dependency: transitive 317 | description: 318 | name: sqflite 319 | sha256: "3a82c9a216b46b88617e3714dd74227eaca20c501c4abcc213e56db26b9caa00" 320 | url: "https://pub.dev" 321 | source: hosted 322 | version: "2.2.8+2" 323 | sqflite_common: 324 | dependency: transitive 325 | description: 326 | name: sqflite_common 327 | sha256: e77abf6ff961d69dfef41daccbb66b51e9983cdd5cb35bf30733598057401555 328 | url: "https://pub.dev" 329 | source: hosted 330 | version: "2.4.5" 331 | stack_trace: 332 | dependency: transitive 333 | description: 334 | name: stack_trace 335 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 336 | url: "https://pub.dev" 337 | source: hosted 338 | version: "1.11.0" 339 | stream_channel: 340 | dependency: transitive 341 | description: 342 | name: stream_channel 343 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" 344 | url: "https://pub.dev" 345 | source: hosted 346 | version: "2.1.1" 347 | string_scanner: 348 | dependency: transitive 349 | description: 350 | name: string_scanner 351 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 352 | url: "https://pub.dev" 353 | source: hosted 354 | version: "1.2.0" 355 | synchronized: 356 | dependency: transitive 357 | description: 358 | name: synchronized 359 | sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" 360 | url: "https://pub.dev" 361 | source: hosted 362 | version: "3.1.0" 363 | term_glyph: 364 | dependency: transitive 365 | description: 366 | name: term_glyph 367 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 368 | url: "https://pub.dev" 369 | source: hosted 370 | version: "1.2.1" 371 | test_api: 372 | dependency: transitive 373 | description: 374 | name: test_api 375 | sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 376 | url: "https://pub.dev" 377 | source: hosted 378 | version: "0.4.16" 379 | typed_data: 380 | dependency: transitive 381 | description: 382 | name: typed_data 383 | sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" 384 | url: "https://pub.dev" 385 | source: hosted 386 | version: "1.3.1" 387 | uuid: 388 | dependency: transitive 389 | description: 390 | name: uuid 391 | sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" 392 | url: "https://pub.dev" 393 | source: hosted 394 | version: "3.0.7" 395 | vector_math: 396 | dependency: transitive 397 | description: 398 | name: vector_math 399 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 400 | url: "https://pub.dev" 401 | source: hosted 402 | version: "2.1.4" 403 | webview_flutter: 404 | dependency: "direct main" 405 | description: 406 | name: webview_flutter 407 | sha256: "392c1d83b70fe2495de3ea2c84531268d5b8de2de3f01086a53334d8b6030a88" 408 | url: "https://pub.dev" 409 | source: hosted 410 | version: "3.0.4" 411 | webview_flutter_android: 412 | dependency: transitive 413 | description: 414 | name: webview_flutter_android 415 | sha256: "8b3b2450e98876c70bfcead876d9390573b34b9418c19e28168b74f6cb252dbd" 416 | url: "https://pub.dev" 417 | source: hosted 418 | version: "2.10.4" 419 | webview_flutter_platform_interface: 420 | dependency: transitive 421 | description: 422 | name: webview_flutter_platform_interface 423 | sha256: "812165e4e34ca677bdfbfa58c01e33b27fd03ab5fa75b70832d4b7d4ca1fa8cf" 424 | url: "https://pub.dev" 425 | source: hosted 426 | version: "1.9.5" 427 | webview_flutter_wkwebview: 428 | dependency: transitive 429 | description: 430 | name: webview_flutter_wkwebview 431 | sha256: a5364369c758892aa487cbf59ea41d9edd10f9d9baf06a94e80f1bd1b4c7bbc0 432 | url: "https://pub.dev" 433 | source: hosted 434 | version: "2.9.5" 435 | win32: 436 | dependency: transitive 437 | description: 438 | name: win32 439 | sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" 440 | url: "https://pub.dev" 441 | source: hosted 442 | version: "4.1.4" 443 | xdg_directories: 444 | dependency: transitive 445 | description: 446 | name: xdg_directories 447 | sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 448 | url: "https://pub.dev" 449 | source: hosted 450 | version: "1.0.0" 451 | sdks: 452 | dart: ">=2.19.0 <3.0.0" 453 | flutter: ">=3.3.0" 454 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: newsappflutter 2 | description: newsappflutter. 3 | 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.17.6 <3.0.0" 8 | 9 | dependencies: 10 | cached_network_image: ^3.2.1 11 | cupertino_icons: ^1.0.5 12 | flutter: 13 | sdk: flutter 14 | google_fonts: ^3.0.1 15 | http: ^0.13.4 16 | lint: ^1.8.2 17 | webview_flutter: ^3.0.4 18 | 19 | dev_dependencies: 20 | flutter_test: 21 | sdk: flutter 22 | 23 | flutter: 24 | uses-material-design: true 25 | --------------------------------------------------------------------------------