added additional skills
This commit is contained in:
@@ -14,4 +14,11 @@ const months = [
|
||||
'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,
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||
ContentBlock(
|
||||
blockTitle: 'Weitere Kenntnisse',
|
||||
contentType: ContentType.generalSkills,
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||
ContentBlock(
|
||||
blockTitle: "Über mich",
|
||||
contentType: ContentType.text,
|
||||
|
||||
@@ -23,6 +23,7 @@ class ContentProvider {
|
||||
'education': <List<dynamic>>[],
|
||||
'skills': <List<dynamic>>[],
|
||||
'text': <String>[],
|
||||
'general_skills': <List<dynamic>>[],
|
||||
};
|
||||
|
||||
static T getContent<T>(ContentType contentType) {
|
||||
@@ -35,6 +36,8 @@ class ContentProvider {
|
||||
return _content['skills'] as T;
|
||||
case ContentType.text:
|
||||
return _content['text'] as T;
|
||||
case ContentType.generalSkills:
|
||||
return _content['general_skills'] as T;
|
||||
default:
|
||||
return [] as T;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,17 @@ class ContentBlock extends StatelessWidget {
|
||||
width: double.infinity,
|
||||
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<dynamic> content =
|
||||
|
||||
Reference in New Issue
Block a user