import 'package:flutter/material.dart'; import '../../core/data/models/drama.dart'; class HomeLogic { HomeLogic(List dramas) : currentDrama = dramas.first; final scaffoldKey = GlobalKey(); Drama currentDrama; int tab = 0; int searchRequest = 0; int sectionRequest = 0; int resumeRequest = 0; int backRequest = 0; int mySection = 0; bool drawerOpen = false; bool detailOpen = false; bool videoImmersive = false; void select( int nextTab, { bool search = false, bool watchlist = false, bool resume = false, int? mySection, }) { FocusManager.instance.primaryFocus?.unfocus(); tab = nextTab; if (search) searchRequest++; if (watchlist || mySection != null) { this.mySection = mySection ?? 1; sectionRequest++; } if (resume) resumeRequest++; } }