roughike / inkino Goto Github PK
View Code? Open in Web Editor NEWA multiplatform Dart movie app with 40% of code sharing between Flutter and the Web.
Home Page: https://inkino.app
License: Apache License 2.0
A multiplatform Dart movie app with 40% of code sharing between Flutter and the Web.
Home Page: https://inkino.app
License: Apache License 2.0
I tried it out on Chrome OS and found a few things not right, but in general it works 👍
A great redux example!
Any thoughts about migrating the code to dart 2?
Currently, the use of PlatformAdaptiveProgressIndicator
in LoadingView
inKino/lib/ui/events/events_page.dart
Lines 32 to 43 in 6e1752f
If I replace the PlatformAdaptiveProgressIndicator
with only a Text('Loading...')
this overhead is not occurring any more.
I found that LoadingView
is using StackView
to show/hide views depending on their visibility,
inKino/lib/ui/common/loading_view.dart
Lines 115 to 137 in 6e1752f
but I think that PlatformAdaptiveProgressIndicator
keeps running in the background, although it is invisible.
I just wanted to note about this issues.
And, thanks for sharing this great project;
I learned a lot from it 👍
I've noticed there are a lot of places where new can be replaced by const with just some small changes.
Every place you can use a const widget instead of new, you save flutter a little bit of work.
For example, in event_backdrop_photo.dart
Widget _buildShadowInset(BuildContext context) {
return new Positioned(
bottom: -8.0,
child: new DecoratedBox(
decoration: *const* BoxDecoration(
boxShadow: *const* <BoxShadow>[
*const* BoxShadow(
color: Colors.black38,
blurRadius: 5.0,
spreadRadius: 3.0,
),
],
),
child: new SizedBox(
width: MediaQuery.of(context).size.width,
height: 10.0,
),
),
);
}
They aren't huge changes, but if you're interested I can open a PR
When you scroll to say the 10 item on one page and switch tabs, when you return to the same page the scroll position is not preserved
Finnkino operates a total of 14 cinemas in eleven cities. It also has subsidiaries in Latvia, Lithuania and Estonia, operated under the names of Forum Cinemas and Forum Distribution.
https://en.wikipedia.org/wiki/Finnkino
Finland:
Latvia:
Lithuania:
Estonia:
This change would require:
areas
as only .fi version has aggregate areas.The app default video format is set to YoutTube :
<MediaResourceFormat>YouTubeVideo</MediaResourceFormat>
Would it be sufficient to change the media tags to get this working with different media providers?
Ex:
<MediaResourceFormat>Vimeo</MediaResourceFormat>
<MediaResourceFormat>DailyMotion</MediaResourceFormat>
Please, i want know how to compile flutter application on mac os. I have followed many tutorials,
i have mojave with xcode, pods, etc
i could be install android studio and generate app for ios??
Can you help me, for you experience?
Best Regards
Can the flutter sdk and web sdk be installed together on mac OS?
Anybody has ever tried to implement screen rotation here?
I have tried :
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
]);
but it doesn't work.
Is the app locked in a portrait mode?
When I try to launch the web version using webdev serve
, I am getting the following out put.
Creating build script, took 10047ms
[INFO] Setting up file watchers completed, took 25ms
[INFO] Waiting for all file watchers to be ready completed, took 202ms
[INFO] Reading cached asset graph completed, took 490ms
[INFO] Checking for updates since last build completed, took 744ms
[INFO] Running build completed, took 443ms
[INFO] Caching finalized dependency graph completed, took 282ms
[SEVERE] build_web_compilers:ddc on package:package_resolver/package_resolver.dartdevc.module (cached):
Error compiling dartdevc module:package_resolver|lib/package_resolver.ddc.js
[error] The imported library ''current_isolate_resolver_stub.dart'' can't have a part-of directive. (package:package_resolver/src/package_resolver.dart, line 12, col 8)
[error] The imported library ''utils_isolate_stub.dart'' can't have a part-of directive. (package:package_resolver/src/utils.dart, line 15, col 8)
Please fix all errors before compiling (warnings are okay).
}
[SEVERE] Failed after 742ms
Serving `web` on http://localhost:8080
Serving `test` on http://localhost:8081
It is showing that there is some error with package_resolver
.
Currently, every message and label is hardcoded, and the app works in English only. Localize the app the support both English and Finnish.
Tasklist:
en
from the URLs when the detected language is FinnishHi,
Thanks for sharing the app's code - it's a great work! We're exploring Flutter and AngularDart combination mainly to share maximum possible non-UI code between the two apps. While Flutter adoption in the community and industry is soaring, AngularDart somehow doesn't have much community adoption - from what we see in various usual places like StackOverflow or even Dart's official Google Group.
Very curious what has been your experience and what's your recommendation about AngularDart - for moderately complex enterprise web app (that will have a Flutter-based tablet app for both Android and iOS).
Thanks!
Shafqat
Hello people.
I wanted to compile here some suggestions on the part of UI (user interface) and UX (user experience). My experience may be of a UI/UX junior designer, with some projects like this, but it has liked your app for being in Flutter (which I am studying) and open source <3.
In case you accept some or all of the suggestions, I can open separate issues for each one.
I will only present the problems and if they are admitted, I can propose solutions in the issues or in the discussion that may arise. Follow the thread.
When pressed in the toolbar, the local selection menu opens. It seems a bit confusing because you press a button and another menu opens. Img 1
There is in the list of shows in the tab showtimes, the option to perform a long press on an item, but when this happens, the contrast gets worse. Img 2
The yellow ticket icon on each item on the showtime list may not clearly represent the action to go to the website to buy the ticket. Img 3
In the details of some movies to be released, sometimes it appears 0 min (probably not yet found the information). Instead, it could show a stroke or something else that does not indicate a duration value. Img 4
In the details of some movies to be released, there are no images in the gallery and a large blank part is presented in the detail of the movie. Img 5
In the details of some movies to be released, the icons of actors and gallery images are objects that seem clickable. Img 6 (does not have)
When accessing the details of the movie by the tab 'now in theaters', there is no option to buy the ticket. As it is very likely that the user enters first there (and not in showtimes) because it is the first page that loads, the user may feel disoriented or frustrated of not having that option. Img 7.1 and img 7.2
In the images with white colors in the details of the movie, the return arrow may not be seen clearly (contrast). Img 8
When the storyline expands, the screen is not focused to see everything written. Img 9
Lack of space in the tabs of the bottom bar and an animation when the tab is pressed. Img 10
Accessibility: The augmented text x2 is applied. Search field description on the toolbar. Img 11
Accessibility: The augmented text x2 is applied. Description of the film in the movie details.Img 12
Accessibility: The augmented text x2 is applied. Bottom overflow in showtimes tab.Img 13
Accessibility: The augmented text x2 is applied. Bottom overflow in details of the movie.Img 14
The user may not understand that it is the end time of the session in each step of the showtime tab because it is not explained anywhere. Img 15
The separation that differentiates the selection buttons of the day and the list of movies (showtime), is not perceptible. Here it may be due to a contrast problem in the two colors used.Img 16
Can only build if I remove mockito from the dev dependencies. If not I get this error:
Running "flutter packages get" in inKino...
The current Dart SDK version is 2.1.0-dev.3.0.flutter-760a9690c2.
Because inkino depends on mockito >=0.8.1 <3.0.0-beta+3 which requires SDK version >=1.0.0 <2.0.0-∞, version solving failed.
The code for calculating the scrolling effects is currently really ugly and hard to maintain.
I have a feeling that these could be easily done with anAnimationController
and Tweens
. The AnimationController
would be used manually; the value
property can be manually updated when the current scroll offset changes.
How about adding some tags to the project? Like Flutter, Dartlang, android, ios etc...
(Thibaud made me do this to get a t-shirt)
The TMDB API terms require that the app states somewhere that their API is in use.
Hi, I'm curious what your Flutter version was for this project when you last built and deployed. We are seeing bad scroll performance on other apps, but your app seems to be very smooth. Was it before 1.0 Flutter (December 2018)?
Great app and very nice code, thanks so much for sharing ❤️
Grabbing the latest code from the repository and trying to run it from development
branch, I am seeing three errors when I do flutter run -d [deviceID]
where deviceID
is the iOS simulator I run with open -a Simulator
. It is a iPhone X with iOS 11.3. My environment is macOS High Sierra 10.13.4, Xcode 9.3 ((E145). Here is the output from flutter run
-
Launching lib/main.dart on iPhone X in debug mode...
Running Xcode clean... 1.0s
Starting Xcode build...
Xcode build done 1.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET path_provider OF PROJECT Pods WITH CONFIGURATION Debug ===
In file included from /Users/indrajit.chakrabarty/Work/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.0/ios/Classes/UrlLauncherPlugin.m:7:
/Users/indrajit.chakrabarty/Work/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-3.0.0/ios/Classes/UrlLauncherPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/indrajit.chakrabarty/Work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.1/ios/Classes/SharedPreferencesPlugin.m:5:
/Users/indrajit.chakrabarty/Work/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.1/ios/Classes/SharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/indrajit.chakrabarty/Work/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-0.4.0/ios/Classes/PathProviderPlugin.m:5:
/Users/indrajit.chakrabarty/Work/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-0.4.0/ios/Classes/PathProviderPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone X.
flutter doctor
prints the following -
➜ inKino git:(development) ✗ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.2.8, on Mac OS X 10.13.4 17E199, locale en-AU)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.22.1)
[✓] Connected devices (2 available)
• No issues found!
➜ inKino git:(development) ✗
My environment has Cocoapods version 1.5.0
installed.
Anyone have any suggestions for me try, please?
Thanks!
Given the permissive license ( apache ) under which is this project released, we can reuse this code base for our own purposes ?
Currently, when navigating to event details page from now in theaters or upcoming page, there are no showtimes visible. While there's an entirely different tab for browsing showtimes in the main page, it would be nice to see the showtimes just for the currently open movie.
The project can't be built in its current state since it assumes that tmdb_config.dart
is present. That file is omitted on purpose so that an actual TMDB API key isn't accessible to anyone.
Add lib/tmdb_config.dart
with contents something like this:
class TMDBConfig {
static final String apiKey = '<YOUR API KEY HERE>';
}
Also, make it fallback nicely; if there's no valid API key, the app shouldn't crash and the actor names shouldn't get stuck to Loading...
.
From #74:
Tabbing does not work. This is really important. For example the Google Play store on ChromeOS allows you to use TAB key to jump down and across lists, and then ESC to back up out of lists or all the way backwards in navigation. It makes it much more usable.
I reported this a low priority issue, since I expect that not a lot of people will use inKino with ChromeOS. If an end user reports the same issue, I'll raise the priority and look into it sooner.
Given that the app uses Redux already, the event details page widget is not probably the right place to load the actor avatars.
Figure out what is "the Redux" way of doing this, or if this even needs such a refactor.
Comparing 2 functions always returns false, even if the functions are the same. You have to exclude them in the equals comparison. Otherwise the view models are never equal, which means that the widget tree is rebuilt every time a store change occurs.
Example:
https://github.com/roughike/inKino/blob/development/lib/ui/events/events_page_view_model.dart#L38
When I first clone the repo and open it, I'm seeing this error:
[inKino] flutter packages get
Running "flutter packages get" in inKino...
Incompatible version constraints on mockito:
void _updateShowDates(dynamic action, NextDispatcher next) {
var now = Clock.getCurrentTime();
var dates = List.generate(7, (index) => now.add(Duration(days: index)));
next(new ShowDatesUpdatedAction(dates));
}
I got this error message "The expression here has a type of 'void', and therefore cannot be used."
Detail
How do you handle the situation where you have V1 Client and v 1.1 server ?
There are a few techniques which i wil raise for discussion as i have tried a few difference ones.
Keep the URLs always the same and pass the version of the client in the header. The server then detects the version in the header and then handles the request this way. Not changing the URL is the whole point here as if you do then so much else has to constantly change.
Use GRPC. GRPC was designed so that the client and server can use have Data type models that are different in that if a field is added to the server model the client does not freak out.
Maybe some others.... ?
Cast pictures only show a generic thumbnail.
I would be useful to know what is missing for this to work (which file needs to be modified, etc)
This is the best format I could think of, to easily get embedded code snippets and links, and some notion of "actions".
Please note that my experience with mobile development only amounts to 1 React Native app, 1 iOS App, 0.1 Android app – and I did a bit of Dart once. I might be criticising things that are well-established conventions in the mobile / Dart world 🙂. I also nitpicked a lot.
==
operator or hashCode
), but worth stating anyway.map
over forEach
+ mutating an array). There isn't that much complicated logic in the app right now that it would make a big difference, but it would definitely help with readability.I'm not sure they really are missing 😄 I'm just surprised not to see them:
Make
, or a package.json
with yarn/npm in JS-land)I imagine these might come for free with the SDK though.
In no particular order, except for this first section,
I see the test
folder has the same structure as lib
, and test files are suffixed with _test
. Wouldn't this be easier to maintain if tests were located next to the file under test within lib
? (I imagine there's some convention to follow here – personally I like that approach because it makes it much easier to see what has and doesn't have tests). You also might not have to do things like For more, see test/event_name_cleaner_test.dart.
if the test file was right there.
Same for the test data inside test_assets
at the moment. It would make it much easier to understand the XML parsing code in say models/event
if the XML stub was right next to it.
The test data (https://github.com/roughike/inKino/tree/v1.0.0/test_assets) uses the assets
terminology, but those files technically aren't bundled with the app – should use stub
instead?
I'm not sure what to think of the terminology of having networking
and model
under data
. If the API you were talking to was anything that's not understood as a data source, it would still fall under networking
(eg. use the same networking utils) but wouldn't necessarily be data
. Also model
feels important enough that it should be top-level – and again models
are more than just data (business logic)
Finally, have you considered organizing the app code by feature/domain (eg events
, showtimes
, etc) rather than by file type / function (eg. redux
, models
)? It is sort of done already for Redux and the UI (which naturally work well by domain), so would be worth considering doing the same for the whole app IMHO.
inKino/test/data/event_test.dart
Lines 15 to 17 in ead83ac
sut
– system under test?. Not the clearest variable name IMHO. middleware
?inKino/lib/utils/event_name_cleaner.dart
Lines 10 to 11 in d885528
inKino/lib/data/models/event.dart
Lines 95 to 98 in d885528
inKino/lib/data/models/show.dart
Lines 32 to 36 in d885528
map
instead of a forEach
. (same comment for other models potentially)inKino/lib/data/models/theater.dart
Lines 8 to 11 in d885528
inKino/lib/data/networking/tmdb_api.dart
Lines 7 to 13 in d885528
tmdb_config.dart.sample
file with its content as what the README shows, and a cp
command in the README.inKino/lib/ui/common/info_message_view.dart
Lines 15 to 17 in d885528
inKino/lib/ui/theater_list/theater_list_view_model.dart
Lines 7 to 9 in d885528
inKino/lib/ui/showtimes/showtime_list.dart
Lines 19 to 21 in d885528
inKino/lib/ui/events/event_grid_item.dart
Lines 37 to 41 in d885528
inKino/lib/ui/events/event_poster.dart
Lines 38 to 45 in d885528
inKino/lib/ui/event_details/event_backdrop_photo.dart
Lines 39 to 48 in a54af3d
inKino/lib/ui/events/event_poster.dart
Lines 86 to 88 in d885528
example.com
, but I'm not entirely sure because I don't know how the placeholder works. Either way this seems like a bad idea – is there a better fallback value?_reducer
and _state
(and potentially _selectors
) to be co-located in the same file by default. All of this code is very tightly coupled, and is harder to follow in separate files (note: this might be true only in JS, maybe the IDE features for a language like Dart are good enough that it's less of an issue). That said, I know this isn't a very popular opinion even in JS land, and it only works if all those three things are relatively small, so take this with a grain of salt.inKino/lib/redux/app/app_middleware.dart
Lines 32 to 33 in d885528
Lines 20 to 22 in d885528
app
to be the one combining all of the others.inKino/lib/redux/event/event_selectors.dart
Lines 21 to 24 in d885528
LinkedSet
type in Dart?Did I mention the code actually is very readable?
webdev could not run for this project.
This version of webdev does not support the build_daemon
protocol used by your version of build_runner
.
Please add a dev dependency on build_daemon
with constraint: >=1.0.0 <2.0.0
On Android it does not rotate to landscape
Hi @roughike
Since this app is Apache v2 licensed, are you considering the fact to add it to F-Droid? There is a strong community behind.
You can find some documentation here.
Otherwise, if you don't want to work on the inclusion of this app by yourself, would it be ok for you if someone else do it for you?
When selecting for example Turku Kinopalatsi from the nav drawer, initially the app shows the poster of "A Quiet Place" for "[rec]" as well. However if you scroll down and then up again (this I assume refreshes the view), "[rec]" with no poster renders correctly.
First screenshot shows the incorrect state and second screenshot is after you scroll a bit and let the view refresh.
PS. Sorry for the gigantic screenshots :D
I have a doubt about why override == operator and hashCode
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.