Skip to content

Commit 3cf002e

Browse files
committed
settings [nfc]: Drop return value from updateGlobalSettings
We don't currently end up using this anywhere.
1 parent 32a6e80 commit 3cf002e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/model/store.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,13 @@ abstract class GlobalStore extends ChangeNotifier {
6464
GlobalSettingsData get globalSettings => _globalSettings;
6565
GlobalSettingsData _globalSettings;
6666

67-
/// Update the global settings in the store, returning the new version.
67+
/// Update the global settings in the store.
6868
///
6969
/// The global settings must already exist in the store.
70-
Future<GlobalSettingsData> updateGlobalSettings(GlobalSettingsCompanion data) async {
70+
Future<void> updateGlobalSettings(GlobalSettingsCompanion data) async {
7171
await doUpdateGlobalSettings(data);
7272
_globalSettings = _globalSettings.copyWithCompanion(data);
7373
notifyListeners();
74-
return _globalSettings;
7574
}
7675

7776
/// Update the global settings in the underlying data store.

test/model/store_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ void main() {
3737
final globalStore = eg.globalStore();
3838
check(globalStore).globalSettings.themeSetting.equals(null);
3939

40-
final result = await globalStore.updateGlobalSettings(
40+
await globalStore.updateGlobalSettings(
4141
GlobalSettingsCompanion(themeSetting: Value(ThemeSetting.dark)));
4242
check(globalStore).globalSettings.themeSetting.equals(ThemeSetting.dark);
43-
check(result).equals(globalStore.globalSettings);
4443
});
4544

4645
test('should notify listeners', () async {

0 commit comments

Comments
 (0)