Files
umbrix/lib/core/widget/animated_text.dart
Umbrix Developer 76a374950f feat: mobile-like window size and always-visible stats
- Changed window size to mobile phone format (400x800)
- Removed width condition for ActiveProxyFooter - now always visible
- Added run-umbrix.sh launch script with icon copying
- Stats cards now display on all screen sizes
2026-01-17 13:09:20 +03:00

54 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:umbrix/core/model/constants.dart';
class AnimatedText extends Text {
const AnimatedText(
super.data, {
super.key,
super.style,
this.duration = kAnimationDuration,
this.size = true,
this.slide = true,
});
final Duration duration;
final bool size;
final bool slide;
@override
Widget build(BuildContext context) {
return AnimatedSwitcher(
duration: duration,
transitionBuilder: (child, animation) {
child = FadeTransition(
opacity: animation,
child: child,
);
if (size) {
child = SizeTransition(
axis: Axis.horizontal,
fixedCrossAxisSizeFactor: 1,
sizeFactor: Tween<double>(begin: 0.88, end: 1).animate(animation),
child: child,
);
}
if (slide) {
child = SlideTransition(
position: Tween<Offset>(
begin: const Offset(0.0, -0.2),
end: Offset.zero,
).animate(animation),
child: child,
);
}
return child;
},
child: Text(
data!,
key: ValueKey<String>(data!),
style: style,
),
);
}
}