mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-19 00:29:32 +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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'api_settings_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$apiSettingsHash() => r'a6927751bd91ec7c9e1a2810dc939407d9112210';
|
||||
String _$apiSettingsHash() => r'f08d87b716b31bfb4040fc6440840ac97b7ee686';
|
||||
|
||||
/// See also [ApiSettings].
|
||||
@ProviderFor(ApiSettings)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue