Skip to content

Commit af6aaf8

Browse files
Merge pull request #6 from Yuvaraj-Gajaraj/master
Move changes from pub dev.
2 parents bafd42b + 949b27b commit af6aaf8

File tree

162 files changed

+1327
-2585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+1327
-2585
lines changed

packages/syncfusion_flutter_barcodes/lib/barcodes.dart

-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,3 @@ part './src/barcode_generator/two_dimensional/error_correction_codewords.dart';
3939
part './src/barcode_generator/two_dimensional/qr_code_symbology.dart';
4040
part './src/barcode_generator/two_dimensional/qr_code_values.dart';
4141
part './src/barcode_generator/two_dimensional/datamatrix_symbology.dart';
42-

packages/syncfusion_flutter_calendar/CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
## [18.3.35] - 10/01/2020
2+
**Bug fixes**
3+
* Now, the appointment will render on the correct timeslot, when the local set as French, Canada, and in `Eastern Standard Time`.
4+
* Now, the appointments will render on the correct timeslot, when the start time of the time slot is set as a different value.
5+
26
**Features**
37
* Timeline month view support
48
* Resource view support
@@ -14,10 +18,6 @@
1418
* The default value for the `timeIntervalWidth` is changed from 40 to 60.
1519
* The appointment UI width is reduced in the day, week, and workweek views.
1620

17-
** Bug fixes**
18-
* Now, the appointment will render on the correct timeslot, when the local set as French, Canada, and in `Eastern Standard Time`.
19-
* Now, the appointments will render on the correct timeslot, when the start time of the time slot is set as a different value.
20-
2121
## [18.2.59] - 09/23/2020
2222
No changes.
2323

packages/syncfusion_flutter_calendar/lib/calendar.dart

-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ part 'src/calendar/resource_view/resource_view.dart';
6868
part './src/calendar/appointment_layout/appointment_layout.dart';
6969
part './src/calendar/appointment_layout/agenda_view_layout.dart';
7070
part './src/calendar/appointment_layout/allday_appointment_layout.dart';
71-

packages/syncfusion_flutter_calendar/lib/src/calendar/sfcalendar.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -2891,7 +2891,9 @@ class _SfCalendarState extends State<SfCalendar>
28912891
? _nextDates[0]
28922892
: (index < 0
28932893
? _previousDates[-index - 2]
2894-
: index >= _nextDates.length - 1 ? null : _nextDates[index + 1]);
2894+
: index >= _nextDates.length - 1
2895+
? null
2896+
: _nextDates[index + 1]);
28952897

28962898
/// Check the following scenarios for rendering month label at last when
28972899
/// the week holds different month dates

packages/syncfusion_flutter_calendar/lib/src/calendar/views/timeline_view.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ class _TimelineView extends CustomPainter {
123123
const double padding = 0.5;
124124
top = top == 0 ? padding : top;
125125
height = height == size.height
126-
? top == padding ? height - (padding * 2) : height - padding
126+
? top == padding
127+
? height - (padding * 2)
128+
: height - padding
127129
: height;
128130
double width = timeIntervalHeight;
129131
double difference = 0;
@@ -495,7 +497,9 @@ class _TimelineViewHeaderView extends CustomPainter {
495497
: timelineViewHeaderScrollController.offset ~/ childWidth;
496498
_xPosition = !isTimelineMonth
497499
? timelineViewHeaderScrollController.offset
498-
: isRTL ? size.width - childWidth : _xPosition;
500+
: isRTL
501+
? size.width - childWidth
502+
: _xPosition;
499503

500504
TextStyle viewHeaderDayTextStyle =
501505
calendarTheme.brightness == Brightness.light

packages/syncfusion_flutter_charts/example/lib/main.dart

+18-18
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ import 'package:flutter/material.dart';
22
import 'package:syncfusion_flutter_charts/charts.dart';
33

44
void main() {
5-
return runApp(ChartApp());
5+
return runApp(_ChartApp());
66
}
77

8-
class ChartApp extends StatelessWidget {
8+
class _ChartApp extends StatelessWidget {
99
@override
1010
Widget build(BuildContext context) {
1111
return MaterialApp(
1212
title: 'Chart Demo',
1313
theme: ThemeData(primarySwatch: Colors.blue),
14-
home: MyHomePage(),
14+
home: _MyHomePage(),
1515
);
1616
}
1717
}
1818

19-
class MyHomePage extends StatefulWidget {
19+
class _MyHomePage extends StatefulWidget {
2020
// ignore: prefer_const_constructors_in_immutables
21-
MyHomePage({Key key}) : super(key: key);
21+
_MyHomePage({Key key}) : super(key: key);
2222

2323
@override
2424
_MyHomePageState createState() => _MyHomePageState();
2525
}
2626

27-
class _MyHomePageState extends State<MyHomePage> {
27+
class _MyHomePageState extends State<_MyHomePage> {
2828
@override
2929
Widget build(BuildContext context) {
3030
return Scaffold(
@@ -39,25 +39,25 @@ class _MyHomePageState extends State<MyHomePage> {
3939
legend: Legend(isVisible: true),
4040
// Enable tooltip
4141
tooltipBehavior: TooltipBehavior(enable: true),
42-
series: <ChartSeries<SalesData, String>>[
43-
LineSeries<SalesData, String>(
44-
dataSource: <SalesData>[
45-
SalesData('Jan', 35),
46-
SalesData('Feb', 28),
47-
SalesData('Mar', 34),
48-
SalesData('Apr', 32),
49-
SalesData('May', 40)
42+
series: <ChartSeries<_SalesData, String>>[
43+
LineSeries<_SalesData, String>(
44+
dataSource: <_SalesData>[
45+
_SalesData('Jan', 35),
46+
_SalesData('Feb', 28),
47+
_SalesData('Mar', 34),
48+
_SalesData('Apr', 32),
49+
_SalesData('May', 40)
5050
],
51-
xValueMapper: (SalesData sales, _) => sales.year,
52-
yValueMapper: (SalesData sales, _) => sales.sales,
51+
xValueMapper: (_SalesData sales, _) => sales.year,
52+
yValueMapper: (_SalesData sales, _) => sales.sales,
5353
// Enable data label
5454
dataLabelSettings: DataLabelSettings(isVisible: true))
5555
]));
5656
}
5757
}
5858

59-
class SalesData {
60-
SalesData(this.year, this.sales);
59+
class _SalesData {
60+
_SalesData(this.year, this.sales);
6161

6262
final String year;
6363
final double sales;

packages/syncfusion_flutter_charts/lib/src/chart/axis/axis.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -2712,10 +2712,14 @@ abstract class ChartAxisRenderer with _CustomizeAxisElements {
27122712
/// Restrict zoom factor and zoom position values between 0 to 1
27132713
axisRenderer._zoomFactor = axisRenderer._zoomFactor > 1
27142714
? 1
2715-
: axisRenderer._zoomFactor < 0 ? 0 : axisRenderer._zoomFactor;
2715+
: axisRenderer._zoomFactor < 0
2716+
? 0
2717+
: axisRenderer._zoomFactor;
27162718
axisRenderer._zoomPosition = axisRenderer._zoomPosition > 1
27172719
? 1
2718-
: axisRenderer._zoomPosition < 0 ? 0 : axisRenderer._zoomPosition;
2720+
: axisRenderer._zoomPosition < 0
2721+
? 0
2722+
: axisRenderer._zoomPosition;
27192723
if (_chartState._oldAxisRenderers != null &&
27202724
_chartState._oldAxisRenderers.isNotEmpty) {
27212725
oldAxisRenderer =

packages/syncfusion_flutter_charts/lib/src/chart/axis/axis_panel.dart

+12-4
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ class _ChartAxis {
192192
rect.height;
193193
axisRenderer._totalSize = crosPosition - axisRenderer._totalSize < 0
194194
? (crosPosition - axisRenderer._totalSize).abs()
195-
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
195+
: !axis.placeLabelsNearAxisLine
196+
? labelSize
197+
: 0;
196198
}
197199
_bottomSize += axisRenderer._totalSize;
198200
_bottomAxesCount
@@ -210,7 +212,9 @@ class _ChartAxis {
210212
axisRenderer._totalSize = crosPosition + axisRenderer._totalSize >
211213
rect.height
212214
? ((crosPosition + axisRenderer._totalSize) - rect.height).abs()
213-
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
215+
: !axis.placeLabelsNearAxisLine
216+
? labelSize
217+
: 0;
214218
}
215219
_topSize += axisRenderer._totalSize;
216220
_topAxesCount.add(_AxisSize(axisRenderer, axisRenderer._totalSize));
@@ -228,7 +232,9 @@ class _ChartAxis {
228232
rect.width;
229233
axisRenderer._totalSize = crosPosition - axisRenderer._totalSize < 0
230234
? (crosPosition - axisRenderer._totalSize).abs()
231-
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
235+
: !axis.placeLabelsNearAxisLine
236+
? labelSize
237+
: 0;
232238
}
233239
_leftSize += axisRenderer._totalSize;
234240
_leftAxesCount.add(_AxisSize(axisRenderer, axisRenderer._totalSize));
@@ -245,7 +251,9 @@ class _ChartAxis {
245251
axisRenderer._totalSize = crosPosition + axisRenderer._totalSize >
246252
rect.width
247253
? ((crosPosition + axisRenderer._totalSize) - rect.width).abs()
248-
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
254+
: !axis.placeLabelsNearAxisLine
255+
? labelSize
256+
: 0;
249257
}
250258
_rightSize += axisRenderer._totalSize;
251259
_rightAxesCount.add(_AxisSize(axisRenderer, axisRenderer._totalSize));

packages/syncfusion_flutter_charts/lib/src/chart/axis/plotband.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,9 @@ class _PlotBandPainter extends CustomPainter {
633633
? plotBand.repeatUntil is DateTime
634634
? plotBand.repeatUntil.millisecondsSinceEpoch
635635
: plotBand.repeatUntil
636-
: endValue is DateTime ? endValue.millisecondsSinceEpoch : endValue;
636+
: endValue is DateTime
637+
? endValue.millisecondsSinceEpoch
638+
: endValue;
637639
} else if (axisRenderer is CategoryAxisRenderer) {
638640
startValue = startValue is num
639641
? startValue
@@ -642,7 +644,9 @@ class _PlotBandPainter extends CustomPainter {
642644
? plotBand.repeatUntil is num
643645
? plotBand.repeatUntil.floor()
644646
: axisRenderer._labels.indexOf(plotBand.repeatUntil)
645-
: endValue is num ? endValue : axisRenderer._labels.indexOf(endValue);
647+
: endValue is num
648+
? endValue
649+
: axisRenderer._labels.indexOf(endValue);
646650
} else if (axisRenderer is LogarithmicAxisRenderer ||
647651
axisRenderer is NumericAxisRenderer) {
648652
endValue = isNeedRepeat ? plotBand.repeatUntil : endValue;

packages/syncfusion_flutter_charts/lib/src/chart/base/series_base.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,16 @@ class _ChartSeries {
136136
? (xPointValue >= xMin) && (xPointValue <= xMax)
137137
: xMin != null
138138
? xPointValue >= xMin
139-
: xMax != null ? xPointValue <= xMax : false) ||
139+
: xMax != null
140+
? xPointValue <= xMax
141+
: false) ||
140142
((yMin != null && yMax != null)
141143
? (yVal >= yMin) && (yVal <= yMax)
142144
: yMin != null
143145
? yVal >= yMin
144-
: yMax != null ? yVal <= yMax : false)
146+
: yMax != null
147+
? yVal <= yMax
148+
: false)
145149
: true) {
146150
_isXVisibleRange = true;
147151
_isYVisibleRange = true;

packages/syncfusion_flutter_charts/lib/src/chart/chart_series/box_and_whisker_series.dart

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ class _BoxPlotQuartileValues {
182182
_BoxPlotQuartileValues(
183183
{this.minimum,
184184
this.maximum,
185+
//ignore: unused_element
185186
List<num> outliers,
186187
this.upperQuartile,
187188
this.lowerQuartile,

packages/syncfusion_flutter_charts/lib/src/chart/chart_series/xy_data_series.dart

+12-4
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,15 @@ abstract class XyDataSeriesRenderer extends CartesianSeriesRenderer {
541541
if (_seriesType == 'splinerangearea') {
542542
// ignore: prefer_if_null_operators
543543
currentPoint.low = currentPoint.low == null
544-
? pointIndex != 0 ? prevPoint.low ?? 0 : 0
544+
? pointIndex != 0
545+
? prevPoint.low ?? 0
546+
: 0
545547
: currentPoint.low;
546548
// ignore: prefer_if_null_operators
547549
currentPoint.high = currentPoint.high == null
548-
? pointIndex != 0 ? prevPoint.high ?? 0 : 0
550+
? pointIndex != 0
551+
? prevPoint.high ?? 0
552+
: 0
549553
: currentPoint.high;
550554
} else {
551555
currentPoint.y = pointIndex != 0 ? prevPoint.y : 0;
@@ -557,11 +561,15 @@ abstract class XyDataSeriesRenderer extends CartesianSeriesRenderer {
557561
if (_seriesType == 'splinerangearea') {
558562
// ignore: prefer_if_null_operators
559563
currentPoint.low = currentPoint.low == null
560-
? pointIndex != 0 ? prevPoint.low ?? 0 : 0
564+
? pointIndex != 0
565+
? prevPoint.low ?? 0
566+
: 0
561567
: currentPoint.low;
562568
// ignore: prefer_if_null_operators
563569
currentPoint.high = currentPoint.high == null
564-
? pointIndex != 0 ? prevPoint.high ?? 0 : 0
570+
? pointIndex != 0
571+
? prevPoint.high ?? 0
572+
: 0
565573
: currentPoint.high;
566574
}
567575
currentPoint.y = pointIndex != 0 &&

0 commit comments

Comments
 (0)