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 'package:statemanagement/bloc/cats_cubit.dart'; | |
| import 'package:statemanagement/bloc/cats_repository.dart'; | |
| import 'package:statemanagement/bloc/cats_state.dart'; | |
| class BlocCatsView extends StatefulWidget { | |
| @override | |
| _BlocCatsViewState createState() => _BlocCatsViewState(); | |
| } |
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
| extension HomePresenter: HomeViewOutputs { | |
| func viewDidLoad() { | |
| view?.configure(entities: HomeEntities(entryEntity: HomeEntryEntity(language: "vb"))) | |
| entites.catApiState = .loading | |
| view?.indicatorView(animate: true) | |
| dependencies.interactor.fetchCats() | |
| view?.setupTableViewCell() | |
| } | |
| } |
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
| final class HomeRouterOutput: Routerable { | |
| private(set) weak var view: Viewable! | |
| init(_ view: Viewable) { | |
| self.view = view | |
| } | |
| func navigateToDetail(httpCat: Cat) { | |
| let detailEntitites = DetailEntites(entryEntity: DetailEntity(title: "Detail", heroKey: "hero")) | |
| detailEntitites.catItem = httpCat |
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
| struct HomeRouterInput { | |
| private func view(entryEntity: HomeEntryEntity) -> HomeViewController { | |
| let view = HomeViewController() | |
| let interactor = HomeInteractor(networkManager: NetworkManager(config: NetworkConfig(baseUrl: ApplicatonConstants.BASE_URL))) | |
| let dependecies = HomePresenterDependencies( | |
| interactor: interactor, | |
| router: HomeRouterOutput(view) | |
| ) |
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
| class HomeInteractor: Interactorable { | |
| var presenter: HomeInteractorOutputs? | |
| var networkManager: INetworkService | |
| init(networkManager: INetworkService) { | |
| self.networkManager = networkManager | |
| } | |
| func fetchCats() { |
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
| protocol HomeInteractorOutputs { | |
| func onSuccessSearch(res: CatRepositoresResponse) | |
| func onErrorSearch(error: BaseError) | |
| } | |
| protocol HomeViewInputs { | |
| func configure(entities: HomeEntities) | |
| func reloadTableView(tableViewDataSource: HomeTableViewDataSoruce) | |
| func setupTableViewCell() | |
| func indicatorView(animate: Bool) |
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
| 0legg.flutter-create-helper | |
| aaron-bond.better-comments | |
| achil.vscode-javascript-repl | |
| adpyke.codesnap | |
| afractal.node-essentials | |
| akamud.vscode-theme-onedark | |
| aksharpatel47.vscode-flutter-helper | |
| alexisvt.flutter-snippets | |
| amandeepmittal.expressjs | |
| ardenivanov.svelte-intellisense |
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
| selectAll => (: ")(.*?)(?:") |
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'; | |
| class BookJsonView extends StatefulWidget { | |
| @override | |
| _BookJsonViewState createState() => _BookJsonViewState(); | |
| } | |
| class _BookJsonViewState extends State<BookJsonView> { | |
| List<BookModel> books = [ | |
| BookModel("Genesis", Book(1, "24", [1, 1, 2, 3])) |
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'; | |
| class BookJsonView extends StatefulWidget { | |
| @override | |
| _BookJsonViewState createState() => _BookJsonViewState(); | |
| } | |
| class _BookJsonViewState extends State<BookJsonView> { | |
| List<BookModel> books = [ | |
| BookModel("Genesis", Book(1, "24", [1, 1, 2, 3])) |