import 'package:flutter/material.dart'; import 'package:hmg_qline/view_models/screen_config_view_model.dart'; import 'package:marquee/marquee.dart'; import 'package:provider/provider.dart'; import 'package:hmg_qline/constants/app_constants.dart'; import 'package:hmg_qline/utilities/enums.dart'; import 'package:hmg_qline/views/common_widgets/app_texts_widget.dart'; import 'package:hmg_qline/views/view_helpers/size_config.dart'; class AppFooter extends StatelessWidget { const AppFooter({super.key}); @override Widget build(BuildContext context) { return Consumer(builder: (BuildContext context, ScreenConfigViewModel screenConfigVM, Widget? child) { return Container( color: Colors.grey.withOpacity(0.1), height: SizeConfig.getHeightMultiplier() * 0.5, width: double.infinity, child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ const SizedBox(width: 20), Column( mainAxisAlignment: MainAxisAlignment.center, children: [ AppText( AppStrings.poweredBy, medium: true, fontSize: SizeConfig.getWidthMultiplier() * 2.6, ), Text(screenConfigVM.currentScreenIP, style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)), Row( children: [ InkWell( onTap: () { screenConfigVM.updateCurrentScreenRotation(ScreenOrientationEnum.portraitUp); }, child: const Icon(Icons.arrow_upward), ), InkWell( onTap: () { screenConfigVM.updateCurrentScreenRotation(ScreenOrientationEnum.landscapeRight); }, child: const Icon(Icons.arrow_forward), ), InkWell( onTap: () { screenConfigVM.updateCurrentScreenRotation(ScreenOrientationEnum.portraitDown); }, child: const Icon(Icons.arrow_downward), ), InkWell( onTap: () { screenConfigVM.updateCurrentScreenRotation(ScreenOrientationEnum.landscapeLeft); }, child: const Icon(Icons.arrow_back), ), ], ), ], ), const SizedBox(width: 10), Image.asset( AppAssets.cloudLogo, height: SizeConfig.getHeightMultiplier() * 0.5, ), ], ), Expanded( child: (screenConfigVM.rssFeedModel.rssFeed == null || screenConfigVM.rssFeedModel.rssFeed!.isEmpty) ? const SizedBox() : Container( padding: const EdgeInsets.symmetric(horizontal: 10), child: Marquee( text: screenConfigVM.rssFeedModel.rssFeed ?? "", style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 5), scrollAxis: Axis.horizontal, crossAxisAlignment: CrossAxisAlignment.center, blankSpace: 20.0, velocity: 100.0, pauseAfterRound: const Duration(seconds: 1), startPadding: 10.0, accelerationDuration: const Duration(seconds: 1), accelerationCurve: Curves.linear, decelerationDuration: const Duration(milliseconds: 500), decelerationCurve: Curves.easeOut, ), ), ) ], )); }); } }