From f9c31a7cff74c45b4a9ea6037dc64575b1e56b4f Mon Sep 17 00:00:00 2001 From: Plague Fox Date: Sat, 12 Aug 2023 14:18:59 +0400 Subject: [PATCH] Add username by default --- example/lib/src/common/constant/config.dart | 3 +++ .../lib/src/feature/authentication/widget/sign_in_form.dart | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/example/lib/src/common/constant/config.dart b/example/lib/src/common/constant/config.dart index bf2cc78..8227600 100644 --- a/example/lib/src/common/constant/config.dart +++ b/example/lib/src/common/constant/config.dart @@ -27,6 +27,9 @@ abstract final class Config { static const String centrifugeChannel = String.fromEnvironment('CENTRIFUGE_CHANNEL'); + /// Username by default. + static const String centrifugeUsername = + String.fromEnvironment('CENTRIFUGE_USERNAME'); // --- Layout --- // /// Maximum screen layout width for screen with list view. diff --git a/example/lib/src/feature/authentication/widget/sign_in_form.dart b/example/lib/src/feature/authentication/widget/sign_in_form.dart index 6cdaad5..5410ccd 100644 --- a/example/lib/src/feature/authentication/widget/sign_in_form.dart +++ b/example/lib/src/feature/authentication/widget/sign_in_form.dart @@ -76,7 +76,8 @@ class _SignInFormState extends State<_SignInForm> { _tokenController = TextEditingController(text: Config.centrifugeToken), _channelController = TextEditingController(text: Config.centrifugeChannel), - _usernameController = TextEditingController(), + _usernameController = + TextEditingController(text: Config.centrifugeUsername), _secretController = TextEditingController(); final FocusNode _endpointFocusNode = FocusNode(),