import 'package:aman_kassa_flutter/core/models/DictDao.dart'; import 'package:aman_kassa_flutter/core/models/user.dart'; import 'package:meta/meta.dart'; @immutable class MainState { final List bottomSheetElements; final bool bottomSheetLoading; final List prevCategories; MainState({this.bottomSheetElements, this.bottomSheetLoading, this.prevCategories}); factory MainState.initial() => MainState( bottomSheetElements: [], bottomSheetLoading: false, prevCategories: [], ); MainState copyWith({ @required bottomSheetElements, @required bottomSheetLoading, @required prevCategories, }) { return MainState( bottomSheetElements: bottomSheetElements ?? this.bottomSheetElements, bottomSheetLoading: bottomSheetLoading ?? this.bottomSheetLoading, prevCategories: prevCategories ?? this.prevCategories, ); } }