import 'package:fikoyt_merkez/apps/fitness_app/fitness_app_theme.dart'; import 'package:flutter/material.dart'; class TitleView extends StatelessWidget { final String titleTxt; final String subTxt; final AnimationController? animationController; final Animation? animation; const TitleView({super.key, this.titleTxt = "", this.subTxt = "", this.animationController, this.animation}); @override Widget build(BuildContext context) { return AnimatedBuilder( animation: animationController!, builder: (BuildContext context, Widget? child) { return FadeTransition( opacity: animation!, child: Transform( transform: Matrix4.translationValues(0.0, 10 * (1.0 - animation!.value), 0.0), child: Padding( padding: const EdgeInsets.only(left: 24, right: 24), child: Row( children: [ Expanded( child: Text( titleTxt, textAlign: TextAlign.left, style: TextStyle( fontFamily: FitnessAppTheme.fontName, fontWeight: FontWeight.w500, fontSize: 18, letterSpacing: 0.5, color: FitnessAppTheme.lightText, ), ), ), InkWell( highlightColor: Colors.transparent, borderRadius: BorderRadius.all(Radius.circular(4.0)), onTap: () {}, child: Padding( padding: const EdgeInsets.only(left: 8), child: Row( children: [ Text( subTxt, textAlign: TextAlign.left, style: TextStyle( fontFamily: FitnessAppTheme.fontName, fontWeight: FontWeight.normal, fontSize: 16, letterSpacing: 0.5, color: FitnessAppTheme.nearlyDarkBlue, ), ), SizedBox( height: 38, width: 26, child: Icon( Icons.arrow_forward, color: FitnessAppTheme.darkText, size: 18, ), ), ], ), ), ) ], ), ), ), ); }, ); } }