-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create dynamics widgets for AdvantagesSection and update code
- Loading branch information
1 parent
27fe1fe
commit 16e449f
Showing
5 changed files
with
180 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
lib/app/pages/home/widgets/sections/advantages_section/advantages_section_horizontal.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'package:fludemy/app/core/theme/tokens/app_colors.dart'; | ||
|
||
class AdvantagesSectionHorizontal extends StatelessWidget { | ||
const AdvantagesSectionHorizontal({ | ||
super.key, | ||
required this.iconData, | ||
required this.title, | ||
required this.subtitle, | ||
}); | ||
|
||
final IconData iconData; | ||
final String title, subtitle; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Icon( | ||
iconData, | ||
color: AppColors.lotion, | ||
size: 50, | ||
), | ||
const SizedBox(width: 8), | ||
Column( | ||
children: [ | ||
Text( | ||
title, | ||
textAlign: TextAlign.center, | ||
style: const TextStyle( | ||
fontSize: 14, | ||
fontWeight: FontWeight.w800, | ||
color: AppColors.lotion, | ||
letterSpacing: 1.1, | ||
), | ||
), | ||
Text( | ||
subtitle, | ||
textAlign: TextAlign.center, | ||
style: const TextStyle( | ||
fontSize: 12, | ||
fontWeight: FontWeight.w600, | ||
color: AppColors.lotion, | ||
letterSpacing: 1.2, | ||
), | ||
), | ||
], | ||
), | ||
], | ||
); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
lib/app/pages/home/widgets/sections/advantages_section/advantages_section_vertical.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'package:fludemy/app/core/theme/tokens/app_colors.dart'; | ||
|
||
class AdvantagesSectionVertical extends StatelessWidget { | ||
const AdvantagesSectionVertical({ | ||
super.key, | ||
required this.iconData, | ||
required this.title, | ||
required this.subtitle, | ||
}); | ||
|
||
final IconData iconData; | ||
final String title, subtitle; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Icon( | ||
iconData, | ||
color: AppColors.lotion, | ||
size: 50, | ||
), | ||
const SizedBox(height: 8), | ||
Text( | ||
title, | ||
textAlign: TextAlign.center, | ||
style: const TextStyle( | ||
fontSize: 14, | ||
fontWeight: FontWeight.w800, | ||
color: AppColors.lotion, | ||
letterSpacing: 1.1, | ||
), | ||
), | ||
Text( | ||
subtitle, | ||
textAlign: TextAlign.center, | ||
style: const TextStyle( | ||
fontSize: 12, | ||
fontWeight: FontWeight.w600, | ||
color: AppColors.lotion, | ||
letterSpacing: 1.2, | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters