Skip to content

Commit

Permalink
Refactor folder structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Iiro Krankka committed Jul 3, 2018
1 parent 1b1f246 commit 003e56d
Show file tree
Hide file tree
Showing 57 changed files with 85 additions and 89 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/data/models/event.dart → lib/models/event.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/utils/event_name_cleaner.dart';
import 'package:inkino/utils/xml_utils.dart';
import 'package:meta/meta.dart';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/utils/http_utils.dart';
import 'package:intl/intl.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';
import 'dart:convert';

import 'package:inkino/data/models/actor.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/models/event.dart';
/// If this has a red underline, it means that the lib/tmdb_config.dart file
/// is not present on the project. Refer to the README for instructions
/// on how to do so.
Expand All @@ -12,9 +12,6 @@ import 'package:inkino/utils/http_utils.dart';
/// is not present on the project. Refer to the README for instructions
/// on how to do so.
/// If this has a red underline, it means that the lib/tmdb_config.dart file
/// is not present on the project. Refer to the README for instructions
/// on how to do so.


class TMDBApi {
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/actor/actor_actions.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/models/event.dart';

class FetchActorAvatarsAction {
FetchActorAvatarsAction(this.event);
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/actor/actor_middleware.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:inkino/data/networking/tmdb_api.dart';
import 'package:inkino/networking/tmdb_api.dart';
import 'package:inkino/redux/actor/actor_actions.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/common_actions.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/actor/actor_reducer.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/redux/actor/actor_actions.dart';
import 'package:redux/redux.dart';

Expand Down
4 changes: 2 additions & 2 deletions lib/redux/actor/actor_selectors.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/redux/app/app_state.dart';

List<Actor> actorsForEventSelector(AppState state, Event event) {
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/app/app_state.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/redux/event/event_state.dart';
import 'package:inkino/redux/show/show_state.dart';
import 'package:inkino/redux/theater/theater_state.dart';
Expand Down
6 changes: 3 additions & 3 deletions lib/redux/common_actions.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/theater.dart';

class InitAction {}

Expand Down
4 changes: 2 additions & 2 deletions lib/redux/event/event_actions.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/foundation.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/theater.dart';

class RefreshEventsAction {}

Expand Down
4 changes: 2 additions & 2 deletions lib/redux/event/event_middleware.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';

import 'package:inkino/data/models/theater.dart';
import 'package:inkino/data/networking/finnkino_api.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/networking/finnkino_api.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/common_actions.dart';
import 'package:inkino/redux/event/event_actions.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/event/event_reducer.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/loading_status.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/loading_status.dart';
import 'package:inkino/redux/common_actions.dart';
import 'package:inkino/redux/event/event_actions.dart';
import 'package:inkino/redux/event/event_state.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/event/event_selectors.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:collection';

import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/redux/app/app_state.dart';

List<Event> eventsSelector(AppState state, EventListType type) {
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/event/event_state.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/loading_status.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/loading_status.dart';
import 'package:meta/meta.dart';

@immutable
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/show/show_actions.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/models/show.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/models/theater.dart';

class UpdateShowDatesAction {}

Expand Down
7 changes: 3 additions & 4 deletions lib/redux/show/show_middleware.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:inkino/data/models/show.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/data/networking/finnkino_api.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/networking/finnkino_api.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/common_actions.dart';
import 'package:inkino/redux/show/show_actions.dart';
Expand All @@ -11,7 +11,6 @@ import 'package:redux/redux.dart';

class ShowMiddleware extends MiddlewareClass<AppState> {
ShowMiddleware(this.api);

final FinnkinoApi api;

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/show/show_reducer.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/loading_status.dart';
import 'package:inkino/models/loading_status.dart';
import 'package:inkino/redux/common_actions.dart';
import 'package:inkino/redux/show/show_actions.dart';
import 'package:inkino/redux/show/show_state.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/show/show_selectors.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/redux/app/app_state.dart';

List<Show> showsSelector(AppState state) {
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/show/show_state.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/loading_status.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/loading_status.dart';
import 'package:inkino/models/show.dart';
import 'package:meta/meta.dart';

@immutable
Expand Down
4 changes: 2 additions & 2 deletions lib/redux/store.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:inkino/data/networking/finnkino_api.dart';
import 'package:inkino/data/networking/tmdb_api.dart';
import 'package:inkino/networking/finnkino_api.dart';
import 'package:inkino/networking/tmdb_api.dart';
import 'package:inkino/redux/actor/actor_middleware.dart';
import 'package:inkino/redux/app/app_reducer.dart';
import 'package:inkino/redux/app/app_state.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/theater/theater_middleware.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:async';

import 'package:flutter/services.dart';
import 'package:inkino/assets.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/common_actions.dart';
import 'package:redux/redux.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/theater/theater_selectors.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/redux/app/app_state.dart';

Theater currentTheaterSelector(AppState state) =>
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/theater/theater_state.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/theater.dart';
import 'package:meta/meta.dart';

@immutable
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/common/loading_view.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:inkino/data/loading_status.dart';
import 'package:inkino/models/loading_status.dart';
import 'package:meta/meta.dart';

class LoadingView extends StatefulWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/event_details/actor_scroller.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:inkino/assets.dart';
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/redux/actor/actor_actions.dart';
import 'package:inkino/redux/actor/actor_selectors.dart';
import 'package:inkino/redux/app/app_state.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/event_details/event_backdrop_photo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:ui' as ui;

import 'package:flutter/material.dart';
import 'package:inkino/assets.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/utils/widget_utils.dart';
import 'package:meta/meta.dart';

Expand Down
4 changes: 2 additions & 2 deletions lib/ui/event_details/event_details_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/ui/event_details/actor_scroller.dart';
import 'package:inkino/ui/event_details/event_backdrop_photo.dart';
import 'package:inkino/ui/event_details/event_details_scroll_effects.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/event_details/showtime_information.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/show.dart';
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
import 'package:url_launcher/url_launcher.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/event_details/storyline_widget.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';

class StorylineWidget extends StatefulWidget {
StorylineWidget(this.event);
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/events/event_grid.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/ui/common/info_message_view.dart';
import 'package:inkino/ui/event_details/event_details_page.dart';
import 'package:inkino/ui/events/event_grid_item.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/events/event_grid_item.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/ui/events/event_poster.dart';
import 'package:meta/meta.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/events/event_poster.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:inkino/assets.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/utils/widget_utils.dart';
import 'package:meta/meta.dart';
import 'package:url_launcher/url_launcher.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/events/events_page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/ui/common/info_message_view.dart';
import 'package:inkino/ui/common/loading_view.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/events/events_page_view_model.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/loading_status.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/loading_status.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/event/event_actions.dart';
import 'package:inkino/redux/event/event_selectors.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/main_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/search/search_actions.dart';
import 'package:inkino/ui/events/events_page.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/showtimes/showtime_list.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/ui/common/info_message_view.dart';
import 'package:inkino/ui/showtimes/showtime_list_tile.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/showtimes/showtime_list_tile.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/event/event_selectors.dart';
import 'package:inkino/ui/event_details/event_details_page.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/showtimes/showtime_page_view_model.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:inkino/data/loading_status.dart';
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/loading_status.dart';
import 'package:inkino/models/show.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/show/show_actions.dart';
import 'package:inkino/redux/show/show_selectors.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/theater_list/theater_list_view_model.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:inkino/redux/common_actions.dart';
import 'package:inkino/redux/theater/theater_selectors.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/mocks.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:io';

import 'package:flutter/services.dart';
import 'package:inkino/data/networking/finnkino_api.dart';
import 'package:inkino/networking/finnkino_api.dart';
import 'package:inkino/redux/app/app_state.dart';
import 'package:mockito/mockito.dart';
import 'package:redux/redux.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/event.dart';
import 'package:inkino/models/event.dart';
import 'package:test/test.dart';

void main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/show.dart';
import 'package:inkino/models/show.dart';
import 'package:test/test.dart';

void main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/theater.dart';
import 'package:test/test.dart';

void main() {
Expand Down
6 changes: 3 additions & 3 deletions test/redux/actor/actor_middleware_test.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:inkino/data/models/actor.dart';
import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/networking/tmdb_api.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/networking/tmdb_api.dart';
import 'package:inkino/redux/actor/actor_actions.dart';
import 'package:inkino/redux/actor/actor_middleware.dart';
import 'package:inkino/redux/common_actions.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/redux/actor/actor_reducer_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:inkino/data/models/actor.dart';
import 'package:inkino/models/actor.dart';
import 'package:inkino/redux/actor/actor_actions.dart';
import 'package:inkino/redux/app/app_reducer.dart';
import 'package:inkino/redux/app/app_state.dart';
Expand Down
4 changes: 2 additions & 2 deletions test/redux/event/event_middleware_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';

import 'package:inkino/data/models/event.dart';
import 'package:inkino/data/models/theater.dart';
import 'package:inkino/models/event.dart';
import 'package:inkino/models/theater.dart';
import 'package:inkino/redux/common_actions.dart';
import 'package:inkino/redux/event/event_actions.dart';
import 'package:inkino/redux/event/event_middleware.dart';
Expand Down
Loading

0 comments on commit 003e56d

Please sign in to comment.