feat: versao do app e aviso de alpha na pagina sobre
Mostra a versao (via getVersion/package_info_plus) ao lado de um badge alpha e um aviso de que o app ainda esta em desenvolvimento.
This commit is contained in:
@@ -72,13 +72,12 @@ abstract class PlatformInfos {
|
|||||||
final l10n = L10n.of(context);
|
final l10n = L10n.of(context);
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
final size = MediaQuery.sizeOf(context);
|
final size = MediaQuery.sizeOf(context);
|
||||||
|
final version = await getVersion();
|
||||||
|
if (!context.mounted) return;
|
||||||
await m.showDialog<void>(
|
await m.showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => m.Dialog(
|
builder: (context) => m.Dialog(
|
||||||
insetPadding: const EdgeInsets.symmetric(
|
insetPadding: const EdgeInsets.symmetric(horizontal: 24, vertical: 40),
|
||||||
horizontal: 24,
|
|
||||||
vertical: 40,
|
|
||||||
),
|
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxWidth: 720,
|
maxWidth: 720,
|
||||||
@@ -110,13 +109,52 @@ abstract class PlatformInfos {
|
|||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
l10n.versionWithNumber(version),
|
||||||
|
style: theme.textTheme.bodyMedium?.copyWith(
|
||||||
|
color: theme.colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 8,
|
||||||
|
vertical: 2,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: theme.colorScheme.tertiaryContainer,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'alpha',
|
||||||
|
style: theme.textTheme.labelMedium?.copyWith(
|
||||||
|
color: theme.colorScheme.onTertiaryContainer,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
'Esta versão ainda está em fase alpha: o '
|
||||||
|
'aplicativo está em desenvolvimento e ainda pode '
|
||||||
|
'apresentar erros.',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: theme.textTheme.bodySmall?.copyWith(
|
||||||
|
color: theme.colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
Linkify(
|
Linkify(
|
||||||
text: aboutDescription,
|
text: aboutDescription,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(color: theme.colorScheme.onSurface),
|
||||||
color: theme.colorScheme.onSurface,
|
|
||||||
),
|
|
||||||
options: const LinkifyOptions(humanize: false),
|
options: const LinkifyOptions(humanize: false),
|
||||||
linkStyle: TextStyle(
|
linkStyle: TextStyle(
|
||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
|
|||||||
Reference in New Issue
Block a user