File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,13 @@ abstract class GlobalStore extends ChangeNotifier {
64
64
GlobalSettingsData get globalSettings => _globalSettings;
65
65
GlobalSettingsData _globalSettings;
66
66
67
- /// Update the global settings in the store, returning the new version .
67
+ /// Update the global settings in the store.
68
68
///
69
69
/// The global settings must already exist in the store.
70
- Future <GlobalSettingsData > updateGlobalSettings (GlobalSettingsCompanion data) async {
70
+ Future <void > updateGlobalSettings (GlobalSettingsCompanion data) async {
71
71
await doUpdateGlobalSettings (data);
72
72
_globalSettings = _globalSettings.copyWithCompanion (data);
73
73
notifyListeners ();
74
- return _globalSettings;
75
74
}
76
75
77
76
/// Update the global settings in the underlying data store.
Original file line number Diff line number Diff line change @@ -37,10 +37,9 @@ void main() {
37
37
final globalStore = eg.globalStore ();
38
38
check (globalStore).globalSettings.themeSetting.equals (null );
39
39
40
- final result = await globalStore.updateGlobalSettings (
40
+ await globalStore.updateGlobalSettings (
41
41
GlobalSettingsCompanion (themeSetting: Value (ThemeSetting .dark)));
42
42
check (globalStore).globalSettings.themeSetting.equals (ThemeSetting .dark);
43
- check (result).equals (globalStore.globalSettings);
44
43
});
45
44
46
45
test ('should notify listeners' , () async {
You can’t perform that action at this time.
0 commit comments