File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,26 @@ class AppConfigurationBloc
5757 AppConfigurationUpdated event,
5858 Emitter <AppConfigurationState > emit,
5959 ) async {
60+ if (state.originalRemoteConfig == null ) {
61+ emit (
62+ state.copyWith (
63+ status: AppConfigurationStatus .failure,
64+ exception: const UnknownException (
65+ 'Original remote config is not available.' ,
66+ ),
67+ ),
68+ );
69+ return ;
70+ }
6071 emit (state.copyWith (status: AppConfigurationStatus .loading));
6172 try {
73+ final configToUpdate = event.remoteConfig.copyWith (
74+ createdAt: state.originalRemoteConfig! .createdAt,
75+ updatedAt: DateTime .now (),
76+ );
6277 final updatedConfig = await _remoteConfigRepository.update (
63- id: event.remoteConfig .id,
64- item: event.remoteConfig ,
78+ id: configToUpdate .id,
79+ item: configToUpdate ,
6580 );
6681 emit (
6782 state.copyWith (
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import 'package:flutter_news_app_web_dashboard_full_source_code/app/config/confi
66import 'package:flutter_news_app_web_dashboard_full_source_code/bootstrap.dart' ;
77
88// Define the current application environment (production/development/demo).
9- const AppEnvironment appEnvironment = AppEnvironment .demo ;
9+ const AppEnvironment appEnvironment = AppEnvironment .development ;
1010
1111@JS ('removeSplashFromWeb' )
1212external void removeSplashFromWeb ();
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ packages:
9090 description:
9191 path: "."
9292 ref: HEAD
93- resolved-ref: "7a1b54f8c0f94f6c04af3404c8110181e080b5c4"
93+ resolved-ref: f648500814ec636a2930498756029d29b363194a
9494 url: "https://github.com/flutter-news-app-full-source-code/core.git"
9595 source: git
9696 version: "0.0.0"
@@ -269,10 +269,10 @@ packages:
269269 dependency: "direct main"
270270 description:
271271 name: go_router
272- sha256: c489908a54ce2131f1d1b7cc631af9c1a06fac5ca7c449e959192089f9489431
272+ sha256: "8b1f37dfaf6e958c6b872322db06f946509433bec3de753c3491a42ae9ec2b48"
273273 url: "https://pub.dev"
274274 source: hosted
275- version: "16.0 .0"
275+ version: "16.1 .0"
276276 google_fonts:
277277 dependency: "direct main"
278278 description:
You can’t perform that action at this time.
0 commit comments