Skip to content

Commit

Permalink
feat(app version widget): makes the version component have the color …
Browse files Browse the repository at this point in the history
…based on the theme PE-4533
  • Loading branch information
matibat committed Sep 28, 2023
1 parent 3070914 commit 791a442
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
16 changes: 13 additions & 3 deletions lib/authentication/login/views/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,15 @@ class _LoginPageScaffoldState extends State<LoginPageScaffold> {
// verify theme light
Resources.images.login.gridImage,
),
const Positioned(
Positioned(
bottom: 16,
left: 16,
child: AppVersionWidget(),
child: AppVersionWidget(
color: ArDriveTheme.of(context)
.themeData
.colors
.themeFgDefault,
),
),
],
),
Expand Down Expand Up @@ -146,7 +151,12 @@ class _LoginPageScaffoldState extends State<LoginPageScaffold> {
bottom: 16,
child: SizedBox(
width: MediaQuery.of(context).size.width - 32,
child: const AppVersionWidget(),
child: AppVersionWidget(
color: ArDriveTheme.of(context)
.themeData
.colors
.themeFgDefault,
),
),
),
],
Expand Down
9 changes: 7 additions & 2 deletions lib/components/app_version_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';

class AppVersionWidget extends StatelessWidget {
const AppVersionWidget({Key? key}) : super(key: key);
final Color color;

const AppVersionWidget({
Key? key,
this.color = Colors.grey,
}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand All @@ -27,7 +32,7 @@ class AppVersionWidget extends StatelessWidget {
return Text(
appLocalizationsOf(context).appVersion(literalVersion),
style: ArDriveTypography.body.buttonNormalRegular(
color: Colors.grey,
color: color,
),
textAlign: TextAlign.center,
);
Expand Down

0 comments on commit 791a442

Please sign in to comment.