Untitled

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

import 'HomePage.dart';

class Header extends StatelessWidget {
  Header({super.key,});

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      padding: const EdgeInsets.only(left: 10, right: 10),
      child: Row(
        children: [
          Container(
            padding: const EdgeInsets.only(left: 10, right: 10),
            child: AnimatedTextKit(
              animatedTexts: [
                ColorizeAnimatedText(
                  'T',
                  textStyle: const TextStyle(
                    fontSize: 50,
                    fontFamily: 'Horizon',
                  ),
                  colors: [
                    Colors.blue,
                    Colors.purple,
                    Colors.blue,
                  ],
                  speed: const Duration(seconds: 5),
                ),
              ],
              isRepeatingAnimation: true,
              repeatForever: true,
            ),
          ),
          Container(
            padding: const EdgeInsets.all(10),
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              mainAxisAlignment: MainAxisAlignment.center,
              mainAxisSize: MainAxisSize.max,
              children: [
                TextButton(onPressed: () => HomePage.animateToIndex(1), child: const Text('Start'),),
                TextButton(onPressed: () => HomePage.animateToIndex(2), child: const Text('Über Mich'),),
                TextButton(onPressed: () => HomePage.animateToIndex(3), child: const Text('Skills'),),
                TextButton(onPressed: () => HomePage.animateToIndex(4), child: const Text('Projekte'),),

              ],
            ),
          ),
        ],
      ),
    );
  }
}
Leave a Comment