An app that allows you to randomly grab a Shakespeare sonnet. Includes night mode, and line count for a better Shakespeare reading experience.
I'm Gabriel Ruiz, a software developer from the Bay Area. I work as a frontend developer. Here is my GitHub. Actually, this is my first time building a full-on mobile app!
Targets, Instructions, other Logistics
I don't have an iOS developer account. I just used the emulator.
The device I emulated was the iPhone X, running on iOS 12.1. So it'd probably be best if you ran it on that platform.
flutter packages get to install
Why did I build this?
- Current poetry reading solutions on mobile are not that great.
- One of my friends off-handedly mentioned Flutter, and it sounded interesting.
- I wanted to break into getting to know ReactiveX in some way, as well as the BLoC pattern.
- I wanted to create something that inched towards a good poetry reader on mobile. That includes theme changing and line count.
- Really, I just love Shakespeare.
Thankfully this happened to be 5,118 bytes using the
find command! lol
Anyways, I only really used
rxdart for state management, and
http for getting data from the API.
I tried to conform to the BLoC Pattern as much as I could from one night of reading about it.
I have my BLoCs in the
- one for theme data,
theme_bloc.dart(in a future iteration of this app, I hoped to give the users options to select more themes than just dark mode and light mode)
- one for sonnet data,
data folder, I have
get_sonnet.dart, whose sole purpose is to provide a Singleton
SonnetAPI object to request data from PoetryDB.
models, I have
sonnet.dart, which contains a
Sonnet class to de-serialize the responses from the server.
Pretty much all of my UI data is in
main.dart, and it relies upon those three things.
For really throwaway-ish UI functions, like line numbers and sonnet number changing on the view, I used a plain old
setState. Honestly, there's probably a better way to do that stuff than I did with BLoCs, but I'm not adept enough yet with the BLoC pattern or RxDart to know any better.
- If I had more space than 5kb, I would have included a loading view.
- I couldn't figure out how to app icon. This is literally my first time developing a full-blown mobile app. I'm a frontend web developer, and I've only toyed around with React Native before.
- In future iterations, I want to include a way to save sonnets with SQLite, line highlighting, and more poets.
I've included a copy of the license in this folder.