Fixed content not being responsive
This commit is contained in:
@@ -23,7 +23,7 @@ class ContentProvider {
|
|||||||
'education': <List<dynamic>>[],
|
'education': <List<dynamic>>[],
|
||||||
'skills': <List<dynamic>>[],
|
'skills': <List<dynamic>>[],
|
||||||
'text': <String>[],
|
'text': <String>[],
|
||||||
'general_skills': <List<dynamic>>[],
|
'general_skills': <String>[],
|
||||||
};
|
};
|
||||||
|
|
||||||
static T getContent<T>(ContentType contentType) {
|
static T getContent<T>(ContentType contentType) {
|
||||||
|
|||||||
@@ -18,23 +18,13 @@ class ContentBlock extends StatelessWidget {
|
|||||||
Widget get _getContentWidget {
|
Widget get _getContentWidget {
|
||||||
if (contentType == ContentType.language) {
|
if (contentType == ContentType.language) {
|
||||||
return const LanguageWidget();
|
return const LanguageWidget();
|
||||||
} else if (contentType == ContentType.text) {
|
} else if (contentType == ContentType.text ||
|
||||||
final content = ContentProvider.getContent<String>(ContentType.text);
|
contentType == ContentType.generalSkills) {
|
||||||
|
final content = ContentProvider.getContent<String>(contentType);
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
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