flutter_telegram_web_app library
Classes
- MainButtonParams
- PopupButton
- TelegramBackButton
- https://core.telegram.org/bots/webapps#backbutton
- TelegramHapticFeedback
- https://core.telegram.org/bots/webapps#hapticfeedback
- TelegramMainButton
- https://core.telegram.org/bots/webapps#mainbutton
- TelegramPopup
- TelegramTheme
-
Implement theme colors from telegram
themeParams
to flutterThemeData
- TelegramWebEvent
- TelegramWebEventType
- Event types for Telegram Web we can use onEvent to listen to these events or few examples are added in TelegramWebEvent to listen to these events
- TelegramWebUtils
- Telegram Web Utils
- ThemeParams
- https://core.telegram.org/bots/webapps#themeparams
- WebAppChat
- https://core.telegram.org/bots/webapps#webappchat
- WebAppInitData
- https://core.telegram.org/bots/webapps#webappinitdata
- WebAppUser
- https://core.telegram.org/bots/webapps#webappuser
Enums
Extensions
- ColorsExtensions on Color
- Extension to convert a Color to a hex string
- StringExtensions on String
- Extension to convert a String to a Color
Properties
- BackButton → TelegramBackButton
-
no setter
- backgroundColor → String
-
no setter
- colorScheme → String
-
no setter
- HapticFeedback → TelegramHapticFeedback
-
no setter
- headerColor → String
-
no setter
- initData → String
-
Getters for properties
no setter
- initDataUnsafe → WebAppInitData
-
no setter
- isClosingConfirmationEnabled → bool
-
no setter
- isDarkMode → bool
-
All the properties and methods of the Telegram Web JS API
https://core.telegram.org/bots/webapps
no setter
- isExpanded → bool
-
no setter
- isSupported → bool
-
isSupported will return true only if opened inside Telegram web
no setter
- MainButton → TelegramMainButton
-
no setter
- platform → String
-
no setter
- themeParams → ThemeParams
-
Getters for classes and objects
no setter
- version → String
-
no setter
- viewportHeight → double?
-
no setter
- viewportStableHeight → double?
-
no setter
Functions
-
close(
) → Future< void> -
closeScanQrPopup(
) → Future< void> -
disableClosingConfirmation(
) → Future< void> -
enableClosingConfirmation(
) → Future< void> -
expand(
) → Future< void> -
isVersionAtLeast(
dynamic version) → Future< void> -
JsCallback<
T> (dynamic callback(T)) → dynamic - Callbacks
-
JsVoidCallback(
dynamic callback()) → dynamic -
offEvent(
String eventType, dynamic JsCallback) → void -
onEvent(
String eventType, dynamic JsCallback) → void - Events
-
openInvoice(
String url, [dynamic JsCallback]) → Future< void> -
openLink(
dynamic url, [dynamic options]) → Future< void> -
openTelegramLink(
String url) → Future< void> -
readTextFromClipboard(
dynamic JsCallback) → Future< void> -
ready(
) → Future< void> - Functions
-
sendData(
dynamic data) → Future< void> -
setBackgroundColor(
String color) → Future< void> -
setHeaderColor(
String color) → Future< void> -
showAlert(
String message, [dynamic JsCallback]) → Future< void> -
showConfirm(
String message, [dynamic JsCallback]) → Future< void> -
showPopup(
Record param, [dynamic JsCallback]) → Future< void> - Dialogs
-
showScanQrPopup(
Record params, [dynamic JsCallback]) → Future< void> -
switchInlineQuery(
dynamic query, [dynamic choose_chat_types]) → Future< void>
Typedefs
- ThemeChangeListener = dynamic Function(bool isDarkMode, ThemeParams params)
- ViewPortListener = dynamic Function(bool isStable, double height, double stableHeight)