This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:bloc/bloc.dart'; | |
| import 'package:equatable/equatable.dart'; | |
| import 'package:flutter/foundation.dart'; | |
| import '../../../../core/core.dart'; | |
| import '../../../data/data.dart'; | |
| part 'movie_list_event.dart'; | |
| part 'movie_list_state.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| part of 'movie_list_bloc.dart'; | |
| @freezed | |
| class MovieListEvent with _$MovieListEvent { | |
| const factory MovieListEvent.getNowPlaying() = _GetNowPlaying; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| part of 'movie_list_bloc.dart'; | |
| sealed class MovieListEvent extends Equatable { | |
| const MovieListEvent(); | |
| @override | |
| List<Object?> get props => []; | |
| } | |
| final class GetNowPlaying extends MovieListEvent { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| part of 'movie_list_bloc.dart'; | |
| @freezed | |
| class MovieListState with _$MovieListState { | |
| const factory MovieListState.initial() = _Initial; | |
| const factory MovieListState.loading() = _Loading; | |
| const factory MovieListState.success(MovieListModel movieList) = _Success; | |
| const factory MovieListState.error() = _Error; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| part of 'movie_list_bloc.dart'; | |
| sealed class MovieListState extends Equatable { | |
| const MovieListState(); | |
| @override | |
| List<Object?> get props => []; | |
| } | |
| class MovieListInitial extends MovieListState {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| part of 'movie_list_bloc.dart'; | |
| enum MovieListStatus { initial, loading, success, failure } | |
| @freezed | |
| class MovieListState with _$MovieListState { | |
| const factory MovieListState({ | |
| @Default(MovieListStatus.initial) MovieListStatus status, | |
| @Default(MovieListModel()) MovieListModel movieList, | |
| }) = _MovieListState; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| part of 'movie_list_bloc.dart'; | |
| enum MovieListStatus { initial, loading, success, failure } | |
| final class MovieListState extends Equatable { | |
| const MovieListState({ | |
| this.status = MovieListStatus.initial, | |
| this.movieList = const MovieListModel(), | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:bloc/bloc.dart'; | |
| import 'package:equatable/equatable.dart'; | |
| import 'package:shared_preferences/shared_preferences.dart'; | |
| import '../models/language.dart'; | |
| part 'language_event.dart'; | |
| part 'language_state.dart'; | |
| const languagePrefsKey = 'languagePrefs'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| part of 'language_bloc.dart'; | |
| abstract class LanguageEvent extends Equatable { | |
| const LanguageEvent(); | |
| @override | |
| List<Object> get props => []; | |
| } | |
| class ChangeLanguage extends LanguageEvent { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import '../../../gen/assets.gen.dart'; | |
| import '../../../l10n/l10n.dart'; | |
| import '../../app_theme.dart'; | |
| import '../../components/components.dart'; | |
| import 'managers/language_bloc.dart'; | |
| import 'models/language.dart'; |