Skip to content

Commit

Permalink
Merge pull request #6 from Yuvaraj-Gajaraj/master
Browse files Browse the repository at this point in the history
Move changes from pub dev.
  • Loading branch information
JayavigneshwaranG authored Oct 5, 2020
2 parents bafd42b + 949b27b commit af6aaf8
Show file tree
Hide file tree
Showing 162 changed files with 1,327 additions and 2,585 deletions.
1 change: 0 additions & 1 deletion packages/syncfusion_flutter_barcodes/lib/barcodes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ part './src/barcode_generator/two_dimensional/error_correction_codewords.dart';
part './src/barcode_generator/two_dimensional/qr_code_symbology.dart';
part './src/barcode_generator/two_dimensional/qr_code_values.dart';
part './src/barcode_generator/two_dimensional/datamatrix_symbology.dart';

8 changes: 4 additions & 4 deletions packages/syncfusion_flutter_calendar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [18.3.35] - 10/01/2020
**Bug fixes**
* Now, the appointment will render on the correct timeslot, when the local set as French, Canada, and in `Eastern Standard Time`.
* Now, the appointments will render on the correct timeslot, when the start time of the time slot is set as a different value.

**Features**
* Timeline month view support
* Resource view support
Expand All @@ -14,10 +18,6 @@
* The default value for the `timeIntervalWidth` is changed from 40 to 60.
* The appointment UI width is reduced in the day, week, and workweek views.

** Bug fixes**
* Now, the appointment will render on the correct timeslot, when the local set as French, Canada, and in `Eastern Standard Time`.
* Now, the appointments will render on the correct timeslot, when the start time of the time slot is set as a different value.

## [18.2.59] - 09/23/2020
No changes.

Expand Down
1 change: 0 additions & 1 deletion packages/syncfusion_flutter_calendar/lib/calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ part 'src/calendar/resource_view/resource_view.dart';
part './src/calendar/appointment_layout/appointment_layout.dart';
part './src/calendar/appointment_layout/agenda_view_layout.dart';
part './src/calendar/appointment_layout/allday_appointment_layout.dart';

Original file line number Diff line number Diff line change
Expand Up @@ -2891,7 +2891,9 @@ class _SfCalendarState extends State<SfCalendar>
? _nextDates[0]
: (index < 0
? _previousDates[-index - 2]
: index >= _nextDates.length - 1 ? null : _nextDates[index + 1]);
: index >= _nextDates.length - 1
? null
: _nextDates[index + 1]);

/// Check the following scenarios for rendering month label at last when
/// the week holds different month dates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ class _TimelineView extends CustomPainter {
const double padding = 0.5;
top = top == 0 ? padding : top;
height = height == size.height
? top == padding ? height - (padding * 2) : height - padding
? top == padding
? height - (padding * 2)
: height - padding
: height;
double width = timeIntervalHeight;
double difference = 0;
Expand Down Expand Up @@ -495,7 +497,9 @@ class _TimelineViewHeaderView extends CustomPainter {
: timelineViewHeaderScrollController.offset ~/ childWidth;
_xPosition = !isTimelineMonth
? timelineViewHeaderScrollController.offset
: isRTL ? size.width - childWidth : _xPosition;
: isRTL
? size.width - childWidth
: _xPosition;

TextStyle viewHeaderDayTextStyle =
calendarTheme.brightness == Brightness.light
Expand Down
36 changes: 18 additions & 18 deletions packages/syncfusion_flutter_charts/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@ import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_charts/charts.dart';

void main() {
return runApp(ChartApp());
return runApp(_ChartApp());
}

class ChartApp extends StatelessWidget {
class _ChartApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Chart Demo',
theme: ThemeData(primarySwatch: Colors.blue),
home: MyHomePage(),
home: _MyHomePage(),
);
}
}

class MyHomePage extends StatefulWidget {
class _MyHomePage extends StatefulWidget {
// ignore: prefer_const_constructors_in_immutables
MyHomePage({Key key}) : super(key: key);
_MyHomePage({Key key}) : super(key: key);

@override
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
class _MyHomePageState extends State<_MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -39,25 +39,25 @@ class _MyHomePageState extends State<MyHomePage> {
legend: Legend(isVisible: true),
// Enable tooltip
tooltipBehavior: TooltipBehavior(enable: true),
series: <ChartSeries<SalesData, String>>[
LineSeries<SalesData, String>(
dataSource: <SalesData>[
SalesData('Jan', 35),
SalesData('Feb', 28),
SalesData('Mar', 34),
SalesData('Apr', 32),
SalesData('May', 40)
series: <ChartSeries<_SalesData, String>>[
LineSeries<_SalesData, String>(
dataSource: <_SalesData>[
_SalesData('Jan', 35),
_SalesData('Feb', 28),
_SalesData('Mar', 34),
_SalesData('Apr', 32),
_SalesData('May', 40)
],
xValueMapper: (SalesData sales, _) => sales.year,
yValueMapper: (SalesData sales, _) => sales.sales,
xValueMapper: (_SalesData sales, _) => sales.year,
yValueMapper: (_SalesData sales, _) => sales.sales,
// Enable data label
dataLabelSettings: DataLabelSettings(isVisible: true))
]));
}
}

class SalesData {
SalesData(this.year, this.sales);
class _SalesData {
_SalesData(this.year, this.sales);

final String year;
final double sales;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2712,10 +2712,14 @@ abstract class ChartAxisRenderer with _CustomizeAxisElements {
/// Restrict zoom factor and zoom position values between 0 to 1
axisRenderer._zoomFactor = axisRenderer._zoomFactor > 1
? 1
: axisRenderer._zoomFactor < 0 ? 0 : axisRenderer._zoomFactor;
: axisRenderer._zoomFactor < 0
? 0
: axisRenderer._zoomFactor;
axisRenderer._zoomPosition = axisRenderer._zoomPosition > 1
? 1
: axisRenderer._zoomPosition < 0 ? 0 : axisRenderer._zoomPosition;
: axisRenderer._zoomPosition < 0
? 0
: axisRenderer._zoomPosition;
if (_chartState._oldAxisRenderers != null &&
_chartState._oldAxisRenderers.isNotEmpty) {
oldAxisRenderer =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ class _ChartAxis {
rect.height;
axisRenderer._totalSize = crosPosition - axisRenderer._totalSize < 0
? (crosPosition - axisRenderer._totalSize).abs()
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
: !axis.placeLabelsNearAxisLine
? labelSize
: 0;
}
_bottomSize += axisRenderer._totalSize;
_bottomAxesCount
Expand All @@ -210,7 +212,9 @@ class _ChartAxis {
axisRenderer._totalSize = crosPosition + axisRenderer._totalSize >
rect.height
? ((crosPosition + axisRenderer._totalSize) - rect.height).abs()
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
: !axis.placeLabelsNearAxisLine
? labelSize
: 0;
}
_topSize += axisRenderer._totalSize;
_topAxesCount.add(_AxisSize(axisRenderer, axisRenderer._totalSize));
Expand All @@ -228,7 +232,9 @@ class _ChartAxis {
rect.width;
axisRenderer._totalSize = crosPosition - axisRenderer._totalSize < 0
? (crosPosition - axisRenderer._totalSize).abs()
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
: !axis.placeLabelsNearAxisLine
? labelSize
: 0;
}
_leftSize += axisRenderer._totalSize;
_leftAxesCount.add(_AxisSize(axisRenderer, axisRenderer._totalSize));
Expand All @@ -245,7 +251,9 @@ class _ChartAxis {
axisRenderer._totalSize = crosPosition + axisRenderer._totalSize >
rect.width
? ((crosPosition + axisRenderer._totalSize) - rect.width).abs()
: !axis.placeLabelsNearAxisLine ? labelSize : 0;
: !axis.placeLabelsNearAxisLine
? labelSize
: 0;
}
_rightSize += axisRenderer._totalSize;
_rightAxesCount.add(_AxisSize(axisRenderer, axisRenderer._totalSize));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,9 @@ class _PlotBandPainter extends CustomPainter {
? plotBand.repeatUntil is DateTime
? plotBand.repeatUntil.millisecondsSinceEpoch
: plotBand.repeatUntil
: endValue is DateTime ? endValue.millisecondsSinceEpoch : endValue;
: endValue is DateTime
? endValue.millisecondsSinceEpoch
: endValue;
} else if (axisRenderer is CategoryAxisRenderer) {
startValue = startValue is num
? startValue
Expand All @@ -642,7 +644,9 @@ class _PlotBandPainter extends CustomPainter {
? plotBand.repeatUntil is num
? plotBand.repeatUntil.floor()
: axisRenderer._labels.indexOf(plotBand.repeatUntil)
: endValue is num ? endValue : axisRenderer._labels.indexOf(endValue);
: endValue is num
? endValue
: axisRenderer._labels.indexOf(endValue);
} else if (axisRenderer is LogarithmicAxisRenderer ||
axisRenderer is NumericAxisRenderer) {
endValue = isNeedRepeat ? plotBand.repeatUntil : endValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,16 @@ class _ChartSeries {
? (xPointValue >= xMin) && (xPointValue <= xMax)
: xMin != null
? xPointValue >= xMin
: xMax != null ? xPointValue <= xMax : false) ||
: xMax != null
? xPointValue <= xMax
: false) ||
((yMin != null && yMax != null)
? (yVal >= yMin) && (yVal <= yMax)
: yMin != null
? yVal >= yMin
: yMax != null ? yVal <= yMax : false)
: yMax != null
? yVal <= yMax
: false)
: true) {
_isXVisibleRange = true;
_isYVisibleRange = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class _BoxPlotQuartileValues {
_BoxPlotQuartileValues(
{this.minimum,
this.maximum,
//ignore: unused_element
List<num> outliers,
this.upperQuartile,
this.lowerQuartile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,15 @@ abstract class XyDataSeriesRenderer extends CartesianSeriesRenderer {
if (_seriesType == 'splinerangearea') {
// ignore: prefer_if_null_operators
currentPoint.low = currentPoint.low == null
? pointIndex != 0 ? prevPoint.low ?? 0 : 0
? pointIndex != 0
? prevPoint.low ?? 0
: 0
: currentPoint.low;
// ignore: prefer_if_null_operators
currentPoint.high = currentPoint.high == null
? pointIndex != 0 ? prevPoint.high ?? 0 : 0
? pointIndex != 0
? prevPoint.high ?? 0
: 0
: currentPoint.high;
} else {
currentPoint.y = pointIndex != 0 ? prevPoint.y : 0;
Expand All @@ -557,11 +561,15 @@ abstract class XyDataSeriesRenderer extends CartesianSeriesRenderer {
if (_seriesType == 'splinerangearea') {
// ignore: prefer_if_null_operators
currentPoint.low = currentPoint.low == null
? pointIndex != 0 ? prevPoint.low ?? 0 : 0
? pointIndex != 0
? prevPoint.low ?? 0
: 0
: currentPoint.low;
// ignore: prefer_if_null_operators
currentPoint.high = currentPoint.high == null
? pointIndex != 0 ? prevPoint.high ?? 0 : 0
? pointIndex != 0
? prevPoint.high ?? 0
: 0
: currentPoint.high;
}
currentPoint.y = pointIndex != 0 &&
Expand Down
Loading

0 comments on commit af6aaf8

Please sign in to comment.