mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-10 04:59:29 +00:00
routes
This commit is contained in:
parent
ebc14a0448
commit
f8597f7430
13 changed files with 509 additions and 33 deletions
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:whispering_pages/settings/models/api_settings.dart' as model;
|
||||
import 'package:whispering_pages/db/available_boxes.dart';
|
||||
import 'package:whispering_pages/settings/models/api_settings.dart' as model;
|
||||
|
||||
part 'api_settings_provider.g.dart';
|
||||
|
||||
|
|
@ -41,7 +41,12 @@ class ApiSettings extends _$ApiSettings {
|
|||
debugPrint('wrote api settings to box: $state');
|
||||
}
|
||||
|
||||
void updateState(model.ApiSettings newSettings) {
|
||||
void updateState(model.ApiSettings newSettings, {bool force = false}) {
|
||||
// check if the settings are different
|
||||
|
||||
if (state == newSettings && !force) {
|
||||
return;
|
||||
}
|
||||
state = newSettings;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue