supnews

所属分类:Dart语言编程
开发工具:Dart
文件大小:0KB
下载次数:0
上传日期:2022-07-07 09:41:16
上 传 者sh-1993
说明:  一个简单的Flutter应用程序,使用MobX和provider显示黑客新闻中的故事
(A simple Flutter app for showing stories from Hacker News using MobX _and_ provider)

文件列表:
.metadata (305, 2022-07-07)
LICENSE (1519, 2022-07-07)
android/ (0, 2022-07-07)
android/app/ (0, 2022-07-07)
android/app/build.gradle (2608, 2022-07-07)
android/app/proguard-rules.pro (248, 2022-07-07)
android/app/src/ (0, 2022-07-07)
android/app/src/debug/ (0, 2022-07-07)
android/app/src/debug/AndroidManifest.xml (337, 2022-07-07)
android/app/src/main/ (0, 2022-07-07)
android/app/src/main/AndroidManifest.xml (1877, 2022-07-07)
android/app/src/main/ic_launcher-web.png (19225, 2022-07-07)
android/app/src/main/java/ (0, 2022-07-07)
android/app/src/main/java/io/ (0, 2022-07-07)
android/app/src/main/java/io/crossingthestreams/ (0, 2022-07-07)
android/app/src/main/java/io/crossingthestreams/supnews/ (0, 2022-07-07)
android/app/src/main/java/io/crossingthestreams/supnews/MainActivity.java (374, 2022-07-07)
android/app/src/main/res/ (0, 2022-07-07)
android/app/src/main/res/drawable/ (0, 2022-07-07)
android/app/src/main/res/drawable/ic_launcher_background.xml (4867, 2022-07-07)
android/app/src/main/res/drawable/launch_background.xml (424, 2022-07-07)
android/app/src/main/res/drawable/launcher_image.png (10030, 2022-07-07)
android/app/src/main/res/mipmap-hdpi/ (0, 2022-07-07)
android/app/src/main/res/mipmap-hdpi/ic_launcher.png (1886, 2022-07-07)
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png (2407, 2022-07-07)
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png (3822, 2022-07-07)
android/app/src/main/res/mipmap-mdpi/ (0, 2022-07-07)
android/app/src/main/res/mipmap-mdpi/ic_launcher.png (1295, 2022-07-07)
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png (1517, 2022-07-07)
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png (2405, 2022-07-07)
android/app/src/main/res/mipmap-xhdpi/ (0, 2022-07-07)
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (2508, 2022-07-07)
android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png (3287, 2022-07-07)
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png (5365, 2022-07-07)
android/app/src/main/res/mipmap-xxhdpi/ (0, 2022-07-07)
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (3825, 2022-07-07)
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png (5369, 2022-07-07)
... ...

# supnews [![Codemagic build status](https://api.codemagic.io/apps/5cd97d9341300a1c8aa14062/5cd97d9341300a1c8aa14061/status_badge.svg)](https://codemagic.io/apps/5cd97d9341300a1c8aa14062/5cd97d9341300a1c8aa14061/latest_build) A simple Flutter app for displaying stories retrieved from Hacker News. Uses the [provider](https://github.com/rrousselGit/provider) package along with [MobX](https://mobx.pub) to managing the architecture The app demonstrates * Using MobX for managing UI state where stores function as view models that may talk to other services i.e. how to follow the widget -> store -> service structure * Using `provider` organise stores and inject them into the appropriate widgets. Services are injected into the stores via `provider` as well. Both of these are done using the `Consumer` widget (and `Consumer2` when injecting in two dependencies) * Using `provider` to resolve dependencies using the static `Provider.of(context)` method * How to load more items into a `ListView` based on scroll position by invoking an action in MobX * Opening stories using the [url_launcher](https://github.com/flutter/plugins/tree/master/packages/url_launcher) package with the ability to load them in the browser instead of doing so "in-app" * Toggling between dark and light theme * Using custom fonts * Using a Cupertino widgets within a material app **NOTE**: when the app was originally written, the `ProxyProvider` class wasn't available yet in the `provider` package. It should be possible to update the app to make of use of it When trying to debug on your machine via an Android device, you'll currently need to go to android/app/build.gradle and modify the contents to comment out/remove the store release related configuration. The latter configuration is there as I currently have this setup with [Codemagic](https://codemagic.io/) to deploy to the Google Play store. The relevant sections look like as follows ``` // beginning of config for store release signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } buildTypes { release { signingConfig signingConfigs.release minifyEnabled true useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } // end of config related to store release // for debugging /*buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } }*/ ``` After modifying it so it can be debugged, it'll look like as follows ``` // beginning of config for store release /*signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } buildTypes { release { signingConfig signingConfigs.release minifyEnabled true useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }*/ // end of config related to store release // for debugging buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } } ``` ## Attributions Google Play and the Google Play logo are trademarks of Google LLC.

近期下载者

相关文件


收藏者