sdk_int 0.0.1 copy "sdk_int: ^0.0.1" to clipboard
sdk_int: ^0.0.1 copied to clipboard

PlatformAndroid

This plugin lets you get the Current SDK version for android. It includes all version codes to compare with.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:sdk_int/sdk_int.dart';

void main() {
  runApp(const MaterialApp(home: MyApp()));
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: FutureBuilder(
          future: SDKInt.currentSDKVersion,
          builder: (context, AsyncSnapshot<int> snapshot) {
            if (snapshot.hasData) {
              return Text(
                "Current SDK Version\n" + snapshot.data.toString(),
                textAlign: TextAlign.center,
              );
            }
            return const SizedBox.shrink();
          },
        ),
      ),
    );
  }
}
2
likes
140
points
114
downloads

Publisher

verified publisherpub.tamilkannancv.dev

Weekly Downloads

This plugin lets you get the Current SDK version for android. It includes all version codes to compare with.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on sdk_int