Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logo & text in main screen #869

Merged
merged 3 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions app/lib/screens/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class _AppState extends State<MainScreen> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Expanded(
const SizedBox(
height: 200,
child: Hero(
tag: 'logo',
child: HomeLogoWidget(
Expand All @@ -75,34 +76,32 @@ class _AppState extends State<MainScreen> {
),
const SizedBox(height: 50),
Container(
padding: const EdgeInsets.only(left: 12, right: 12),
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Text(
updateMessage != null
? updateMessage.toString()
: errorMessage.toString(),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
fontWeight: FontWeight.bold,
color: errorMessage != null
? Theme.of(context).colorScheme.error
: Theme.of(context).colorScheme.onSurface),
fontWeight: FontWeight.bold,
color: errorMessage != null
? Theme.of(context).colorScheme.error
: Theme.of(context).colorScheme.onSurface,
),
),
),
const SizedBox(
height: 40,
),
const SizedBox(height: 40),
Visibility(
maintainSize: true,
maintainAnimation: true,
maintainState: true,
visible: errorMessage != null,
child: ElevatedButton(
child: const Text(
'RETRY',
),
onPressed: () async {
await pushScreens();
},
))
maintainSize: true,
maintainAnimation: true,
maintainState: true,
visible: errorMessage != null,
child: ElevatedButton(
child: const Text('RETRY'),
onPressed: () async {
await pushScreens();
},
),
),
],
),
),
Expand Down
90 changes: 47 additions & 43 deletions app/lib/widgets/home_logo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,65 @@ class HomeLogoWidget extends StatelessWidget {
const HomeLogoWidget({super.key, required this.animate});

@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: animate
? Column(
children: [
Lottie.asset(
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: animate
? Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: 50,
height: 50,
zaelgohary marked this conversation as resolved.
Show resolved Hide resolved
child: Lottie.asset(
'assets/tfloading.json',
repeat: true,
animate: true,
width: 50,
height: 50,
),
const SizedBox(
height: 10,
),
Text(
'THREEFOLD',
style: Theme.of(context)
.textTheme
.headlineSmall!
.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold),
),
],
)
: SvgPicture.asset(
),
const SizedBox(height: 10),
Text(
'THREEFOLD',
style: Theme.of(context).textTheme.headlineSmall!.copyWith(
zaelgohary marked this conversation as resolved.
Show resolved Hide resolved
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold,
),
),
],
)
: SizedBox(
height: 50,
zaelgohary marked this conversation as resolved.
Show resolved Hide resolved
child: SvgPicture.asset(
'assets/TF_logo.svg',
alignment: Alignment.center,
colorFilter: ColorFilter.mode(
Theme.of(context).colorScheme.onSurface,
BlendMode.srcIn,
),
),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.04,
width: MediaQuery.of(context).size.width * 0.6,
child: Divider(
thickness: 2,
color: Theme.of(context).colorScheme.primary,
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.04,
width: MediaQuery.of(context).size.width * 0.6,
child: Divider(
thickness: 2,
color: Theme.of(context).colorScheme.primary,
),
),
Text(
'CONNECT',
style: Theme.of(context).textTheme.titleLarge!.copyWith(
),
Text(
'CONNECT',
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
letterSpacing: 10,
fontWeight: FontWeight.bold),
),
],
);
}
fontWeight: FontWeight.bold,
),
),
],
);
}

}