Fix auth login button state and appearance
This commit is contained in:
@@ -19,6 +19,11 @@ class _AuthViewState extends State<AuthView> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tokenController.addListener(() {
|
||||
setState(() {
|
||||
// Update button state when text changes
|
||||
});
|
||||
});
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_focusNode.requestFocus();
|
||||
});
|
||||
@@ -111,12 +116,17 @@ class _AuthViewState extends State<AuthView> {
|
||||
: _verifyToken,
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
child: _isLoading
|
||||
? const SizedBox(
|
||||
? SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
)
|
||||
: const Text('Sign In'),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user