A News App in Flutter using the newsapi.org API and using Bloc.

Overview

flutter_newsapp

A News App using API from newsapi.org and using Bloc.

Working

Screenshots


=>=>



video




Before Running

  • Replace the <API_KEY> in lib/res/strings.dart with your own API key generated from newsapi.org.





Visitor count

You might also like...

Google-news-app-redesign - Redesigned the ui of google news app with flutter

Google-news-app-redesign - Redesigned the ui of google news app with flutter

News app like Google news! ScreenShots If you face any problem with this project

Jun 23, 2022

Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster.

Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster.

Readky. Introduction Readky is a Free Flutter News App Starter Template that can help you develop a News application much faster. You just need to add

Nov 26, 2022

Wall-street-news - News App work with HttpClient in Flutter

Wall-street-news - News App work with HttpClient in Flutter

Flutter News App Demo This project is to showcase how to work with HttpClient in

Oct 16, 2022

NewsAPI flutter application

NewsAPI flutter application

NewsAPI flutter application This is news app which fetches top headings from news api. Application consists of 2 screens: Article list screen: On app

May 2, 2022

Netflix app UI clone using bloc,Rest API and TMDB for API key

netflix_flutter project_using_bloc packages Used flutter_bloc json_serializable get_it dio A few resources to get you started if this is your first Fl

Nov 25, 2022

News app in Flutter with BLOC pattern

News app in Flutter with BLOC pattern

NewsApp News app in Flutter with BLOC pattern This example uses a CustomScrollView, JSON Rest API, BottonNavigationBar,SliverList, ClipRRect, Card, Pr

Dec 25, 2022

GrowERP Flutter Administrator front-end & Hotel & Ecommerce for Android, IOS and Web using Moqui.org, Apache OFBiz

GrowERP Flutter Administrator front-end & Hotel & Ecommerce for Android, IOS and Web using Moqui.org, Apache OFBiz

Welcome to flutter open source GrowERP. GrowERP is an open source multi platform ERP application you can try right now! We have latest test version at

Dec 24, 2022

Flutter bloc example - An app for State management using BLoC pattern in Flutter

Flutter bloc example - An app for State management using BLoC pattern in Flutter

Flutter BLoC My first app for State management using BLoC pattern in Flutter Col

Jun 16, 2022

An Org Mode file viewer for iOS and Android

An Org Mode file viewer for iOS and Android

Orgro An Org Mode file viewer for iOS and Android See https://orgro.org for a demo video What is Org Mode? Imagine a plain-text markup language like M

Jan 2, 2023
Comments
  • _network_image_io.dart

    _network_image_io.dart

    Hi I could not solve the error, I would be very happy if you help me.

    'package:flutter/src/painting/_network_image_io.dart': Failed assertion: line 25 pos 11: 'url != null': is not true.

    /// The dart:io implementation of [image_provider.NetworkImage]. @immutable class NetworkImage extends image_provider.ImageProvider<image_provider.NetworkImage> implements image_provider.NetworkImage { /// Creates an object that fetches the image at the given URL. /// /// The arguments [url] and [scale] must not be null. const NetworkImage(this.url, { this.scale = 1.0, this.headers }) :assert(url != null ), assert(scale != null);

    @override final String url;

    @override final double scale;

    @override final Map<String, String>? headers;

    @override Future obtainKey(image_provider.ImageConfiguration configuration) { return SynchronousFuture(this); }

    @override ImageStreamCompleter load(image_provider.NetworkImage key, image_provider.DecoderCallback decode) { // Ownership of this controller is handed off to [_loadAsync]; it is that // method's responsibility to close the controller's stream when the image // has been loaded or an error is thrown. final StreamController chunkEvents = StreamController();

    return MultiFrameImageStreamCompleter(
      codec: _loadAsync(key as NetworkImage, chunkEvents, decode),
      chunkEvents: chunkEvents.stream,
      scale: key.scale,
      debugLabel: key.url,
      informationCollector: () {
        return <DiagnosticsNode>[
          DiagnosticsProperty<image_provider.ImageProvider>('Image provider', this),
          DiagnosticsProperty<image_provider.NetworkImage>('Image key', key),
        ];
      },
    );
    

    }

    // Do not access this field directly; use [_httpClient] instead. // We set autoUncompress to false to ensure that we can trust the value of // the Content-Length HTTP header. We automatically uncompress the content // in our call to [consolidateHttpClientResponseBytes]. static final HttpClient _sharedHttpClient = HttpClient()..autoUncompress = false;

    static HttpClient get _httpClient { HttpClient client = _sharedHttpClient; assert(() { if (debugNetworkImageHttpClientProvider != null) client = debugNetworkImageHttpClientProvider!(); return true; }()); return client; }

    Future<ui.Codec> _loadAsync( NetworkImage key, StreamController chunkEvents, image_provider.DecoderCallback decode, ) async { try { assert(key == this);

      final Uri resolved = Uri.base.resolve(key.url);
    
      final HttpClientRequest request = await _httpClient.getUrl(resolved);
    
      headers?.forEach((String name, String value) {
        request.headers.add(name, value);
      });
      final HttpClientResponse response = await request.close();
      if (response.statusCode != HttpStatus.ok) {
        // The network may be only temporarily unavailable, or the file will be
        // added on the server later. Avoid having future calls to resolve
        // fail to check the network again.
        await response.drain<List<int>>();
        throw image_provider.NetworkImageLoadException(statusCode: response.statusCode, uri: resolved);
      }
    
      final Uint8List bytes = await consolidateHttpClientResponseBytes(
        response,
        onBytesReceived: (int cumulative, int? total) {
          chunkEvents.add(ImageChunkEvent(
            cumulativeBytesLoaded: cumulative,
            expectedTotalBytes: total,
          ));
        },
      );
      if (bytes.lengthInBytes == 0)
        throw Exception('NetworkImage is an empty file: $resolved');
    
      return decode(bytes);
    } catch (e) {
      // Depending on where the exception was thrown, the image cache may not
      // have had a chance to track the key in the cache at all.
      // Schedule a microtask to give the cache a chance to add the key.
      scheduleMicrotask(() {
        PaintingBinding.instance!.imageCache!.evict(key);
      });
      rethrow;
    } finally {
      chunkEvents.close();
    }
    

    }

    @override bool operator ==(Object other) { if (other.runtimeType != runtimeType) return false; return other is NetworkImage && other.url == url && other.scale == scale; }

    @override int get hashCode => ui.hashValues(url, scale);

    @override String toString() => '${objectRuntimeType(this, 'NetworkImage')}("$url", scale: $scale)'; }

    opened by ayzek67 8
  • [ImgBot] Optimize images

    [ImgBot] Optimize images

    Beep boop. Your images are optimized!

    Your image file size has been reduced!

    Details

    | File | Before | After | Percent reduction | |:--|:--|:--|:--| | /web/favicon.png | 0.90kb | 0.64kb | 29.01% | | /Screenshots/spinkit.jpeg | 18.40kb | 16.39kb | 10.93% | | /Screenshots/Demo.gif | 7,783.40kb | 7,517.54kb | 3.42% | | /Screenshots/article2.jpeg | 54.90kb | 53.04kb | 3.38% | | /Screenshots/article1.jpeg | 65.47kb | 64.28kb | 1.82% | | /Screenshots/feed.jpeg | 109.63kb | 108.59kb | 0.95% | | | | | | | Total : | 8,032.69kb | 7,760.48kb | 3.39% |


    Black Lives Matter | 💰 donate | 🎓 learn | ✍🏾 sign

    📝 docs | :octocat: repo | 🙋🏾 issues | 🏅 swag | 🏪 marketplace

    opened by imgbot[bot] 0
Owner
Arunoday kumar
sophomore at @iiitv || Jack of all trades, Master of none ||
Arunoday kumar
Flutter News App with newsapi.org.

mvvm_news_app Flutter News App News App developed with Flutter and API from News API Usage Please open file lib/repository/news_api.dart and change YO

Amer 4 Nov 29, 2022
News App developed with Flutter featuring beautiful UI, category-based news, story for faster news reading, inbuilt article viewer, share feature, and more.

Ariel News App developed with Flutter featuring beautiful UI, category-based news, story for faster news reading, inbuilt article viewer, share featur

Hash Studios 30 Nov 9, 2022
UAS PMobile 19710018 - Flutter News App using NewsAPI

Flutter News App using NewsAPI Description this is a simple News app made in Flu

null 5 Dec 5, 2022
Newsapp - A Flutter News application template, using newsApi

newsapp Template de aplicación de noticias, usando newsApi newsapi Flutter Licen

jonathanleivag 1 Nov 29, 2022
News App using News Api.

newsapp A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Shripad Joshi 0 Jan 6, 2022
Zone is yet another Hacker News client, built with Flutter, Slidy, and Hacker News API.

Zone for Hacker News Zone is yet another Hacker News client, built with Flutter, Slidy, and Hacker News API. Setup Clone this repo to your machine Req

null 11 Feb 27, 2022
News-Flutter - News Api with flutter

News App This app use News Api. If you want to run this code, please use your ow

Brandon Rojas 2 Apr 29, 2022
Petrus Nguyễn Thái Học 193 Dec 29, 2022
Flutter Viral News App using : Flutter + Rest Api + Bloc / Cubit

Intro Viral News App on Flutter. The tech used: Flutter widgets + Flutter Bloc / Cubit + Rest Api Check the screenshot : P.S Make sure to upgrade your

Ihab Zaidi 8 Nov 2, 2022
News Reader App to fetch Articles from different news channels using Flutter.

News Reader This app is made using the Flutter framework. Its an mobile app to browse the News from different channels. This app uses an API provided

Sahil Kumar 84 Apr 13, 2022