Skip to content
pubscout

flutter_telegram_miniapp

0.1.2, released 2 months ago by an unverified publisher

Flutter wrapper for the Telegram Mini Apps API with type-safe Dart classes.

WASM-ready
$ flutter pub add flutter_telegram_miniapp
Source repository

What it does

Provides type-safe Dart classes and methods to access the Telegram Mini Apps JavaScript API. Handles underlying JS interop for UI control, event handling, cloud storage, and device sensors within Telegram.

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

Use it when

  • You are building a Flutter application designed to run as a Telegram Mini App
  • You need to access Telegram Web App API features like theme colors, popups, and user data

Skip it when

  • You are building a standard mobile or web app outside the Telegram ecosystem

Strengths

  • Strongly typed enums and classes for Telegram Web App API parameters and responses
  • Supports asynchronous operations and event handling through streams
  • Ready for compilation in WASM

Weaknesses

  • Requires manual inclusion of the external Telegram web app script in index.html
  • Tightly coupled to the Telegram Mini Apps platform

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add the Telegram Mini Apps JavaScript script tag to your web/index.html file.

void main() {
  try {
    WebApp().init();
    runApp(MyApp());
  } catch (e) {
    print('Error initializing Mini App: $e');
  }
}

Alternatives

Packages that do the same job and could replace flutter_telegram_miniapp.