animateable 0.0.3 copy "animateable: ^0.0.3" to clipboard
animateable: ^0.0.3 copied to clipboard

Flutter package project thats contain any widgets with animation behaviour at their self.

a package provide animation for flutter apps

Features #

  • crossfade fades animation when data has changed

Usage #

this example usage of this packages feature.

crossfade example #

import 'package:animateable/animateable.dart';
import 'package:flutter/material.dart';

class CrossFadeExample extends StatefulWidget {
  const CrossFadeExample({Key? key}) : super(key: key);

  @override
  State<CrossFadeExample> createState() => _CrossFadeExampleState();
}

class _CrossFadeExampleState extends State<CrossFadeExample> {
  DateTime current = DateTime.now();
  late final Stream<String> timer;

  @override
  void initState() {
    timer = Stream.periodic(const Duration(seconds: 1), (i) {
      current = current.add(const Duration(seconds: 1));
      return 'current time is ${current.hour}:${current.minute}:${current.second}';
    });
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    // ignore: avoid_unnecessary_containers
    return Container(
      child: StreamBuilder<String>(
        stream: timer,
        builder: (context, snapshot) {
          return Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              CrossFade<String?>(
                initialData: 'initdata',
                data: snapshot.data,
                builder: (data) => Text('$data'),
              )
            ],
          );
        },
      ),
    );
  }
}


Additional information #

more information or need contacts me you can see github profile.

2
likes
140
pub points
0%
popularity

Publisher

unverified uploader

Flutter package project thats contain any widgets with animation behaviour at their self.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on animateable