code updated.

dev_v3.13.6_voipcall
Sultan khan 1 year ago
parent 6f8be66f42
commit 04244675e1

@ -13,7 +13,7 @@ class CarouselIndicator extends StatefulWidget {
final double space;
/// count of indicator
final int count;
final int? count;
/// active color
final Color activeColor;
@ -27,21 +27,21 @@ class CarouselIndicator extends StatefulWidget {
/// duration for slide animation
final int animationDuration;
final int index;
final int? index;
final Function(int index) onClick;
final Function(int index)? onClick;
CarouselIndicator({
Key key,
this.width: 20.0,
this.height: 6,
this.space: 5.0,
Key? key,
this.width= 20.0,
this.height= 6,
this.space= 5.0,
this.count,
this.cornerRadius: 6,
this.animationDuration: 300,
this.color: Colors.white30,
this.cornerRadius= 6,
this.animationDuration= 300,
this.color= Colors.white30,
this.index,
this.activeColor: Colors.white,
this.activeColor= Colors.white,
this.onClick
}) : assert(count != null && count != 0),
assert(index != null && index >= 0),
@ -56,13 +56,13 @@ class CarouselIndicator extends StatefulWidget {
class _CarouselIndicatorState extends State<CarouselIndicator>
with TickerProviderStateMixin {
/// [Tween] object of type double
Tween<double> _tween;
late Tween<double> _tween;
/// [AnimationController] object
AnimationController _animationController;
late AnimationController _animationController;
/// [Aniamtion] object
Animation _animation;
late Animation _animation;
/// [Paint] object to paint our indicator
Paint _paint = new Paint();
@ -75,7 +75,7 @@ class _CarouselIndicatorState extends State<CarouselIndicator>
@override
Widget build(BuildContext context) {
Widget child = new SizedBox(
width: widget.count * widget.width + (widget.count - 1) * widget.space,
width: widget.count! * widget.width! + (widget.count! - 1) * widget.space,
height: widget.height,
child: CustomPaint(
painter: _createPainer(),
@ -86,7 +86,7 @@ class _CarouselIndicatorState extends State<CarouselIndicator>
child: child,
onTap: (){
if(widget.onClick != null)
widget.onClick(0);
widget.onClick!(0);
},
);
}

@ -10,51 +10,51 @@ import 'package:flutter/material.dart';
/// [chartName] the name of the chart
/// [startDate] the start date
/// [endDate] the end date
class AppTimeSeriesChar,b m extends StatelessWidget {
AppTimeSeriesChart({
Key? key,
required this.seriesList,
this.chartName = '',
this.startDate,
this.endDate,
});
final String chartName;
final List<Series<dynamic, DateTime>> seriesList;
final DateTime? startDate;sz
final DateTime? endDate;
@override
Widget build(BuildContext context) {
return FlexibleContainer(
heightFactor: 0.47,
child: Column(
children: <Widget>[
Texts(chartName, fontSize: SizeConfig.textMultiplier * 3),
Container(
height: SizeConfig.realScreenHeight * 0.37,
child: Center(
child: Container(
child: charts.LineChart(
seriesList,
animate: true,
behaviors: [
charts.RangeAnnotation(
[
charts.RangeAnnotationSegment(startDate, endDate,
charts.RangeAnnotationAxisType.domain ),
],
),
],
),
),
),
),
],
),
);
}
}
// class AppTimeSeriesChar,b m extends StatelessWidget {
// AppTimeSeriesChart({
// Key? key,
// required this.seriesList,
// this.chartName = '',
// this.startDate,
// this.endDate,
// });
//
// final String chartName;
// final List<Series<dynamic, DateTime>> seriesList;
// final DateTime? startDate;
// final DateTime? endDate;
//
// @override
// Widget build(BuildContext context) {
// return FlexibleContainer(
// heightFactor: 0.47,
// child: Column(
// children: <Widget>[
// Texts(chartName, fontSize: SizeConfig.textMultiplier * 3),
// Container(
// height: SizeConfig.realScreenHeight * 0.37,
// child: Center(
// child: Container(
// child: charts.LineChart(
// seriesList,
// animate: true,
// behaviors: [
// charts.RangeAnnotation(
// [
// charts.RangeAnnotationSegment(startDate, endDate,
// charts.RangeAnnotationAxisType.domain ),
// ],
// ),
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// );
// }
// }
class TimeSeriesSales {
final DateTime time;

@ -1,13 +1,14 @@
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart' as chart;
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import '../../Constants.dart';
class ShowChart extends StatelessWidget {
final String? title;
final List<TimeSeriesSales2>? timeSeries;
final List<chart.TimeSeriesSales2>? timeSeries;
final int? indexes;
final double horizontalInterval;
final bool isWeeklyOrMonthly;

@ -45,14 +45,14 @@ class MedicalProfileItem extends StatelessWidget {
isPngImage
? Image.asset(
imagePath,
width: width != null ? width : SizeConfig.widthMultiplier * 7,
height: height != null ? height : SizeConfig.widthMultiplier * 7,
width: width != null ? width : SizeConfig.widthMultiplier! * 7,
height: height != null ? height : SizeConfig.widthMultiplier! * 7,
color: imgColor,
)
: SvgPicture.asset(
"assets/images/new/services/$imagePath",
height: SizeConfig.widthMultiplier * 7,
width: SizeConfig.widthMultiplier * 7,
height: SizeConfig.widthMultiplier! * 7,
width: SizeConfig.widthMultiplier! * 7,
color: imgColor,
),
mFlex(2),
@ -60,7 +60,7 @@ class MedicalProfileItem extends StatelessWidget {
title,
maxLines: 1,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.4,
fontSize: SizeConfig.textMultiplier! * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.3,
height: 13 / 10,
@ -76,7 +76,7 @@ class MedicalProfileItem extends StatelessWidget {
subTitle,
maxLines: 1,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 1.4,
fontSize: SizeConfig.textMultiplier! * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.3,
height: 1,

@ -107,7 +107,7 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.zero,
children: <Widget>[
Container(
height: SizeConfig.screenHeight * .30,
height: SizeConfig.screenHeight! * .30,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(14.0),

@ -53,7 +53,7 @@ class _DrawerItemState extends State<DrawerItem> {
: Icon(
widget.icon,
color: widget.iconColor == null ? Theme.of(context).textTheme.bodyText1?.color : widget.iconColor,
size: SizeConfig.imageSizeMultiplier * 5,
size: SizeConfig.imageSizeMultiplier! * 5,
)),
Expanded(
flex: 7,
@ -73,7 +73,7 @@ class _DrawerItemState extends State<DrawerItem> {
widget.subTitle != ''
? AppText(
widget.subTitle!,
fontSize: SizeConfig.textMultiplier * 2.5,
fontSize: SizeConfig.textMultiplier! * 2.5,
)
: SizedBox(),
])),

@ -41,7 +41,7 @@ class HospitalLocation extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
location.locationName.trim(),
location.locationName!.trim(),
style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)),
),
SizedBox(height: 10),
@ -79,14 +79,14 @@ class HospitalLocation extends StatelessWidget {
() async {
await MapLauncher.showMarker(
mapType: MapType.google,
coords: Coords(double.parse(location.latitude), double.parse(location.longitude)),
title: location.locationName,
coords: Coords(double.parse(location.latitude!), double.parse(location.longitude!)),
title: location.locationName!,
);
},
),
SizedBox(height: 10),
contactButton(Icons.call, TranslationBase.of(context).callNow, () {
launchUrl(Uri.parse("tel://" + location.phoneNumber));
launchUrl(Uri.parse("tel://" + location.phoneNumber!));
}),
],
),

@ -992,8 +992,8 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
Widget build(BuildContext context) => AlertDialog(
content: Container(
color: Colors.white,
height: SizeConfig.realScreenHeight * 0.5,
width: SizeConfig.realScreenWidth * 0.8,
height: SizeConfig.realScreenHeight! * 0.5,
width: SizeConfig.realScreenWidth! * 0.8,
child: Container(
child: Column(children: [
Expanded(

@ -187,7 +187,7 @@ class SMSOTP {
TextStyle buildTextStyle() {
return TextStyle(
fontSize: SizeConfig.textMultiplier * 3,
fontSize: SizeConfig.textMultiplier! * 3,
);
}

@ -28,7 +28,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
@override
Widget build(BuildContext context) {
return new RoundedContainer(
height: SizeConfig.heightMultiplier * 12.9,
height: SizeConfig.heightMultiplier! * 12.9,
child: Padding(
padding: const EdgeInsets.all(2.0),
child: Row(
@ -43,8 +43,8 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
borderRadius: BorderRadius.all(Radius.circular(7)),
child: Image.memory(
dataFromBase64String(widget.url!),
height: SizeConfig.imageSizeMultiplier * 11,
width: SizeConfig.imageSizeMultiplier * 11,
height: SizeConfig.imageSizeMultiplier! * 11,
width: SizeConfig.imageSizeMultiplier! * 11,
fit: BoxFit.cover,
),
),

@ -64,7 +64,7 @@ class _AppTextState extends State<AppText> {
style: TextStyle(
color: widget.color == null ? Theme.of(context).textTheme.bodyText1!.color : widget.color,
fontWeight: widget.fontWeight,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2),
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier! * 2),
height: widget.height,
fontFamily: "Poppins",
letterSpacing: widget.letterSpacing,

Loading…
Cancel
Save