12 lines
363 B
Dart
12 lines
363 B
Dart
import 'package:redux/redux.dart';
|
|
import 'package:aman_kassa_flutter/model/Game.dart';
|
|
import 'package:aman_kassa_flutter/redux/actions.dart';
|
|
|
|
final gamesReducer = combineReducers<List<Game>>([
|
|
TypedReducer<List<Game>, AddGameAction>(_addGame),
|
|
]);
|
|
|
|
List<Game> _addGame(List<Game> games, AddGameAction action) {
|
|
return List.from(games)..add(action.game);
|
|
}
|