Untitled

mail@pastecode.io avatar
unknown
dart
a month ago
3.6 kB
1
Indexable
Never
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:portfolio_5514478/main.dart';

class AboutMe extends StatelessWidget {
  const AboutMe({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(20),
      margin: const EdgeInsets.all(20),
      child: const Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          Text('Über Mich',
            style: TextStyle(
              color: Colors.black,
              fontSize: 75,
              fontFamily: 'Agne',
            ),
          ),
          SchoolContainer(),
        ],
      ),
    );
  }
}

class SchoolContainer extends StatelessWidget {
  const SchoolContainer({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(20),
      margin: const EdgeInsets.all(20),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Column(
            children: [
              const Text('KARRIERE    ',
                style: TextStyle(
                  color: Colors.black,
                  fontSize: 35,
                  fontFamily: 'Agne',
                ),
              ),
              School(logo: Image.asset('assets/icons/dart.png'), name: 'Geschwister-Scholl-Schule', years: '2010-2014'),
              School(logo: Image.asset('assets/icons/augustiner.png'), name: 'Augustinerschule Friedberg', years: '2014-2020'),
              School(logo: Image.asset('assets/icons/burggymnasium.jpg'), name: 'Burggymnasium Friedberg', years: '2020-2023'),
            ],
          ),
        ],
      ),
    );
  }
}

class School extends StatelessWidget {
  const School({super.key, required this.logo, required this.name, required this.years});

  final Image logo;
  final String name;
  final String years;

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 90,
      width: 400,
      child: Container(
        padding: const EdgeInsets.all(10),
        margin: const EdgeInsets.all(10),
        decoration: const BoxDecoration(
          color: Colors.white,
          shape: BoxShape.rectangle,
          borderRadius: BorderRadius.all(Radius.circular(20)),
          boxShadow: [
            BoxShadow(
              color: Colors.black26,
              offset: Offset(0, 5),
              blurRadius: 5,
              spreadRadius: 1,
            ),
          ]
        ),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Container(
              padding: const EdgeInsets.only(right: 10),
              child: logo,
            ),
            Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(name,
                  style: const TextStyle(
                    color: Colors.black,
                    fontFamily: 'Agne',
                    fontSize: 20,
                  ),
                ),
                Text(years,
                style: const TextStyle(
                  color: Colors.black38,
                  fontSize: 15,
                ),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}

Leave a Comment