telegram_mini_app library
Classes
- MainButtonParams
- Flutter class input of TelegramMainButton.
- MiniAppInitData
- Docs: https://core.telegram.org/bots/webapps#webappinitdata
- MiniAppUser
- Docs: https://core.telegram.org/bots/webapps#webappuser
- PopupButton
- Popup button.
- TelegramTheme
-
Implement theme colors from telegram
themeParams
to flutterThemeData
- TelegramWebEvent
- Telegram Web Events.
- 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
- Docs: https://core.telegram.org/bots/webapps#themeparams
- TLAppChat
- Telegram App Chat.
- TLBackButton
- Telegram Back Button.
- TLHapticFeedback
- Telegram Haptic Feedback.
- TLMainButton
- Telegram Main Button.
- TLPopup
- Manage Telegram popups.
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
- backgroundColor → String
-
no setter
- colorScheme → String
-
no setter
- headerColor → String
-
no setter
- initData → String
-
Getters for properties
no setter
- initDataUnsafe → MiniAppInitData
-
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
no setter
- platform → String
-
no setter
- themeParams → ThemeParams
-
Getters for classes and objects
no setter
- tlBackButton → TLBackButton
-
no setter
- tlHapticFeedback → TLHapticFeedback
-
no setter
- tlMainButton → TLMainButton
-
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 chooseChatTypes]) → Future< void>
Typedefs
- ThemeChangeListener = dynamic Function(bool isDarkMode, ThemeParams params)
- ViewPortListener = dynamic Function(bool isStable, double height, double stableHeight)