extract location outside of client options
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:stream_chat/src/core/http/interceptor/logging_interceptor.dart';
|
||||
import 'package:stream_chat/src/core/http/stream_chat_dio_error.dart';
|
||||
import 'package:stream_chat/src/core/http/token_manager.dart';
|
||||
import 'package:stream_chat/src/errors/stream_chat_error.dart';
|
||||
import 'package:stream_chat/src/location.dart';
|
||||
import 'package:stream_chat/src/platform_detector/platform_detector.dart';
|
||||
import 'package:stream_chat/version.dart';
|
||||
|
||||
|
||||
@@ -1,35 +1,5 @@
|
||||
part of 'stream_http_client.dart';
|
||||
|
||||
///
|
||||
enum Location {
|
||||
///
|
||||
usEast,
|
||||
|
||||
///
|
||||
euWest,
|
||||
|
||||
///
|
||||
mumbai,
|
||||
|
||||
///
|
||||
sydney,
|
||||
|
||||
///
|
||||
singapore,
|
||||
}
|
||||
|
||||
///
|
||||
extension LocationX on Location {
|
||||
///
|
||||
String get name => {
|
||||
Location.usEast: 'us-east',
|
||||
Location.euWest: 'dublin',
|
||||
Location.mumbai: 'mumbai',
|
||||
Location.sydney: 'sydney',
|
||||
Location.singapore: 'singapore',
|
||||
}[this]!;
|
||||
}
|
||||
|
||||
const _defaultBaseURL = 'https://chat-us-east-1.stream-io-api.com';
|
||||
|
||||
/// Client options to modify [StreamHttpClient]
|
||||
|
||||
Reference in New Issue
Block a user