Giter VIP home page Giter VIP logo

impuls-app-flutter's Introduction

Impuls-App-Flutter

Open-Source Festival-app written in Flutter for iOS & Android (and possibly web).

Codemagic build status

Get in touch

Chat with us

We don't bite... And we would love to have you onboard! ๐Ÿ˜

If you want to join us in creating awesome stuff, connect with us on Discord. You are also welcome to just hang around. ๐Ÿ˜‰

Report issues / feature requests

ZenHub

https://app.zenhub.com/workspaces/impuls-5e1f68bc7fc3f65df8ab07e6

Dependencies

Flutter

Flutter is the glue that make creating a universal app (iOS + Android) possible. Check it out , it's pretty awesome.

Getting started with developing

git clone [email protected]:kodekameratene/impuls-app-flutter.git
cd impuls-app-flutter
flutter pub get
flutter run

Updating icon

Icon

Replace the icon.png located assets/images/icon.png & run the following command.

flutter pub run flutter_launcher_icons:main

Updating splash screen

Splash

Replace the splash.png located assets/images/splash.png & run the following command.

flutter pub run flutter_native_splash:create

Try to keep the dimensions the same, so that it will show on all device-resolutions. The current one uses an iPhone SE as a baseline.

Make sure to upload the image with an alpha and change the background color in pubspec.yaml.

flutter_native_splash:
  image: assets/images/splash.png
  color: "#021f2d" <- Change this to your favorite background color

Folder structure

Here is the folder structure of our Flutter app. Flutter has generated an Android and iOS folder. If you open it you will see that they are normal ios & android projects.

But since we use Flutter, we mostly care about the lib-folder.

.
โ”œโ”€โ”€ android
โ”‚ย ย  โ”œโ”€โ”€ app
โ”‚ย ย  โ””โ”€โ”€ gradle
โ”œโ”€โ”€ assets
โ”‚ย ย  โ””โ”€โ”€ images
โ”œโ”€โ”€ build
โ”‚ย ย  โ”œโ”€โ”€ flutter_assets
โ”‚ย ย  โ””โ”€โ”€ ios
โ”œโ”€โ”€ ios
โ”‚ย ย  โ”œโ”€โ”€ Flutter
โ”‚ย ย  โ”œโ”€โ”€ Runner
โ”‚ย ย  โ”œโ”€โ”€ Runner.xcodeproj
โ”‚ย ย  โ””โ”€โ”€ Runner.xcworkspace
โ”œโ”€โ”€ lib
โ”‚ย ย  โ”œโ”€โ”€ models
โ”‚ย ย  โ”œโ”€โ”€ pages
โ”‚ย ย  โ”œโ”€โ”€ providers
โ”‚ย ย  โ”œโ”€โ”€ requests
โ”‚ย ย  โ”œโ”€โ”€ views
โ”‚ย ย  โ””โ”€โ”€ widgets
โ”œโ”€โ”€ resources
โ”œโ”€โ”€ test
โ””โ”€โ”€ web

Lib-folder

Let's take a closer look at the lib-folder.

lib
โ”œโ”€โ”€ main.dart
โ”œโ”€โ”€ models
โ”œโ”€โ”€ pages
โ”œโ”€โ”€ providers
โ”œโ”€โ”€ requests
โ”œโ”€โ”€ views
โ””โ”€โ”€ widgets

Main.dart

Right inside the lib-folder you find the main.dart. This is where the whole app gets setup and started.

You can se that we are wiring up our Providers at the root build-method of our app. This makes it easy for our widgets to share some state. Take a look at this video by Paul Halliday for an introduction to providers.

https://www.youtube.com/watch?v=8II1VPb-neQ

He is here also talking about bloc, but I don't think he actually is using the bloc-pattern... Anyways. It's a great video that made Providers easy for me to understand.

Models

A model is a class that represents the data we want to show in the app. It helps us in making sure that we use our data in a way that makes sense.

That was a bit abstract... Talk to Henry if you have any questions. Or update this readme with a better explanation. Thank you.

models
โ”œโ”€โ”€ Arrangement.dart
โ”œโ”€โ”€ Event.dart
โ”œโ”€โ”€ InfoPost.dart
โ””โ”€โ”€ NewsPost.dart

Tip: Use the amazing JSON to Dart-converter by Javier Lecuona to generate dart classes from your JSON.

Pages

This is where we put whole "fully-scaffolded" pages.

pages
โ”œโ”€โ”€ DetailPage.dart
โ”œโ”€โ”€ EventDetailPage.dart
โ”œโ”€โ”€ InfoDetailPage.dart
โ”œโ”€โ”€ NewsDetailPage.dart
โ”œโ”€โ”€ TabPage.dart
โ””โ”€โ”€ counter.dart

Navigate to SomePage

FlatButton(
  child: Text("Navigate to SomePage"),
  onPressed: () => Navigator.push(
    context,
    MaterialPageRoute(
      builder: (context) => SomePage(),
    ),
  ),
);

See https://flutter.dev/docs/cookbook/navigation/navigation-basics for a good introduction to navigation.

Providers

This is the famous provider. Makes it easy to share state up and down the application-tree cross widgets.

providers
โ”œโ”€โ”€ AppSettings.dart
โ”œโ”€โ”€ ArrangementProvider.dart
โ”œโ”€โ”€ EventProvider.dart
โ”œโ”€โ”€ EventsProvider.dart
โ”œโ”€โ”€ InfoProvider.dart
โ”œโ”€โ”€ NewsProvider.dart
โ””โ”€โ”€ counter_bloc.dart

Todo: Write an introduction

Requests

This is where we add all our api-endpoints. Currently we only have one api, that we simply call api.dart. But in the future, we may have a api weather.dart.

requests
โ””โ”€โ”€ api.dart

The api is connected to a provider that takes the data and makes objects with our models, then provides that data to all our other widgets.

Views

This is where we add our, you guessed it, Views. A View is a combination of multiple Widgets.

A View needs to be shown inside a Page since it lacks the scaffolding that is needed for making it a page.

views
โ”œโ”€โ”€ CalendarView.dart
โ”œโ”€โ”€ InfoView.dart
โ”œโ”€โ”€ IntroView.dart
โ””โ”€โ”€ NewsView.
dart

Widgets

Widgets, widgets, widgets.

This is the place to keep all our custom widgets.

widgets
โ”œโ”€โ”€ FrostedButton.dart
โ”œโ”€โ”€ decrement.dart
โ”œโ”€โ”€ increment.dart
โ””โ”€โ”€ toggleTheme.dart

Contribution guide

Properly naming branches

When creating a new feature or solving an issue. Create a new branch f/<featurename> We use f/ for features bf/ for bugfix etc... It doesn't matter that much as long as it makes sense.

PR

Then create a pull request aka. PR here on GitHub and assign me (sjoenH) or the utvikler-team as a reviewer. Assigning the utvikler-team will do some load-balancing, auto assigning someone in the team.

Your branch should be merged into the develop-branch (not straight into master). We only have production code in master-branch. We may delete the feature-branch after it has been merged into develop.

Publishing a new version

Make a PR from develop into master and tag your code. For example.

git tag v1.0.0
git push origin v1.0.0

Tagging a release should trigger a new build on Codemagic. Codemagic build status

Other stuff to remember

iOS screenshots to add when submitting to App Store

https://help.apple.com/app-store-connect/#/devd274dd925

Devices:

  • 6.5 inch (iPhone 11 Pro Max)
  • 5.5 inch (iPhone 8 Plus)
  • 12.9 inch (3rd generation iPad Pro)
  • 12.9 inch (2nd generation iPad Pro)

impuls-app-flutter's People

Contributors

renovate-bot avatar sjoenh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.