You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
queuing_system/lib/footer/app_footer.dart

104 lines
4.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:marquee/marquee.dart';
import 'package:provider/provider.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/utils/Utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class AppFooter extends StatelessWidget {
const AppFooter({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) {
return Container(
color: Colors.grey.withOpacity(0.1),
height: Utils.getHeight() * 0.8,
width: double.infinity,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
const SizedBox(width: 20),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () async {
// await context.read<AppProvider>().callPatientsAPI();
},
child: AppText(
"Powered By",
fontSize: SizeConfig.getWidthMultiplier() * 2.6,
fontFamily: 'Poppins-Medium.ttf',
),
),
Text(appProvider.currentDeviceIp, style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)),
Row(
children: [
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.portraitUp);
},
child: const Icon(Icons.arrow_upward),
),
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.landscapeRight);
},
child: const Icon(Icons.arrow_forward),
),
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.portraitDown);
},
child: const Icon(Icons.arrow_downward),
),
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.landscapeLeft);
},
child: const Icon(Icons.arrow_back),
),
],
),
],
),
const SizedBox(width: 10),
Image.asset(
"assets/images/cloud_logo.png",
height: SizeConfig.getHeightMultiplier() * 4,
),
],
),
Expanded(
child: (appProvider.currentRssFeedModel.rssFeed == null || appProvider.currentRssFeedModel.rssFeed!.isEmpty)
? const SizedBox()
: Container(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Marquee(
text: appProvider.currentRssFeedModel.rssFeed ?? "",
style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getHeightMultiplier() * 2),
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,
),
),
)
],
));
});
}
}