sdk_int

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

Pub Version License


Implementation

SDKInt.currentSDKVersion is a Future<int> which returns the current SDK version of the OS

Android Implementation

Build.VERSION.SDK_INT is used to get the current SDK version


Example

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();
          },
        );

Codename and API Levels

CodenameAPI Level
BASE1
BASE_1_12
CUPCAKE3
DONUT4
ECLAIR5
ECLAIR_0_16
ECLAIR_MR17
FROYO8
GINGERBREAD9
GINGERBREAD_MR110
HONEYCOMB11
HONEYCOMB_MR112
HONEYCOMB_MR213
ICE_CREAM_SANDWICH14
ICE_CREAM_SANDWICH_MR115
JELLY_BEAN16
JELLY_BEAN_MR117
JELLY_BEAN_MR218
KITKAT19
KITKAT_WATCH20
LOLLIPOP21
LOLLIPOP_MR122
M23
N24
N_MR125
O26
O_MR127
P28
Q29
R30
S31

Contributing

If you have read up till here, then 🎉🎉🎉. There are couple of ways in which you can contribute to the growing community of sdk_int.dart.

  • Pick up any issue marked with "good first issue"
  • Propose any feature, enhancement
  • Report a bug
  • Fix a bug
  • Write and improve some documentation. Documentation is super critical and its importance cannot be overstated!
  • Send in a Pull Request 😊

Libraries

sdk_int