Skip to content

Commit 6962d5b

Browse files
Merge pull request #3 from IgorKhramtsov/IK_feed
Ik feed
2 parents c399b1a + 131e26c commit 6962d5b

14 files changed

+471
-104
lines changed

ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ SPEC CHECKSUMS:
2525

2626
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
2727

28-
COCOAPODS: 1.10.2
28+
COCOAPODS: 1.11.2

ios/Runner.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 51;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -121,7 +121,6 @@
121121
19B8936E9568C90A4BB0F7ED /* Pods-Runner.release.xcconfig */,
122122
ACC6E5DC50CB3DDCB322EC02 /* Pods-Runner.profile.xcconfig */,
123123
);
124-
name = Pods;
125124
path = Pods;
126125
sourceTree = "<group>";
127126
};
@@ -356,6 +355,7 @@
356355
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357356
CLANG_ENABLE_MODULES = YES;
358357
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
358+
DEVELOPMENT_TEAM = TN2XMHU5RV;
359359
ENABLE_BITCODE = NO;
360360
INFOPLIST_FILE = Runner/Info.plist;
361361
LD_RUNPATH_SEARCH_PATHS = (
@@ -484,6 +484,7 @@
484484
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
485485
CLANG_ENABLE_MODULES = YES;
486486
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
487+
DEVELOPMENT_TEAM = TN2XMHU5RV;
487488
ENABLE_BITCODE = NO;
488489
INFOPLIST_FILE = Runner/Info.plist;
489490
LD_RUNPATH_SEARCH_PATHS = (
@@ -506,6 +507,7 @@
506507
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
507508
CLANG_ENABLE_MODULES = YES;
508509
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
510+
DEVELOPMENT_TEAM = TN2XMHU5RV;
509511
ENABLE_BITCODE = NO;
510512
INFOPLIST_FILE = Runner/Info.plist;
511513
LD_RUNPATH_SEARCH_PATHS = (

lib/application/feed/bloc/feed_bloc.dart

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import 'dart:async';
22

33
import 'package:devour/domain/meme/abstract_meme_model.dart';
44
import 'package:devour/infrastructure/meme_scrapper/reddit_scrapper.dart';
5+
import 'package:flutter/cupertino.dart';
56
import 'package:flutter_bloc/flutter_bloc.dart';
7+
import 'package:fpdart/fpdart.dart' hide State;
68
import 'package:freezed_annotation/freezed_annotation.dart';
79
import 'package:injectable/injectable.dart';
810

@@ -36,9 +38,14 @@ class FeedBloc extends Bloc<FeedEvent, FeedState> {
3638
like: (e) async* {
3739
yield state;
3840
},
39-
next: (e) async* {
40-
yield state;
41+
select: (e) async* {
42+
yield state.copyWith(
43+
iterator: e.index,
44+
currentMemeWidget: e.key,
45+
);
4146
},
4247
);
4348
}
49+
50+
AbstractMemeModel get currentMemeModel => state.memes[state.iterator];
4451
}

0 commit comments

Comments
 (0)