bilguunint / movieapp Goto Github PK
View Code? Open in Web Editor NEWFlutter Movie app using rest api, bloc pattern
Flutter Movie app using rest api, bloc pattern
We have these Genres Tab:
Action, Adventure, Animation, Comedy, Crime, Documentary
When you pass from Tab Action to the next one Adventure the list of movies works fine
But when you pass from Tab Action to Crime it looks like it loads the one tab before it which is Comedy movies
Passing from a tab to its adjacent works fine but if you pass from Tab0 to Tab5 you will end up with content for Tab4
Same if you pass from Tab3 to Tab0 you will end up with content of Tab1
I debugged a little bit and added some spies in GenreMovies and it looks like it was called twice when moving to a tab that isn't adjacent
class _GenreMoviesState extends State {
final int genreId;
_GenreMoviesState(this.genreId);
@OverRide
void initState() {
super.initState();
print("Genre called: " + genreId.toString());
moviesByGenreBloc..getMoviesByGenre(genreId);
}
While changing to an adjacent tab it will be like
Genre called: 12
While if I change to a far Tab
Genre called: 16
Genre called: 35
Genre called: 16
getting many errors after running flutter run
.
../../../../flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:55:8: Error: The method 'DioHttpHeaders.add' has fewer named arguments than those of overridden method 'HttpHeaders.add'.
void add(String name, value) {
^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:698:8: Context: This is the overridden method ('add').
void add(String name, Object value,
^
../../../../flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:70:8: Error: The method 'DioHttpHeaders.set' has fewer named arguments than those of overridden method 'HttpHeaders.set'.
void set(String name, Object value) {
^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:707:8: Context: This is the overridden method ('set').
void set(String name, Object value,
^
FAILURE: Build failed with an exception.
* Where:
Script '/Users/surajg/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/surajg/flutter/bin/flutter'' finished with non-zero exit value 1
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.