Skip to content
pubscout

telegram_web_app

0.3.3, released 2 years ago by an unverified publisher

Flutter wrapper for Telegram Web App JavaScript APIs on web platforms

WASM-ready
$ flutter pub add telegram_web_app
Source repository

What it does

Provides a Dart interface to Telegram Web App APIs, exposing version, theme, init data and other functions. Includes mockable implementations for testing outside Telegram.

AI-written summary of version 0.3.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • building Telegram mini‑apps with Flutter web
  • need to read Telegram user data or control the web app via Telegram API

Skip it when

  • targeting mobile‑only Flutter apps
  • requiring functionality outside the Telegram Web App environment

Strengths

  • simple API surface
  • mockable for tests
  • supports Bot API 8.0

Weaknesses

  • works only inside Telegram Web App
  • web‑only, no native support

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add <script src="https://telegram.org/js/telegram-web-app.js" defer></script> to web/index.html and import the package

import 'package:telegram_web_app/telegram_web_app.dart';

Text(TelegramWebApp.instance.version);

Alternatives

Packages that do the same job and could replace telegram_web_app.

  • source_span

    Standard representation for source code locations, spans, and human-friendly error messages.

  • bidi

    Converts logical RTL strings to their visual representation using the Unicode Bidirectional Algorithm.

  • dartdosh

    Flutter build and release CLI to automate version bumping, file naming, and uploads.

  • convert

    Encoders and decoders for converting between different data representations.