mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-24 18:38:48 +01:00
Android version code
This commit is contained in:
parent
e63ae17014
commit
c979d644e7
2 changed files with 12 additions and 1 deletions
|
@ -25,3 +25,13 @@ class AndroidInfo {
|
||||||
/// Corresponding to Build.VERSION.SDK_INT
|
/// Corresponding to Build.VERSION.SDK_INT
|
||||||
final int sdkInt;
|
final int sdkInt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract class AndroidVersion {
|
||||||
|
static const O = 26;
|
||||||
|
// ignore: constant_identifier_names
|
||||||
|
static const O_MR1 = 27;
|
||||||
|
static const P = 28;
|
||||||
|
static const Q = 29;
|
||||||
|
static const R = 30;
|
||||||
|
static const S = 31;
|
||||||
|
}
|
||||||
|
|
|
@ -990,7 +990,8 @@ class _ThemeSettingsState extends State<_ThemeSettings> {
|
||||||
SliverList(
|
SliverList(
|
||||||
delegate: SliverChildListDelegate(
|
delegate: SliverChildListDelegate(
|
||||||
[
|
[
|
||||||
if (platform_k.isAndroid && AndroidInfo().sdkInt >= 29)
|
if (platform_k.isAndroid &&
|
||||||
|
AndroidInfo().sdkInt >= AndroidVersion.Q)
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
title: Text(L10n.global().settingsFollowSystemThemeTitle),
|
title: Text(L10n.global().settingsFollowSystemThemeTitle),
|
||||||
value: _isFollowSystemTheme,
|
value: _isFollowSystemTheme,
|
||||||
|
|
Loading…
Reference in a new issue