Replace Telegram widget with bot login
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 2m22s

This commit is contained in:
Ruslan Bakiev
2026-05-08 19:32:01 +07:00
parent cd62a0a428
commit 5f33a5e880
9 changed files with 276 additions and 95 deletions

View File

@@ -1,2 +1,26 @@
export 'telegram_login_button_stub.dart'
if (dart.library.html) 'telegram_login_button_web.dart';
import 'package:flutter/material.dart';
class TelegramLoginButton extends StatelessWidget {
const TelegramLoginButton({
required this.onPressed,
required this.loading,
super.key,
});
final VoidCallback? onPressed;
final bool loading;
@override
Widget build(BuildContext context) {
return FilledButton.icon(
onPressed: loading ? null : onPressed,
icon: loading
? const SizedBox.square(
dimension: 18,
child: CircularProgressIndicator(strokeWidth: 2),
)
: const Icon(Icons.telegram),
label: const Text('Войти через Telegram'),
);
}
}