Skip to content

Commit c72aded

Browse files
committed
Added custom colors for text widgets, updated skills page color scheme, added accent color for pages
1 parent 56efb08 commit c72aded

File tree

11 files changed

+155
-58
lines changed

11 files changed

+155
-58
lines changed

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Используйте IntelliSense, чтобы узнать о возможных атрибутах.
3+
// Наведите указатель мыши, чтобы просмотреть описания существующих атрибутов.
4+
// Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Запустить Chrome на localhost",
11+
"url": "http://localhost:8080",
12+
"webRoot": "${workspaceFolder}"
13+
}
14+
]
15+
}

lib/pages/TestPage.dart

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:threeactions_area/pages/UiTestPage.dart';
3+
import 'package:threeactions_area/resources/Resources.dart';
34
import 'package:threeactions_area/widgets/base/TextContent.dart';
45
import 'package:threeactions_area/widgets/base/TextSubtitle.dart';
56
import 'package:threeactions_area/widgets/base/TextTitle.dart';
@@ -126,20 +127,14 @@ class TestPageState extends State {
126127
title: "SKLS",
127128
mainImageAsset: "assets/img/button_bg_skills.png",
128129
logoImageAsset: "assets/img/logo_skills_big.png",
129-
content: Column(
130-
children: [
131-
Align(
132-
alignment: Alignment.bottomLeft,
133-
child: TextSubtitle(
134-
text: "Hard & Soft",
135-
),
136-
),
137-
SizedBox(height: 32.0),
138-
Row(
139-
mainAxisAlignment: MainAxisAlignment.center,
130+
subtitle: "Hard & Soft",
131+
accentFilterColor: AppColors.ContentDarkBlue,
132+
content: Row(
133+
mainAxisAlignment: MainAxisAlignment.start,
140134
crossAxisAlignment: CrossAxisAlignment.start,
141135
children: [
142136
WorkExpTimeline(),
137+
Spacer(),
143138
SkillsColumn([
144139
SkillItem("Main", ["Android", "Kotlin", "Java", "Flutter"]),
145140
SkillItem("UI", ["Jetpack Compose", "XML"]),
@@ -151,9 +146,7 @@ class TestPageState extends State {
151146
SkillItem("Async", ["RxJava 2", "Kotlin Coroutines", "Hilt"]),
152147
])
153148
],
154-
)
155-
],
156-
),
149+
),
157150
);
158151
}
159152

@@ -162,8 +155,10 @@ class TestPageState extends State {
162155
title: "BIO",
163156
mainImageAsset: "assets/img/button_bg_bio.png",
164157
logoImageAsset: "assets/img/logo_bio_big.png",
158+
accentFilterColor: AppColors.ContentLightBlue,
159+
subtitle: "On Earth since 1994",
165160
content: TextSubtitle(
166-
text: "On Earth since 1994",
161+
text: "Content",
167162
),
168163
);
169164
}
@@ -175,7 +170,10 @@ class TestPageState extends State {
175170
logoImageAsset: "assets/img/logo_art_big.png",
176171
isScrollable: false,
177172
isPaddingEnabled: false,
178-
content: ImageGallery(imagesResList: [
173+
accentFilterColor: AppColors.ContentLightYellow,
174+
content: ImageGallery(
175+
accentFilterColor: AppColors.ContentLightYellow,
176+
imagesResList: [
179177
ImageModel(
180178
resourcePath: "assets/img/button_bg_bio.png",
181179
title: "Cube 1",
@@ -205,13 +203,12 @@ class TestPageState extends State {
205203
title: "CNCT",
206204
mainImageAsset: "assets/img/button_bg_contacts.png",
207205
logoImageAsset: "assets/img/logo_contacts_big.png",
206+
accentFilterColor: AppColors.ContentLightRed,
207+
subtitle: "Here you can find me",
208208
content: Column(
209209
mainAxisAlignment: MainAxisAlignment.start,
210210
crossAxisAlignment: CrossAxisAlignment.start,
211211
children: [
212-
TextContent(
213-
text: "Here you can find me",
214-
),
215212
SizedBox(
216213
height: 8.0,
217214
),

lib/pages/UiTestPage.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'dart:core';
33

44
import 'package:flutter/material.dart';
55
import 'package:threeactions_area/pages/base/BaseInfoPage.dart';
6+
import 'package:threeactions_area/resources/Resources.dart';
67
import 'package:threeactions_area/widgets/base/TextContent.dart';
78
import 'package:threeactions_area/widgets/base/TextContentMin.dart';
89
import 'package:threeactions_area/widgets/base/TextSubtitle.dart';
@@ -82,7 +83,7 @@ class SkillsBlock extends StatelessWidget {
8283
mainAxisAlignment: MainAxisAlignment.start,
8384
crossAxisAlignment: CrossAxisAlignment.end,
8485
children: [
85-
TextSubtitle(text: item.name),
86+
TextSubtitle(text: item.name, textColor: AppColors.ContentDarkBlue,),
8687
Wrap(
8788
spacing: 4.0,
8889
children: _buildWrapContent(item.skillsList),
@@ -97,7 +98,7 @@ class SkillsBlock extends StatelessWidget {
9798
.map((item) => Container(
9899
padding: EdgeInsets.all(4.0),
99100
color: Colors.blueGrey,
100-
child: TextContent(text: item),
101+
child: TextContent(text: item, textColor: Colors.black),
101102
))
102103
.toList();
103104
}
@@ -113,7 +114,8 @@ class WorkExpTimeline extends StatelessWidget {
113114
Container(
114115
width: 16.0,
115116
height: 2.0,
116-
color: Colors.white,
117+
// color: Colors.white,
118+
color: Color(0xff6EA1A9),
117119
),
118120
SizedBox(
119121
width: 8.0,
@@ -122,9 +124,9 @@ class WorkExpTimeline extends StatelessWidget {
122124
mainAxisAlignment: MainAxisAlignment.start,
123125
crossAxisAlignment: CrossAxisAlignment.start,
124126
children: [
125-
TextSubtitle(text: date),
126-
TextContent(text: companyInfo),
127-
TextContentMin(text: description)
127+
TextSubtitle(text: date, textColor: AppColors.ContentDarkBlue,),
128+
TextContent(text: companyInfo, textColor: AppColors.ContentDarkBlue),
129+
TextContentMin(text: description, textColor: AppColors.ContentDarkBlue)
128130
],
129131
)
130132
],
@@ -141,7 +143,8 @@ class WorkExpTimeline extends StatelessWidget {
141143
children: [
142144
Container(
143145
width: 2.0,
144-
color: Colors.white,
146+
// color: Colors.white,
147+
color: Color(0xff6EA1A9),
145148
),
146149
Column(
147150
mainAxisAlignment: MainAxisAlignment.start,

lib/pages/base/BaseInfoPage.dart

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter/widgets.dart';
3+
import 'package:threeactions_area/resources/Resources.dart';
24
import 'package:threeactions_area/widgets/base/TextTitleBig.dart';
35

6+
import '../../widgets/base/TextSubtitle.dart';
7+
48
class BaseInfoPage extends StatelessWidget {
59
final String title;
610
final String mainImageAsset;
711
final String logoImageAsset;
812
final Widget content;
913
bool isScrollable;
1014
bool isPaddingEnabled;
15+
String? subtitle;
16+
Color? accentFilterColor;
1117

1218
BaseInfoPage(
1319
{super.key,
1420
required this.title,
1521
required this.mainImageAsset,
1622
required this.logoImageAsset,
17-
required this.content,
23+
required this.content,
1824
this.isScrollable = true,
19-
this.isPaddingEnabled = true});
25+
this.isPaddingEnabled = true,
26+
this.subtitle,
27+
this.accentFilterColor});
2028

2129
@override
2230
Widget build(BuildContext context) {
@@ -28,7 +36,8 @@ class BaseInfoPage extends StatelessWidget {
2836
children: [
2937
Container(
3038
width: 380.0,
31-
padding: EdgeInsets.only(left: 32.0, top: 32.0, right: 32.0, bottom: 96.0),
39+
padding: EdgeInsets.only(
40+
left: 32.0, top: 32.0, right: 32.0, bottom: 96.0),
3241
decoration: BoxDecoration(
3342
image: DecorationImage(
3443
image: AssetImage(mainImageAsset),
@@ -38,34 +47,66 @@ class BaseInfoPage extends StatelessWidget {
3847
children: [
3948
Align(
4049
alignment: Alignment.center,
41-
child: Image.asset(logoImageAsset),
50+
child: accentFilterColor != null ? ColorFiltered(
51+
colorFilter: ColorFilter.mode(accentFilterColor!, BlendMode.srcATop),
52+
child: Image.asset(logoImageAsset),
53+
) : Image.asset(logoImageAsset)
4254
),
4355
Align(
4456
alignment: Alignment.bottomCenter,
4557
child: TextTitleBig(
4658
text: title,
59+
textColor: accentFilterColor ?? AppColors.ContentWhite,
4760
),
4861
)
4962
],
5063
),
5164
),
5265
Expanded(
5366
child: Container(
54-
alignment: Alignment.topLeft,
55-
child: _buildContentContainer(content)
56-
),
67+
alignment: Alignment.topLeft,
68+
child: _buildMainContent(content)),
5769
)
5870
],
5971
),
6072
);
6173
}
6274

75+
Widget _buildMainContent(Widget content) {
76+
if (subtitle != null) {
77+
return Column(
78+
mainAxisAlignment: MainAxisAlignment.start,
79+
crossAxisAlignment: CrossAxisAlignment.center,
80+
children: [
81+
Align(
82+
alignment: Alignment.bottomLeft,
83+
child: isPaddingEnabled
84+
? Padding(
85+
padding: EdgeInsets.only(left: 32.0, top: 32.0),
86+
child: TextSubtitle(
87+
text: subtitle!,
88+
textColor: accentFilterColor ?? AppColors.ContentWhite,
89+
),
90+
)
91+
: TextSubtitle(
92+
text: subtitle!,
93+
textColor: accentFilterColor ?? AppColors.ContentWhite,
94+
),
95+
),
96+
// SizedBox(height: 32.0),
97+
Flexible(child: _buildContentContainer(content))
98+
],
99+
);
100+
} else {
101+
return _buildContentContainer(content);
102+
}
103+
}
104+
63105
Widget _buildContentContainer(Widget content) {
64106
if (isScrollable) {
65107
return SingleChildScrollView(
66-
scrollDirection: Axis.vertical,
67-
child: _buildContentByPadding(content)
68-
);
108+
scrollDirection: Axis.vertical,
109+
child: _buildContentByPadding(content));
69110
} else {
70111
return _buildContentByPadding(content);
71112
}
@@ -74,9 +115,9 @@ class BaseInfoPage extends StatelessWidget {
74115
Widget _buildContentByPadding(Widget content) {
75116
if (isPaddingEnabled) {
76117
return Padding(
77-
padding: EdgeInsets.all(32.0),
78-
child: content,
79-
);
118+
padding: EdgeInsets.all(32.0),
119+
child: content,
120+
);
80121
} else {
81122
return content;
82123
}

lib/resources/Resources.dart

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
11
import 'package:flutter/material.dart';
22

3+
class AppColors {
4+
static const ContentWhite = Color(0xffffffff);
5+
static const ContentDarkBlue = Color(0xff6EA1A9);
6+
static const ContentLightYellow = Color(0xffFFFFB5);
7+
static const ContentLightBlue = Color(0xff6BC5E3);
8+
static const ContentLightRed = Color(0xffE6A8A1);
9+
}
310
class TextStylesContent {
411

512
static const ContentMin = TextStyle(
613
color: Color(0xffffffff),
14+
// color: Color(0xff6EA1A9),
715
fontSize: 16.0,
816
fontFamily: 'LackRegular',
917
letterSpacing: 1.0);
1018

1119
static const Content = TextStyle(
1220
color: Color(0xffffffff),
21+
// color: Color(0xff6EA1A9),
22+
fontSize: 18.0,
23+
fontFamily: 'LackRegular',
24+
letterSpacing: 1.0);
25+
26+
static const ContentMain = TextStyle(
27+
color: Color(0xffffffff),
28+
fontSize: 18.0,
29+
fontFamily: 'LackRegular',
30+
letterSpacing: 1.0);
31+
32+
static const ContentBlck = TextStyle(
33+
color: Colors.black,
1334
fontSize: 18.0,
1435
fontFamily: 'LackRegular',
1536
letterSpacing: 1.0);
1637

1738
static const Subtitle = TextStyle(
1839
color: Color(0xffffffff),
40+
// color: Color(0xff6EA1A9),
1941
fontSize: 26.0,
2042
fontFamily: 'LackRegular',
2143
letterSpacing: 1.0);
@@ -28,6 +50,7 @@ class TextStylesContent {
2850

2951
static const TitleBig = TextStyle(
3052
color: Color(0xffffffff),
53+
// color: Color(0xff6EA1A9),
3154
fontSize: 42.0,
3255
fontFamily: 'LackRegular',
3356
letterSpacing: 1.0);

lib/widgets/base/ImageGallery.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:collection/collection.dart';
22
import 'package:flutter/material.dart';
3+
import 'package:threeactions_area/resources/Resources.dart';
34
import 'package:threeactions_area/widgets/base/TextTitle.dart';
45
import 'package:threeactions_area/widgets/base/TextTitleBig.dart';
56

@@ -13,17 +14,19 @@ class ImageModel {
1314

1415
class ImageGallery extends StatefulWidget {
1516
final List<ImageModel> imagesResList;
17+
Color accentFilterColor = AppColors.ContentWhite;
1618

17-
const ImageGallery({super.key, required this.imagesResList});
19+
ImageGallery({super.key, required this.imagesResList, this.accentFilterColor = AppColors.ContentWhite});
1820

1921
@override
2022
State<StatefulWidget> createState() {
21-
return SimpleGalleryState(imagesResList: imagesResList);
23+
return SimpleGalleryState(imagesResList: imagesResList, accentFilterColor: accentFilterColor);
2224
}
2325
}
2426

2527
class SimpleGalleryState extends State with TickerProviderStateMixin {
2628
final List<ImageModel> imagesResList;
29+
final accentFilterColor;
2730

2831
var widthsList = [];
2932
var hoveredIndex = -1;
@@ -33,7 +36,7 @@ class SimpleGalleryState extends State with TickerProviderStateMixin {
3336
List<AnimationController> controllers = [];
3437
List<Animation> opacityAcnimations = [];
3538

36-
SimpleGalleryState({required this.imagesResList});
39+
SimpleGalleryState({required this.imagesResList, this.accentFilterColor});
3740

3841
@override
3942
void initState() {
@@ -84,8 +87,8 @@ class SimpleGalleryState extends State with TickerProviderStateMixin {
8487
crossAxisAlignment: CrossAxisAlignment.center,
8588
children: [
8689
Spacer(),
87-
TextTitleBig(text: imagesResList[index].title),
88-
TextTitle(text: imagesResList[index].description),
90+
TextTitleBig(text: imagesResList[index].title, textColor: accentFilterColor,),
91+
TextTitle(text: imagesResList[index].description, textColor: accentFilterColor,),
8992
SizedBox(
9093
height: 32.0,
9194
)

0 commit comments

Comments
 (0)