c3e6d66f43
- Added ReaderTtsPlaybackStore to manage TTS start requests with a maximum of 4 pending requests. - Updated app configuration to use a production API URL. - Enhanced BookmarkModel to infer type when not provided by the API for backward compatibility. - Introduced methods in LocalStore for saving, loading, and clearing the last route path. - Implemented syncProgress method in BookshelfNotifier to update reading progress and bookmarks from the server. - Modified ReaderScreen to handle chapter navigation and TTS playback more effectively, including auto-start logic. - Updated TtsPlayerWidget to accept additional parameters for chapter navigation. - Enhanced TtsNotifier to handle new parameters for TTS requests and manage playback state. - Improved SplashScreen to restore the last visited route after splash screen display.
30 lines
671 B
Dart
30 lines
671 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
class AppConfig {
|
|
AppConfig._();
|
|
|
|
static const String _baseUrlFromEnv = String.fromEnvironment('BASE_URL');
|
|
|
|
static String get baseUrl {
|
|
if (_baseUrlFromEnv.isNotEmpty) {
|
|
return _baseUrlFromEnv;
|
|
}
|
|
|
|
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android) {
|
|
return 'https://reader-api.fevirtus.dev';
|
|
}
|
|
|
|
return 'http://localhost:8000';
|
|
}
|
|
|
|
static const String googleClientId = String.fromEnvironment(
|
|
'GOOGLE_CLIENT_ID',
|
|
defaultValue: '',
|
|
);
|
|
|
|
static const String googleServerClientId = String.fromEnvironment(
|
|
'GOOGLE_SERVER_CLIENT_ID',
|
|
defaultValue: '',
|
|
);
|
|
}
|