Refactoring
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:resume/services/breakpoints.dart';
|
||||
import 'package:resume/services/content_provider.dart';
|
||||
import 'package:resume/widgets/content_widget.dart';
|
||||
import 'package:resume/widgets/profile.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:resume/constants.dart' show ContentType;
|
||||
|
||||
import '../services/content_provider.dart';
|
||||
import '../widgets/content_block.dart';
|
||||
|
||||
class LandingPage extends StatefulWidget {
|
||||
const LandingPage({super.key});
|
||||
@@ -40,25 +42,31 @@ class _LandingPageState extends State<LandingPage> {
|
||||
(MediaQuery.of(context).size.width - _getMainContentWidth()) / 2;
|
||||
|
||||
Widget _getSideBar() {
|
||||
return ContentBox(
|
||||
title: 'Fähigkeiten',
|
||||
content: ContentProvider.skills,
|
||||
contentType: ContentType.skills,
|
||||
return const Column(
|
||||
children: [
|
||||
ContentBlock(
|
||||
blockTitle: 'Fähigkeiten',
|
||||
contentType: ContentType.skills,
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||
ContentBlock(
|
||||
blockTitle: 'Sprachen',
|
||||
contentType: ContentType.language,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _getMainContent() {
|
||||
return Column(
|
||||
return const Column(
|
||||
children: [
|
||||
ContentBox(
|
||||
title: 'Arbeitserfahrung',
|
||||
content: ContentProvider.experience,
|
||||
ContentBlock(
|
||||
blockTitle: 'Arbeitserfahrung',
|
||||
contentType: ContentType.experience,
|
||||
),
|
||||
const Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||
ContentBox(
|
||||
title: 'Bildungsweg',
|
||||
content: ContentProvider.education,
|
||||
Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||
ContentBlock(
|
||||
blockTitle: 'Bildungsweg',
|
||||
contentType: ContentType.education,
|
||||
),
|
||||
],
|
||||
@@ -74,7 +82,7 @@ class _LandingPageState extends State<LandingPage> {
|
||||
child: SizedBox(
|
||||
width: _getSidebarWidth(),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 50),
|
||||
padding: EdgeInsets.symmetric(horizontal: 25),
|
||||
child: Profile(),
|
||||
),
|
||||
),
|
||||
@@ -84,7 +92,7 @@ class _LandingPageState extends State<LandingPage> {
|
||||
child: SizedBox(
|
||||
width: _getSidebarWidth(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 25),
|
||||
child: _getSideBar(),
|
||||
),
|
||||
),
|
||||
@@ -107,11 +115,12 @@ class _LandingPageState extends State<LandingPage> {
|
||||
child: Column(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 50),
|
||||
padding: EdgeInsets.symmetric(horizontal: 25),
|
||||
child: Profile(),
|
||||
),
|
||||
const Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 25),
|
||||
child: _getSideBar(),
|
||||
),
|
||||
],
|
||||
@@ -121,7 +130,7 @@ class _LandingPageState extends State<LandingPage> {
|
||||
width: 900,
|
||||
child: _getMainContent(),
|
||||
),
|
||||
const Padding(padding: EdgeInsets.only(right: 50)),
|
||||
const Padding(padding: EdgeInsets.only(right: 25)),
|
||||
],
|
||||
);
|
||||
} else if (constraints.maxWidth > Breakpoints.lg) {
|
||||
@@ -136,6 +145,7 @@ class _LandingPageState extends State<LandingPage> {
|
||||
child: Column(
|
||||
children: [
|
||||
const Profile(),
|
||||
const Padding(padding: EdgeInsets.only(bottom: 25)),
|
||||
_getSideBar(),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user