fix(admin): make action surfaces tappable and simplify version display
This commit is contained in:
@@ -2357,33 +2357,41 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
|||||||
scale: isFocused ? 1.01 : 1.0,
|
scale: isFocused ? 1.01 : 1.0,
|
||||||
duration: const Duration(milliseconds: 140),
|
duration: const Duration(milliseconds: 140),
|
||||||
curve: Curves.easeOutCubic,
|
curve: Curves.easeOutCubic,
|
||||||
child: AnimatedContainer(
|
child: Material(
|
||||||
duration: const Duration(milliseconds: 140),
|
color: Colors.transparent,
|
||||||
curve: Curves.easeOutCubic,
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
child: InkWell(
|
||||||
decoration: BoxDecoration(
|
onTap: onActivate,
|
||||||
color: isFocused
|
|
||||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
|
||||||
: Colors.transparent,
|
|
||||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
border: Border.all(
|
child: AnimatedContainer(
|
||||||
color: isFocused
|
duration: const Duration(milliseconds: 140),
|
||||||
? SacredColors.primary.withValues(alpha: 0.95)
|
curve: Curves.easeOutCubic,
|
||||||
: Colors.transparent,
|
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||||
width: isFocused ? 3 : 0,
|
decoration: BoxDecoration(
|
||||||
|
color: isFocused
|
||||||
|
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||||
|
: Colors.transparent,
|
||||||
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
|
border: Border.all(
|
||||||
|
color: isFocused
|
||||||
|
? SacredColors.primary.withValues(alpha: 0.95)
|
||||||
|
: Colors.transparent,
|
||||||
|
width: isFocused ? 3 : 0,
|
||||||
|
),
|
||||||
|
boxShadow: isFocused
|
||||||
|
? [
|
||||||
|
BoxShadow(
|
||||||
|
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||||
|
blurRadius: 24 * s,
|
||||||
|
spreadRadius: 2 * s,
|
||||||
|
),
|
||||||
|
]
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
child: ExcludeFocus(
|
||||||
|
child: builder?.call(isFocused) ?? child!,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
boxShadow: isFocused
|
|
||||||
? [
|
|
||||||
BoxShadow(
|
|
||||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
|
||||||
blurRadius: 24 * s,
|
|
||||||
spreadRadius: 2 * s,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
child: ExcludeFocus(
|
|
||||||
child: builder?.call(isFocused) ?? child!,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -2420,32 +2428,40 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
|||||||
scale: isFocused ? 1.01 : 1.0,
|
scale: isFocused ? 1.01 : 1.0,
|
||||||
duration: const Duration(milliseconds: 140),
|
duration: const Duration(milliseconds: 140),
|
||||||
curve: Curves.easeOutCubic,
|
curve: Curves.easeOutCubic,
|
||||||
child: AnimatedContainer(
|
child: Material(
|
||||||
duration: const Duration(milliseconds: 140),
|
color: Colors.transparent,
|
||||||
curve: Curves.easeOutCubic,
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
child: InkWell(
|
||||||
decoration: BoxDecoration(
|
onTap: onActivate,
|
||||||
color: isFocused
|
|
||||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
|
||||||
: Colors.transparent,
|
|
||||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
border: Border.all(
|
child: AnimatedContainer(
|
||||||
color: isFocused
|
duration: const Duration(milliseconds: 140),
|
||||||
? SacredColors.primary.withValues(alpha: 0.95)
|
curve: Curves.easeOutCubic,
|
||||||
: Colors.transparent,
|
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||||
width: isFocused ? 3 : 0,
|
decoration: BoxDecoration(
|
||||||
|
color: isFocused
|
||||||
|
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||||
|
: Colors.transparent,
|
||||||
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
|
border: Border.all(
|
||||||
|
color: isFocused
|
||||||
|
? SacredColors.primary.withValues(alpha: 0.95)
|
||||||
|
: Colors.transparent,
|
||||||
|
width: isFocused ? 3 : 0,
|
||||||
|
),
|
||||||
|
boxShadow: isFocused
|
||||||
|
? [
|
||||||
|
BoxShadow(
|
||||||
|
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||||
|
blurRadius: 24 * s,
|
||||||
|
spreadRadius: 2 * s,
|
||||||
|
),
|
||||||
|
]
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
child: builder != null ? builder(isFocused) : child!,
|
||||||
),
|
),
|
||||||
boxShadow: isFocused
|
|
||||||
? [
|
|
||||||
BoxShadow(
|
|
||||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
|
||||||
blurRadius: 24 * s,
|
|
||||||
spreadRadius: 2 * s,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
child: builder != null ? builder(isFocused) : child!,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -2481,33 +2497,41 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
|||||||
scale: isFocused ? 1.01 : 1.0,
|
scale: isFocused ? 1.01 : 1.0,
|
||||||
duration: const Duration(milliseconds: 140),
|
duration: const Duration(milliseconds: 140),
|
||||||
curve: Curves.easeOutCubic,
|
curve: Curves.easeOutCubic,
|
||||||
child: AnimatedContainer(
|
child: Material(
|
||||||
duration: const Duration(milliseconds: 140),
|
color: Colors.transparent,
|
||||||
curve: Curves.easeOutCubic,
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
child: InkWell(
|
||||||
decoration: BoxDecoration(
|
onTap: onActivate,
|
||||||
color: isFocused
|
|
||||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
|
||||||
: Colors.transparent,
|
|
||||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
border: Border.all(
|
child: AnimatedContainer(
|
||||||
color: isFocused
|
duration: const Duration(milliseconds: 140),
|
||||||
? SacredColors.primary.withValues(alpha: 0.95)
|
curve: Curves.easeOutCubic,
|
||||||
: Colors.transparent,
|
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||||
width: isFocused ? 3 : 0,
|
decoration: BoxDecoration(
|
||||||
|
color: isFocused
|
||||||
|
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||||
|
: Colors.transparent,
|
||||||
|
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||||
|
border: Border.all(
|
||||||
|
color: isFocused
|
||||||
|
? SacredColors.primary.withValues(alpha: 0.95)
|
||||||
|
: Colors.transparent,
|
||||||
|
width: isFocused ? 3 : 0,
|
||||||
|
),
|
||||||
|
boxShadow: isFocused
|
||||||
|
? [
|
||||||
|
BoxShadow(
|
||||||
|
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||||
|
blurRadius: 24 * s,
|
||||||
|
spreadRadius: 2 * s,
|
||||||
|
),
|
||||||
|
]
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
child: ExcludeFocus(
|
||||||
|
child: builder?.call(isFocused) ?? child!,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
boxShadow: isFocused
|
|
||||||
? [
|
|
||||||
BoxShadow(
|
|
||||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
|
||||||
blurRadius: 24 * s,
|
|
||||||
spreadRadius: 2 * s,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
child: ExcludeFocus(
|
|
||||||
child: builder?.call(isFocused) ?? child!,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -3822,7 +3846,7 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
|||||||
SizedBox(height: 20 * s),
|
SizedBox(height: 20 * s),
|
||||||
_buildStatusRow(
|
_buildStatusRow(
|
||||||
'Versi Saat Ini',
|
'Versi Saat Ini',
|
||||||
currentVersion?.displayLabel ?? 'Memuat versi...',
|
currentVersion?.versionName ?? 'Memuat versi...',
|
||||||
HugeIcons.strokeRoundedPackage,
|
HugeIcons.strokeRoundedPackage,
|
||||||
s,
|
s,
|
||||||
),
|
),
|
||||||
@@ -3850,7 +3874,7 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
|||||||
SizedBox(height: 20 * s),
|
SizedBox(height: 20 * s),
|
||||||
_buildStatusRow(
|
_buildStatusRow(
|
||||||
'Versi Remote',
|
'Versi Remote',
|
||||||
'${remote.latestVersion}+${remote.versionCode}',
|
remote.latestVersion,
|
||||||
HugeIcons.strokeRoundedPackage,
|
HugeIcons.strokeRoundedPackage,
|
||||||
s,
|
s,
|
||||||
),
|
),
|
||||||
@@ -3985,7 +4009,10 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
|||||||
if (result.updateAvailable) {
|
if (result.updateAvailable) {
|
||||||
final remote = result.remote;
|
final remote = result.remote;
|
||||||
if (remote == null) return 'Update tersedia';
|
if (remote == null) return 'Update tersedia';
|
||||||
return 'Update tersedia ke ${remote.latestVersion}+${remote.versionCode}';
|
if (remote.latestVersion == result.current.versionName) {
|
||||||
|
return 'Update build tersedia untuk versi ${remote.latestVersion}';
|
||||||
|
}
|
||||||
|
return 'Update tersedia ke ${remote.latestVersion}';
|
||||||
}
|
}
|
||||||
return 'Versi ini sudah terbaru';
|
return 'Versi ini sudah terbaru';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: jamshalat_masjid_screen
|
name: jamshalat_masjid_screen
|
||||||
description: Smart Digital Prayer Clock for Android TV Box
|
description: Smart Digital Prayer Clock for Android TV Box
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.0.1+2
|
version: 1.0.2+3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.0 <4.0.0'
|
sdk: '>=3.0.0 <4.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user