copyWith method

AppState copyWith({
  1. AppAuthStatus? appAuthStatus,
  2. AppStatus? appStatus,
  3. double? progress,
  4. String? progressHeaderText,
  5. String? currentPath,
  6. int? colorThemeIndex,
  7. ValueGetter<List<Widget Function()>>? overlayFullScreenChild,
  8. int? overlayFullScreenChildCount,
  9. NetworkStatus? networkStatus,
  10. String? networkErrorMessage,
  11. bool? showNetworkRetry,
  12. VersionUpdateInfo? versionUpdateInfo,
  13. bool? showVersionUpdateBanner,
  14. int? unreadNotificationCount,
  15. NotificationPermissionStatus? notificationPermissionStatus,
})

Implementation

AppState copyWith({
  AppAuthStatus? appAuthStatus,
  AppStatus? appStatus,
  double? progress,
  String? progressHeaderText,
  String? currentPath,
  int? colorThemeIndex,
  ValueGetter<List<Widget Function()>>? overlayFullScreenChild,
  int? overlayFullScreenChildCount,
  NetworkStatus? networkStatus,
  String? networkErrorMessage,
  bool? showNetworkRetry,
  VersionUpdateInfo? versionUpdateInfo,
  bool? showVersionUpdateBanner,
  int? unreadNotificationCount,
  NotificationPermissionStatus? notificationPermissionStatus,
}) {
  return AppState(
    appAuthStatus: appAuthStatus ?? this.appAuthStatus,
    appStatus: appStatus ?? this.appStatus,
    progress: progress ?? this.progress,
    progressHeaderText: progressHeaderText ?? this.progressHeaderText,
    currentPath: currentPath ?? this.currentPath,
    colorThemeIndex: colorThemeIndex ?? this.colorThemeIndex,
    overlayFullScreenChild:
        overlayFullScreenChild != null ? overlayFullScreenChild() : this.overlayFullScreenChild,
    overlayFullScreenChildCount: overlayFullScreenChildCount ?? this.overlayFullScreenChildCount,
    networkStatus: networkStatus ?? this.networkStatus,
    networkErrorMessage: networkErrorMessage ?? this.networkErrorMessage,
    showNetworkRetry: showNetworkRetry ?? this.showNetworkRetry,
    versionUpdateInfo: versionUpdateInfo ?? this.versionUpdateInfo,
    showVersionUpdateBanner: showVersionUpdateBanner ?? this.showVersionUpdateBanner,
    unreadNotificationCount: unreadNotificationCount ?? this.unreadNotificationCount,
    notificationPermissionStatus: notificationPermissionStatus ?? this.notificationPermissionStatus,
  );
}