Added RSS Feed Implementation
parent
98888a32f0
commit
1da3bcf843
@ -0,0 +1,15 @@
|
|||||||
|
class RssFeedModel {
|
||||||
|
String? rssFeed;
|
||||||
|
|
||||||
|
RssFeedModel({this.rssFeed});
|
||||||
|
|
||||||
|
RssFeedModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
rssFeed = json['rssFeed'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['rssFeed'] = rssFeed;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
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/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)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue