You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
717 B

import 'package:flutter/material.dart';
import 'ios_toast.dart';
/// Example to show how to popup overlay with custom animation.
class CustomAnimationToast extends StatelessWidget {
final double value;
static final Tween<Offset> tweenOffset = Tween<Offset>(begin: Offset(0, 40), end: Offset(0, 0));
static final Tween<double> tweenOpacity = Tween<double>(begin: 0, end: 1);
const CustomAnimationToast({Key key, @required this.value}) : super(key: key);
@override
Widget build(BuildContext context) {
return Transform.translate(
offset: tweenOffset.transform(value),
child: Opacity(
child: IosStyleToast(),
opacity: tweenOpacity.transform(value),
),
);
}
}