dev feed
dev feed is a flutter-based mobile application allowing to keep up with top engineering content from companies all over the world. it stemmed from my own needs to not only follow a curated list of tech-related blogs, but also play a little bit with the excellent flutter sdk.
building and running
- download the repo
rm3l/dev-feed && cd dev-feed
- build the backend
./backend/gradlew -p ./backend build --stacktrace
- run the backend graphql api
java -jar backend/api/build/libs/dev-feed-api-1.3.0.jar
you can then access the graphiql browser by heading to http://localhost:8080/graphiql
- install flutter by following the instructions on the official website
- prepare the configuration environment
skip this to use the default heroku backend. otherwise, if you have a custom backend (either local or remote), you need to create a specific environment file (say my_personal_backend.dart
) in the mobile/lib/environments
folder, e.g.:
import 'package:dev_feed/env.dart';
void main() => mypersonalbackend();
class mypersonalbackend extends env {
final string baseurl = 'https://my-dev-feed-backend-api.example.org';
}
- build the mobile apps
first cd
to the mobile
directory:
cd mobile
if you simply want to target the default heroku backend, just run:
flutter build apk
otherwise, if you have a custom backend (and its related dart environment file) declared under mobile/lib/environments/my_personal_backend.dart
, then run:
flutter build apk -t lib/environments/my_personal_backend.dart
you will then find the mobile applications built under the respective platform folders. for example, the apk for android can be found under build/app/outputs/apk/
.
- install and run the apk either in an emulator or in a real device
flutter install
or:
adb install -r build/app/outputs/apk/app.apk
Comments are closed.