walking 0.0.4 copy "walking: ^0.0.4" to clipboard
walking: ^0.0.4 copied to clipboard

This package contains a container with a colored line that rotates on the edges and a distinctive input field. You can try them to find out more.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:math';
import 'package:walking/walk_container.dart';

void main() {
  runApp(const MaterialApp(
    title: 'Ω‹Walking',
    home: WalkContainerScerrn(),
  ));
}

class WalkContainerScerrn extends StatefulWidget {
  const WalkContainerScerrn({super.key});
  @override
  State<WalkContainerScerrn> createState() => _WalkContainerScerrnState();
}

class _WalkContainerScerrnState extends State<WalkContainerScerrn> {
  int counter = 0;
  Timer? timer;
  Random random = Random();
  List str = [
    "πŸ˜€",
    "😁",
    "πŸ˜‚",
    "🀣",
    "πŸ˜ƒ",
    "πŸ˜„",
    "πŸ˜…",
    "πŸ˜†",
    "πŸ˜‰",
    "😊",
    "πŸ˜‹",
    "😎",
    "😍",
    "😘",
    "πŸ₯°"
  ];

  @override
  void initState() {
    super.initState();
    timer = Timer.periodic(const Duration(milliseconds: 800), (Timer t) {
      setState(() {
        counter++;
      });
    });
  }

  @override
  void dispose() {
    timer?.cancel();
    super.dispose();
  }

  Color getRandomColor() => Color.fromARGB(
    255,
    random.nextInt(256),
    random.nextInt(256),
    random.nextInt(256),
  );

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GridView.builder(
        gridDelegate:
        const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
        itemCount: 36,
        itemBuilder: (context, index) {
          return Padding(
            padding: const EdgeInsets.all(8),
            child: WalkContainer(
                colors: [
                  getRandomColor(),
                  getRandomColor(),
                  getRandomColor(),
                  getRandomColor(),
                  getRandomColor()
                ],
                width: 150,
                height: 150,
                thicken: 10,
                angle: random.nextDouble() * 360,
                reverse: index % 2 == 0 ? true : false,
                curve: index % 2 == 0 ? Curves.bounceIn : Curves.bounceOut,
                child: Text(
                  str[(counter + index) % str.length],
                  style: const TextStyle(fontSize: 50),
                )),
          );
        },
      ),
    );
  }
}
3
likes
140
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

This package contains a container with a colored line that rotates on the edges and a distinctive input field. You can try them to find out more.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on walking