CoderJava/Flutter-News-App
使用 newsapi.org 的 Flutter 新聞應用。採用測試驅動開發方法開發。
- Stars
- 603
- Forks
- 180
- 最近推送(UTC)
- 2023年3月21日
- 專案狀態
- 未封存
語言DartSwiftKotlinObjective-C
技術主題
使用的依賴
依賴清單 22 項
- flutter
{"sdk":"flutter"} - cupertino_icons
^0.1.3 - dio
^3.0.9 - flutter_bloc
^3.2.0 - intl
^0.16.1 - url_launcher
^5.4.2 - cached_network_image
^2.1.0+1 - get_it
^4.0.1 - dartz
^0.8.9 - equatable
^1.1.1 - data_connection_checker
^0.3.4 - flutter_screenutil
^1.1.0 - pedantic
^1.8.0+1 - device_info
^0.4.2+1 - flutter_svg
^0.17.4 - hive
^1.4.1+1 - hive_flutter
^0.3.0+2 - flutter_test開發依賴
{"sdk":"flutter"} - build_runner開發依賴
^1.8.1 - mockito開發依賴
^4.1.1 - bloc_test開發依賴
^4.0.0 - json_serializable開發依賴
^3.3.0
所在榜單
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
展開 / 收合專案 README
Codemagic build status codecov style: effective dart License: MIT
Flutter News App
Flutter News App
News App developed with Flutter and API from News API
Versions
Usage
- Please open file constant_config.dart and change
YOUR API KEYin the variablekeyNewsApiwith your own. - In development mode, I'm used fake json server. So, the data is not realtime.
- Build flavor only work for Android. So, if you want to run as development mode you can use this command.
flutter run -t lib/main_development.dart --flavor development -d <device_id>
or in production mode.
flutter run --release -t lib/main_production.dart --flavor production -d <device_id>
Note: If you want to build and release this app to Play Store. Please use this command.
flutter build appbundle --release --flavor production -t lib/main_production.dart
- For iOS, you can use this command as development mode.
flutter run -t lib/main_development.dart -d <device_id>
or in production mode.
flutter run --release -t lib/main_production.dart -d <device_id>
For iOS, to build and release there is no configuration. Just follow the instructions from the documentation.
Feature
- [X] List daily news.
- [X] Filter daily news by category.
- [X] Refresh list daily news with pull to refresh style.
- [X] Go to detail news website.
- [X] Search news.
- [X] Dark mode support.
Technology
- Dio
A powerful Http client for Dart, which supports interceptors, FormData, Request Cancellation, File Downloading, Timeout, etc. - Flutter BLoC
Flutter widgets that make it easy to implement the BLoC design pattern. - Intl
Package providers internationalization and localization facilities, including message translation, plurals and genders, date/number formatting and parsing, and bidirectional text. - Url Launcher
Flutter plugin for launching a URL in the mobile platform. Supports iOS and Android. - Cached Network Image
Flutter library to load and cache network images. Can also be used with placeholder and error widgets. - Get It
Simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere in your App. - Dartz
Functional Programming in Dart. Purify your Dart code using efficient immutable data structures, monads, lenses and other FP tools. - Equatable
An abstract class that helps to implement equality without needing to explicitly override == and hashCode. - Data Connection Checker
A pure Dart library that checks for internet by opening a socket to a list of specified addresses, each with individual port and timeout. - Flutter ScreenUtil
A Flutter plugin for adapting screen and font size. - Pedantic
How to get the most value from Dart static analysis. - Device Info
Flutter plugin providing detailed information about the device (make, model, etc). - Flutter SVG
An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files. - Build Runner
Tools to write binaries that run builders. - Mockito
A mock framework inspired by Mockito. - Bloc Test
A testing library which makes it easy to test blocs. - JSON Serializable
Automatically generate code for converting to and from JSON by annotating Dart classes. - Hive
Lightweight and blazing fast key-value database written in pure Dart.