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

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

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

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

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

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

@ -41,7 +41,7 @@ class HospitalLocation extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
location.locationName.trim(), location.locationName!.trim(),
style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)), style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)),
), ),
SizedBox(height: 10), SizedBox(height: 10),
@ -79,14 +79,14 @@ class HospitalLocation extends StatelessWidget {
() async { () async {
await MapLauncher.showMarker( await MapLauncher.showMarker(
mapType: MapType.google, mapType: MapType.google,
coords: Coords(double.parse(location.latitude), double.parse(location.longitude)), coords: Coords(double.parse(location.latitude!), double.parse(location.longitude!)),
title: location.locationName, title: location.locationName!,
); );
}, },
), ),
SizedBox(height: 10), SizedBox(height: 10),
contactButton(Icons.call, TranslationBase.of(context).callNow, () { 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( Widget build(BuildContext context) => AlertDialog(
content: Container( content: Container(
color: Colors.white, color: Colors.white,
height: SizeConfig.realScreenHeight * 0.5, height: SizeConfig.realScreenHeight! * 0.5,
width: SizeConfig.realScreenWidth * 0.8, width: SizeConfig.realScreenWidth! * 0.8,
child: Container( child: Container(
child: Column(children: [ child: Column(children: [
Expanded( Expanded(

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

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

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

Loading…
Cancel
Save