A multiplatform Dart movie app with 40% of code sharing between Flutter and the Web.

Overview

inKino - a multiplatform Dart project with code sharing between Flutter and web

What is inKino?

Build Status

inKino is a multiplatform Dart app for browsing movies and showtimes for Finnkino cinemas.

InKino showcases Redux, has an extensive set of automated tests and 40% code sharing between Flutter and web. The Android & iOS apps are made with a single Flutter codebase. The progressive web app is made with AngularDart. This project is generally something that I believe is a good example of a multiplatform Dart project.

I plan on doing a full article series on multiplatform Dart stuff, so you might want to check out my blog and subscribe to it.

Get it on Google Play Get it on the App Store Get it on the App Store

Folder structure

There's three different folders. Each of them is a Dart project.

  • core: contains the pure Dart business logic, such API communication, Redux, XML parsing, sanitization, i18n, models and utilities. It also has a great test coverage.
  • mobile: this is the Flutter project. It imports core, and it's a 100% shared codebase for the native Android & iOS apps that go on app stores.
  • web: the AngularDart progressive web app. Also imports core, and it's the thing that is live at https://inkino.app.

To work on these projects, open each one of them in an editor of your choice.

For example, if you want to do a new feature and you do it for the Flutter project first, you'd open both core and mobile in separate editor windows. To clarify, you'd do File -> Open... for core and then File -> Open... again for mobile.

Development environment setup

  • Install Dart for the web. The customized Dart version Flutter ships with is not suitable for web development.
  • Install webdev by running pub global activate webdev. This requires that you ran your Dart installation properly and Dart is part of your PATH.
  • Install an IDE. You can't go wrong with WebStorm. If that doesn't tickle your fancy, there are other options too.
  • Install the Dart plugin for your IDE.

Finally, if you haven't already, install Flutter. And the Flutter plugin for your IDE. At the time of being, inKino is built with Flutter 1.0.

If you don't like IDEs, you can apparently use Emacs or Vim too.

Building the project

Renaming the TMDB configuration file

You don't need a TMDB API key, but the actor images won't load without it.

If you try to build the project straight away, you'll get an error complaining that a tmdb_config.dart file is missing. To resolve that, run this on your terminal in the project root:

cd core/lib/src && mv tmdb_config.dart.sample tmdb_config.dart && cd ../../..

OR

If you don't trust in random bash scripts copied from the Internet, you can just rename the tmdb_config.dart.sample to tmdb_config.dart manually.

Building from source

First, ensure that you followed the "Development environment setup" section above.

  • To run the web project, first run pub get initially, and then webdev serve in the root of the web project.
  • To run the Flutter project, open it in your editor and click the play button, or run flutter run on your terminal.

Contributing

Contributions are welcome! However, if it's going to be a major change, please create an issue first. Before starting to work on something, please comment on a specific issue and say you'd like to work on it.

Thanks

Special thanks to Olli Haataja for the design.

Additional thanks for the initial release go to Thibaud Colas, Brian Egan, Alessandro Aime and Juho Rautioaho for giving their extra pair of eyes for reviewing the source code.

Comments
  • Issue with loading Mockito

    Issue with loading Mockito

    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:

    • flutter_test 0.0.0 depends on version 2.2.3
    • inkino depends on version 3.0.0-alpha+3 pub get failed (1) exit code 1
    opened by mikeroosa 11
  • Constify inKino

    Constify inKino

    I've added const where it could be trivially swapped for new. I did indulge myself a little and swapped around widget construction in storyline_widget.dart to make more of the text widgets const.

    Fixes https://github.com/roughike/inKino/issues/71

    opened by jonahwilliams 6
  • Incorrect poster image loads in cases where a movie has no poster (sometimes)

    Incorrect poster image loads in cases where a movie has no poster (sometimes)

    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.

    screenshot_20180411-233721

    screenshot_20180411-233741

    PS. Sorry for the gigantic screenshots :D

    Priority: Medium Type: Bug Status: Not started/Idle 
    opened by iffa 3
  • PlatformAdaptiveProgressIndicator with 20% overhead in LoadingView

    PlatformAdaptiveProgressIndicator with 20% overhead in LoadingView

    Currently, the use of PlatformAdaptiveProgressIndicator in LoadingView https://github.com/roughike/inKino/blob/6e1752ff4d5b1a9abfc8afbe86054581de56b1a1/lib/ui/events/events_page.dart#L32-L43 causing the app to continually running at about 20% overhead.

    screen shot 2018-08-03 at 22 16 02

    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, https://github.com/roughike/inKino/blob/6e1752ff4d5b1a9abfc8afbe86054581de56b1a1/lib/ui/common/loading_view.dart#L115-L137

    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 👍

    opened by bluemix 2
  • Issue running app on iPhone/iOS

    Issue running app on iPhone/iOS

    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!

    opened by indyfromoz 2
  • Localization support

    Localization support

    Currently, every message and label is hardcoded, and the app works in English only. Localize the app the support both English and Finnish.

    Tasklist:

    • [x] Extract all hardcoded strings into a localization file
    • [x] Introduce English and Finnish localizations
    • [x] Modify the Finnkino API client to drop the en from the URLs when the detected language is Finnish
    Priority: Medium Type: Enhancement Status: Not started/Idle 
    opened by roughike 2
  • Screen Rotation

    Screen Rotation

    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?

    opened by ronlinet 1
  • Accepted Media Resource Formats

    Accepted Media Resource Formats

    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>
    
    
    opened by ronlinet 1
  • Use immutable collections from kt.dart

    Use immutable collections from kt.dart

    Adds kt.dart a new collection library for dart.

    • Uses KtList (immutable) instead of List mutable
    • Adds a test for removing duplicate moview (the ones with same originalTitle)

    Thanks that you wrote tests. I made it much easier to verify everything is working as before.

    Tested

    • [x] core
    • [x] web
    • [x] mobile
    opened by passsy 1
  •  Add background color to the web page

    Add background color to the web page

    This pr just tidies the web experience together by preventing the default white background from leaking.

    • Show theme color when overscrolling on macOS (rubber-banding)
    • Prevents the white splash when entering the site
    • Shows linear-gradient on slow connections until the background image is loaded

    Before

    screen shot 2018-12-23 at 1 19 27 pm screen shot 2018-12-23 at 2 49 45 pm

    After

    screen shot 2018-12-23 at 1 19 10 pm screen shot 2018-12-23 at 2 10 09 pm
    opened by jaripekkala 1
  • Add Itis theatre ID to preloaded_data.dart

    Add Itis theatre ID to preloaded_data.dart

    There's new theatre in Itis: https://www.finnkino.fi/itis

    This pull request adds Itis theatre ID from list of theatres (https://www.finnkino.fi/xml/TheatreAreas/) to preloaded_data.dart

    opened by aednlaxer 1
  • F-Droid inclusion

    F-Droid inclusion

    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?

    opened by Poussinou 0
Releases(v2.0.0)
Owner
Iiro Krankka
Iiro Krankka
Application that consumes the Movie Database (TMDB) api to show and search any kind of movie with its actors.

# cartelera A new Flutter project. ## Getting Started This project is a starting point for a Flutter application. A few resources to get you start

null 2 Jan 11, 2022
Elpee is a multiplatform app written entirely in Dart/Flutter.

elpee - Explore and share music About Elpee is a multiplatform app written entirely in Dart/Flutter. The data is retrieved from the Spotify Web API an

Tom van Lieshout 86 Oct 25, 2022
Android/multiplatform version of the Clew App.

Android/multiplatform version of the Clew App.

Lani 1 Dec 30, 2021
Flutter Web application having splash screen and providing Web view Using web view packege.

Webview with Splash Screen in Flutter Flutter Web View With Splash Screen. Subscribe Our YouTube Channel. Visit Website Demo OutPut ?? Links Getting S

Habib ullah 1 Dec 7, 2021
A live location sharing app built on Flutter and Firebase as backend

DISCLAIMER I want to stress on three main points: This was my first Flutter project so I have not used any best practices and it needs a lot of code r

ManojNB 234 Nov 26, 2022
An app for sharing polls in an interactive and anonymous way

Stay Home Polls App An app for sharing surveys in an interactive and anonymous way, mainly on sociocultural issues produced by the period of confineme

Albert Mañosa 5 May 22, 2022
Venni client app - A flutter ride-sharing end-user app supporting map location picking

Venni client app - A flutter ride-sharing end-user app supporting map location picking, driver location tracking, in-app credit card payments, trip rating system, and trip history.

Abrantes 1 Jan 3, 2022
Instagram is a free, online photo-sharing application and social network platform

Instagram is a free, online photo-sharing application and social network platform that was acquired by Facebook in 2012. Instagram allows users to edit and upload photos and short videos through a mobile app.

Behruz Hurramov 3 Jan 17, 2022
DoubtBin is a doubt solving and resources sharing portfolio.

DoubtBin is a doubt solving and resources sharing portfolio. It includes implemenation of concepts of Object Oriented Programming, Front-end Development and Back-end Development.

null 17 Oct 14, 2022
The expense sharing app.

Tabs The expense sharing app -- made with Flutter, Firebase and ❤️ . Keep track of what your friends owe you for that pizza you agreed to split; or re

Michael Roudnitski 280 Nov 23, 2022
ShareACab: App for sharing cab with college students

ShareACab An app for sharing cab with college students Description Usually, after exams or when the mid-sem break begins, there is a large surge of pe

DevClub IIT Delhi 67 Nov 23, 2022
CraftsMan is a middle man between artisans and clients. Download app and call ......

craftsman_refurbished class CraftsMan_Rebranded extends 100project_challenge { video() { return { "title": "Flutter Home Service Applicati

Akindoyin Faruq 5 May 12, 2022
Flutter plugin to run all creme sharing routines.

Creme Share plugin A Flutter plugin to share content from your Flutter app to social apps. Platform Support Android (WIP) iOS ❌ ✔️ Usage To use this p

Creme 9 Nov 4, 2022
Obfuscate sensitive data in your pictures before sharing them online.

Privacy Blur A cross-platform application to obfuscate sensitive data from images, targeting iOS and Android devices. Mainly written in dart with the

MATHEMA GmbH 67 Nov 5, 2022
Platform to post/say something without sharing personal information.

Anon is an Open Source Application where it's users will be able to share their thoughts without their identity being revealed i.e Anonymous. When the

Ismael Shakverdiev 18 Sep 13, 2022
Sharik is an open-source, cross-platform solution for sharing files via Wi-Fi or Mobile Hotspot

Share files across devices with Sharik! It works with Wi-Fi connection or Tethering (Wi-Fi Hotspot). No internet connection needed. Contributing Feel

Mark Motliuk 807 Nov 19, 2022
Sharing What I Love To Do

How to create release apk? flutter build apk --target-platform android-arm,android-arm64 --split-per-abi //normal flutter build apk --target-platform

Rajesh 54 Oct 21, 2022
Basic banking app - A Banking App that allow transfer money between multiple customers using SQLite database

basic_banking_app A Basic Banking App that allow transfer money between multiple

Esraa Mostfa 0 Feb 10, 2022
A new Flutter project. Blood Buddy is a mobile application designed to facilitate communication between donors and blood needs.

A new Flutter project. Blood Buddy is a mobile application designed to facilitate communication between donors and blood needs. The application includes two separate interfaces for hospital staff and donors.

Zehra Moğulkoç 1 Jun 15, 2022