added additional skills
This commit is contained in:
@@ -14,4 +14,11 @@ const months = [
|
|||||||
'Dezember'
|
'Dezember'
|
||||||
];
|
];
|
||||||
|
|
||||||
enum ContentType { experience, education, skills, language, text }
|
enum ContentType {
|
||||||
|
experience,
|
||||||
|
education,
|
||||||
|
skills,
|
||||||
|
language,
|
||||||
|
text,
|
||||||
|
generalSkills
|
||||||
|
}
|
||||||
|
|||||||
@@ -70,6 +70,11 @@ class _LandingPageState extends State<LandingPage> {
|
|||||||
contentType: ContentType.education,
|
contentType: ContentType.education,
|
||||||
),
|
),
|
||||||
Padding(padding: EdgeInsets.only(bottom: 25)),
|
Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||||
|
ContentBlock(
|
||||||
|
blockTitle: 'Weitere Kenntnisse',
|
||||||
|
contentType: ContentType.generalSkills,
|
||||||
|
),
|
||||||
|
Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||||
ContentBlock(
|
ContentBlock(
|
||||||
blockTitle: "Über mich",
|
blockTitle: "Über mich",
|
||||||
contentType: ContentType.text,
|
contentType: ContentType.text,
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class ContentProvider {
|
|||||||
'education': <List<dynamic>>[],
|
'education': <List<dynamic>>[],
|
||||||
'skills': <List<dynamic>>[],
|
'skills': <List<dynamic>>[],
|
||||||
'text': <String>[],
|
'text': <String>[],
|
||||||
|
'general_skills': <List<dynamic>>[],
|
||||||
};
|
};
|
||||||
|
|
||||||
static T getContent<T>(ContentType contentType) {
|
static T getContent<T>(ContentType contentType) {
|
||||||
@@ -35,6 +36,8 @@ class ContentProvider {
|
|||||||
return _content['skills'] as T;
|
return _content['skills'] as T;
|
||||||
case ContentType.text:
|
case ContentType.text:
|
||||||
return _content['text'] as T;
|
return _content['text'] as T;
|
||||||
|
case ContentType.generalSkills:
|
||||||
|
return _content['general_skills'] as T;
|
||||||
default:
|
default:
|
||||||
return [] as T;
|
return [] as T;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,17 @@ class ContentBlock extends StatelessWidget {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Text(content),
|
child: Text(content),
|
||||||
);
|
);
|
||||||
|
} else if (contentType == ContentType.generalSkills) {
|
||||||
|
final content =
|
||||||
|
ContentProvider.getContent<List<dynamic>>(ContentType.generalSkills);
|
||||||
|
List<Widget> widgets = [];
|
||||||
|
for (int i = 0; i < content.length; i++) {
|
||||||
|
String text = i == content.length - 1
|
||||||
|
? content.elementAt(i)
|
||||||
|
: content.elementAt(i) + ', ';
|
||||||
|
widgets.add(Text(text));
|
||||||
|
}
|
||||||
|
return Row(children: widgets);
|
||||||
}
|
}
|
||||||
// List-based content-blocks
|
// List-based content-blocks
|
||||||
List<dynamic> content =
|
List<dynamic> content =
|
||||||
|
|||||||
Reference in New Issue
Block a user