dart_flutter_version
1.0.60, released 9 days ago by an unverified publisher
Retrieve current Dart and Flutter SDK runtime versions using nullable getters.
What it does
Parses the Dart SDK version from the platform and resolves the corresponding Flutter version via an internal mapping table. It exposes both versions at runtime using an easy-to-use API.
AI-written summary of version 1.0.59, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to detect the running Flutter or Dart SDK version programmatically
- You want to execute version-specific conditional logic or feature flags
- You need to log or display SDK version details for debugging purposes
Skip it when
- You need precision for non-stable release channels like beta, dev, or master
- You are targeting Flutter SDK versions older than 3.0.0
Strengths
- Enables runtime detection of Flutter SDK versions
- Lightweight with minimal dependencies
- Simple nullable getter API
Weaknesses
- Limited to stable channel releases
- Does not support Flutter versions below 3.0.0
- Mapped versions may have slight delays on new releases or platform variations
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Not documented
import 'package:flutter/material.dart';
import 'package:dart_flutter_version/dart_flutter_version.dart';
import 'package:pub_semver/pub_semver.dart';
void main() {
final DartFlutterVersion versionInfo = DartFlutterVersion();
final Version? dartVersion = versionInfo.dartVersion;
final Version? flutterVersion = versionInfo.flutterVersion;
print('Dart: $dartVersion, Flutter: $flutterVersion');
}Alternatives
Packages that do the same job and could replace dart_flutter_version.
- inappstory_plugin
A Flutter plugin to use InAppStory SDK. Supports Android and iOS platforms.
76Compare - flutter_rustore_update
Flutter RuStore Update SDK.
75Compare - flutter_launch_arguments
Retrieve Android and iOS launch arguments inside a Flutter app.
73Compare - polar
Dart plugin wrapper for the Polar BLE SDK on Android and iOS
73Compare
Works with
Packages commonly used together with dart_flutter_version: ones it builds on, ones built on it, and its own family.