final
This commit is contained in:
@@ -4,10 +4,10 @@ import 'package:redux/redux.dart';
|
||||
|
||||
import '../actions.dart';
|
||||
|
||||
final cartInfoReducer = combineReducers<List<CartInfo>>([
|
||||
TypedReducer<List<CartInfo>, UpdateCartInfo>(_updateCartInfo)
|
||||
final cartInfoReducer = combineReducers<List<CartInfo>?>([
|
||||
TypedReducer<List<CartInfo>?, UpdateCartInfo>(_updateCartInfo)
|
||||
]);
|
||||
|
||||
List<CartInfo> _updateCartInfo(List<CartInfo> cartInfos, action) {
|
||||
List<CartInfo> _updateCartInfo(List<CartInfo>? cartInfos, action) {
|
||||
return action.cartInfos;
|
||||
}
|
||||
@@ -3,10 +3,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/store/actions.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
|
||||
final contextReducer = combineReducers<BuildContext>([
|
||||
TypedReducer<BuildContext, UpdateContext>(_updateContext)
|
||||
final contextReducer = combineReducers<BuildContext?>([
|
||||
TypedReducer<BuildContext?, UpdateContext>(_updateContext)
|
||||
]);
|
||||
|
||||
BuildContext _updateContext(BuildContext context, action) {
|
||||
BuildContext _updateContext(BuildContext? context, action) {
|
||||
return action.context;
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import 'package:redux/redux.dart';
|
||||
|
||||
import '../actions.dart';
|
||||
|
||||
final deviceIdReducer = combineReducers<String>([
|
||||
TypedReducer<String, UpdateDeviceId>(_updateDeviceId)
|
||||
final deviceIdReducer = combineReducers<String?>([
|
||||
TypedReducer<String?, UpdateDeviceId>(_updateDeviceId)
|
||||
]);
|
||||
|
||||
String _updateDeviceId(String deviceId, action) {
|
||||
String _updateDeviceId(String? deviceId, action) {
|
||||
return action.deviceId;
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import 'package:redux/redux.dart';
|
||||
|
||||
import '../actions.dart';
|
||||
|
||||
final fcmtokenReducer = combineReducers<String>([
|
||||
TypedReducer<String, UpdateFcmToken>(_updateFcmToken)
|
||||
final fcmtokenReducer = combineReducers<String?>([
|
||||
TypedReducer<String?, UpdateFcmToken>(_updateFcmToken)
|
||||
]);
|
||||
|
||||
String _updateFcmToken(String token, action) {
|
||||
String _updateFcmToken(String? token, action) {
|
||||
return action.token;
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import 'package:redux/redux.dart';
|
||||
|
||||
import '../actions.dart';
|
||||
|
||||
final lastVisitReducer = combineReducers<List<int>>([
|
||||
TypedReducer<List<int>, UpdateLastVisit>(_updateLastVisit)
|
||||
final lastVisitReducer = combineReducers<List<int>?>([
|
||||
TypedReducer<List<int>?, UpdateLastVisit>(_updateLastVisit)
|
||||
]);
|
||||
|
||||
List<int> _updateLastVisit(List<int> lastVisit, action) {
|
||||
List<int> _updateLastVisit(List<int>? lastVisit, action) {
|
||||
return action.lastVisit;
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/store/actions.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
|
||||
final localeReducer = combineReducers<Locale>([
|
||||
TypedReducer<Locale, UpdateLocale>(_updateLocale)
|
||||
final localeReducer = combineReducers<Locale?>([
|
||||
TypedReducer<Locale?, UpdateLocale>(_updateLocale)
|
||||
]);
|
||||
|
||||
Locale _updateLocale(Locale locale, action) {
|
||||
Locale _updateLocale(Locale? locale, action) {
|
||||
return action.locale;
|
||||
}
|
||||
@@ -3,10 +3,10 @@ import 'package:redux/redux.dart';
|
||||
import '../../models/located_address.dart';
|
||||
import '../actions.dart';
|
||||
|
||||
final locatedAddressReducer = combineReducers<LocatedAddress>([
|
||||
TypedReducer<LocatedAddress, UpdateLocatedAddress>(_updateLocatedAddress)
|
||||
final locatedAddressReducer = combineReducers<LocatedAddress?>([
|
||||
TypedReducer<LocatedAddress?, UpdateLocatedAddress>(_updateLocatedAddress)
|
||||
]);
|
||||
|
||||
LocatedAddress _updateLocatedAddress(LocatedAddress locatedAddress, action) {
|
||||
LocatedAddress _updateLocatedAddress(LocatedAddress? locatedAddress, action) {
|
||||
return action.locatedAddress;
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
import 'package:redux/redux.dart';
|
||||
import '../actions.dart';
|
||||
|
||||
final redirectRouteReducer = combineReducers<String>([
|
||||
TypedReducer<String, UpdateRedirectRoute>(_updateRedirectRoute)
|
||||
final redirectRouteReducer = combineReducers<String?>([
|
||||
TypedReducer<String?, UpdateRedirectRoute>(_updateRedirectRoute)
|
||||
]);
|
||||
|
||||
String _updateRedirectRoute(String route, action) {
|
||||
String? _updateRedirectRoute(String? route, action) {
|
||||
return action.route;
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import 'package:redux/redux.dart';
|
||||
|
||||
import '../actions.dart';
|
||||
|
||||
final tableNumberReducer = combineReducers<String>([
|
||||
TypedReducer<String, UpdateTableNumber>(_updateTableNumber)
|
||||
final tableNumberReducer = combineReducers<String?>([
|
||||
TypedReducer<String?, UpdateTableNumber>(_updateTableNumber)
|
||||
]);
|
||||
|
||||
String _updateTableNumber(String tableNumber, action) {
|
||||
String _updateTableNumber(String? tableNumber, action) {
|
||||
return action.tableNumber;
|
||||
}
|
||||
@@ -4,10 +4,10 @@ import 'package:flutter_wisetronic/models/user.dart';
|
||||
|
||||
import '../actions.dart';
|
||||
|
||||
final userReducer = combineReducers<User>([
|
||||
TypedReducer<User, UpdateCurrentUser>(_updateCurrentUser)
|
||||
final userReducer = combineReducers<User?>([
|
||||
TypedReducer<User?, UpdateCurrentUser>(_updateCurrentUser)
|
||||
]);
|
||||
|
||||
User _updateCurrentUser(User user, action) {
|
||||
User? _updateCurrentUser(User? user, action) {
|
||||
return action.user;
|
||||
}
|
||||
Reference in New Issue
Block a user