fix: Further improvements on app theming

This commit is contained in:
Alberto Ponces
2022-09-07 12:01:04 +01:00
parent 3b830cf15a
commit 1e890708d2
11 changed files with 98 additions and 46 deletions

View File

@ -19,14 +19,20 @@ class AvailableUpdatesCard extends StatelessWidget {
child: Center(
child: Column(
children: <Widget>[
const Icon(Icons.update_disabled, size: 40),
Icon(
size: 40,
Icons.update_disabled,
color: Theme.of(context).colorScheme.secondary,
),
const SizedBox(height: 16),
I18nText(
'homeView.noUpdates',
child: Text(
'',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.subtitle1!,
style: Theme.of(context).textTheme.subtitle1!.copyWith(
color: Theme.of(context).colorScheme.secondary,
),
),
)
],

View File

@ -19,14 +19,20 @@ class InstalledAppsCard extends StatelessWidget {
child: Center(
child: Column(
children: <Widget>[
const Icon(Icons.file_download_off, size: 40),
Icon(
size: 40,
Icons.file_download_off,
color: Theme.of(context).colorScheme.secondary,
),
const SizedBox(height: 16),
I18nText(
'homeView.noInstallations',
child: Text(
'',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.subtitle1!,
style: Theme.of(context).textTheme.subtitle1!.copyWith(
color: Theme.of(context).colorScheme.secondary,
),
),
)
],

View File

@ -36,9 +36,12 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
children: <Widget>[
I18nText(
'latestCommitCard.patcherLabel',
child: const Text(
child: Text(
'',
style: TextStyle(fontWeight: FontWeight.bold),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.secondary,
),
),
),
FutureBuilder<String>(
@ -56,6 +59,9 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
context,
'latestCommitCard.loadingLabel',
),
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
),
),
),
],
@ -65,22 +71,39 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
children: <Widget>[
I18nText(
'latestCommitCard.managerLabel',
child: const Text(
child: Text(
'',
style: TextStyle(fontWeight: FontWeight.bold),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.secondary,
),
),
),
FutureBuilder<String>(
future: _githubAPI.latestCommitTime(
_managerAPI.getManagerRepo(),
),
builder: (context, snapshot) =>
snapshot.hasData && snapshot.data!.isNotEmpty
? I18nText(
'latestCommitCard.timeagoLabel',
translationParams: {'time': snapshot.data!},
)
: I18nText('latestCommitCard.loadingLabel'),
builder: (context, snapshot) => snapshot.hasData &&
snapshot.data!.isNotEmpty
? I18nText(
'latestCommitCard.timeagoLabel',
translationParams: {'time': snapshot.data!},
child: Text(
'',
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
),
),
)
: I18nText(
'latestCommitCard.loadingLabel',
child: Text(
'',
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
),
),
),
),
],
),