mirrored_repositories/Docs/docs-app/docs/lib
import 'package:flutter/material.dart';
import 'package:simple_animations/simple_animations.dart';

const bgColor = Color.fromRGBO(249, 249, 249, 1);
const lightPurple = Color.fromRGBO(98, 112, 221, 1);
const darkPurple = Color.fromRGBO(56, 75, 203, 1);

//userid
//password
//name
//mobile
//address
//loggedin
//role
//spez
//qual
//slotStart
//slotEnd

class FadeIn extends StatelessWidget {
  final double delay;
  final Widget child;

  FadeIn(this.delay, this.child);

  @override
  Widget build(BuildContext context) {
    // ignore: deprecated_member_use
    final tween = MultiTrackTween([
      // ignore: deprecated_member_use
      Track("opacity")
          .add(Duration(milliseconds: 500), Tween(begin: 0.0, end: 1.0)),
      // ignore: deprecated_member_use
      Track("translateX").add(
          Duration(milliseconds: 500), Tween(begin: 130.0, end: 0.0),
          curve: Curves.easeOut)
    ]);

    // ignore: deprecated_member_use
    return ControlledAnimation(
      delay: Duration(milliseconds: (300 * delay).round()),
      duration: tween.duration,
      tween: tween,
      child: child,
      builderWithChild: (context, child, animation) => Opacity(
        opacity: animation["opacity"],
        child: Transform.translate(
            offset: Offset(animation["translateX"], 0), child: child),
      ),
    );
  }
}
