Untitled

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

import '../main.dart';


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

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.indigo,
          title: Text('Portfolio Navigation'),
        ),
        drawer: const AppDrawer(),
        body: SafeArea(
          child: Container(
            color: Colors.white,
            child: Column(
              children: [
                Row(
                  children: [
                    Container(
                      margin: EdgeInsets.all(20),
                      transformAlignment: Alignment.centerLeft,
                      child: const Text('ÜBERSICHT ÜBER PROJEKTE',
                      style: TextStyle(
                          fontSize: 30,
                          fontFamily: 'Horizon',
                        ),
                      ),
                    ),
                  ],
                ),
                const Row(
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  mainAxisSize: MainAxisSize.max,
                  children: [
                    ProjectCardCalculator(label: 'Calculator', text: 'wir sollten einen taschenrechner erstellen'),
                    ProjectCardPortfolio(label: 'Portfolio', text: 'wir sollten dieses portfolio erstellen')
                  ],
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

class ProjectCardCalculator extends StatelessWidget {
  const ProjectCardCalculator({super.key, required this.label, required this.text});

  final String label;
  final String text;

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 400,
      height: 500,
      child: Container(
        padding: const EdgeInsets.all(20),
        margin: const EdgeInsets.fromLTRB(20, 0, 20, 0),
        decoration: BoxDecoration(
          color: Colors.indigo,
          shape: BoxShape.rectangle,
          border: Border.all(color: Colors.black, width: 2),
          borderRadius: const BorderRadius.all(Radius.circular(10)),
            boxShadow: const [
              BoxShadow(
                color: Colors.black,
                offset: Offset(1, 1),
                blurRadius: 10,
                spreadRadius: 5,
              ),
            ]
        ),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            ImageSlideshow(
                width: 300,
                height: 300,
                autoPlayInterval: 2,
                isLoop: false,
                indicatorColor: Colors.green,
                indicatorBackgroundColor: Colors.blueGrey,
                indicatorRadius: 5,

                children: [
                  Image.asset(
                    'assets/images/calculator.png',
                    height: 250,
                    width: 250,
                    fit: BoxFit.contain,
                    alignment: Alignment.center,
                    gaplessPlayback: true,

                  ),
                  Image.asset(
                    'assets/images/calculator1.png',
                    height: 250,
                    width: 250,
                    fit: BoxFit.contain,
                    alignment: Alignment.center,
                    gaplessPlayback: true,
                  ),
            ]
            ),
            Text(label, style: const TextStyle(
                color: Colors.white,
                fontFamily: 'Horizon',
                fontSize: 30
              ),
            ),
            Text(text, style: const TextStyle(
                color: Colors.white,
              fontSize: 20,
              ),
            ),
          ],
        ),
      ),
    );
  }
}

class ProjectCardPortfolio extends StatelessWidget {
  const ProjectCardPortfolio({super.key, required this.label, required this.text});


  final String label;
  final String text;

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 400,
      height: 500,
      child: Container(
        padding: const EdgeInsets.all(20),
        margin: const EdgeInsets.fromLTRB(20, 0, 20, 0),
        decoration: BoxDecoration(
            color: Colors.indigo,
            shape: BoxShape.rectangle,
            border: Border.all(color: Colors.black, width: 2),
            borderRadius: const BorderRadius.all(Radius.circular(10)),
            boxShadow: const [
              BoxShadow(
                color: Colors.black,
                offset: Offset(1, 1),
                blurRadius: 10,
                spreadRadius: 5,
              ),
            ]
        ),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            ImageSlideshow(
                width: 300,
                height: 300,
                autoPlayInterval: 2,
                isLoop: false,
                indicatorColor: Colors.green,
                indicatorBackgroundColor: Colors.blueGrey,
                indicatorRadius: 5,

                children: [
                  Image.asset(
                    'assets/images/calculator.png',
                    height: 250,
                    width: 250,
                    fit: BoxFit.contain,
                    alignment: Alignment.center,
                    gaplessPlayback: true,

                  ),
                  Image.asset(
                    'assets/images/calculator1.png',
                    height: 250,
                    width: 250,
                    fit: BoxFit.contain,
                    alignment: Alignment.center,
                    gaplessPlayback: true,
                  ),
                ]
            ),
            Text(label, style: const TextStyle(
                color: Colors.white,
                fontFamily: 'Horizon',
                fontSize: 30
            ),
            ),
            Text(text, style: const TextStyle(
              color: Colors.white,
              fontSize: 20,
            ),
            ),
          ],
        ),
      ),
    );
  }
}



Leave a Comment