import 'package:cs_resources/generated/assets.dart'; import 'package:flutter/material.dart'; import 'package:shared/utils/color_utils.dart'; class GaragesaleState { int? useTag; int? curPage; int? pageSize; int? filterCount; int? activeIndex = 0; List tabsList = []; List? list = []; GaragesaleState copyWith({ int? useTag, int? curPage, int? pageSize, int? filterCount, int? activeIndex, List? tabsList, List? list, }) { return GaragesaleState( useTag: useTag ?? this.useTag, curPage: curPage ?? this.curPage, pageSize: pageSize ?? this.pageSize, filterCount: filterCount ?? this.filterCount, activeIndex: activeIndex ?? this.activeIndex, tabsList: tabsList ?? this.tabsList, list: list ?? this.list, ); } Map toMap() { return { 'useTag': this.useTag, 'curPage': this.curPage, 'pageSize': this.pageSize, 'filterCount': this.filterCount, 'activeIndex': this.activeIndex, 'tabsList': this.tabsList, 'list': this.list, }; } factory GaragesaleState.fromMap(Map map) { return GaragesaleState( useTag: map['useTag'] as int, curPage: map['curPage'] as int, pageSize: map['pageSize'] as int, filterCount: map['filterCount'] as int, activeIndex: map['activeIndex'] as int, tabsList: map['tabsList'] as List, list: map['list'] as List, ); } GaragesaleState({ this.useTag, this.curPage, this.pageSize, this.filterCount, this.activeIndex, required this.tabsList, this.list, }); }