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