diff --git a/packages/syncfusion_flutter_barcodes/lib/barcodes.dart b/packages/syncfusion_flutter_barcodes/lib/barcodes.dart index f20ad0cc..49275b36 100644 --- a/packages/syncfusion_flutter_barcodes/lib/barcodes.dart +++ b/packages/syncfusion_flutter_barcodes/lib/barcodes.dart @@ -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'; - diff --git a/packages/syncfusion_flutter_calendar/CHANGELOG.md b/packages/syncfusion_flutter_calendar/CHANGELOG.md index e4309e29..dc78037a 100644 --- a/packages/syncfusion_flutter_calendar/CHANGELOG.md +++ b/packages/syncfusion_flutter_calendar/CHANGELOG.md @@ -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 @@ -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. diff --git a/packages/syncfusion_flutter_calendar/lib/calendar.dart b/packages/syncfusion_flutter_calendar/lib/calendar.dart index 02ce7f04..44e98ce8 100644 --- a/packages/syncfusion_flutter_calendar/lib/calendar.dart +++ b/packages/syncfusion_flutter_calendar/lib/calendar.dart @@ -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'; - diff --git a/packages/syncfusion_flutter_calendar/lib/src/calendar/sfcalendar.dart b/packages/syncfusion_flutter_calendar/lib/src/calendar/sfcalendar.dart index 12e6fe87..a4a46ade 100644 --- a/packages/syncfusion_flutter_calendar/lib/src/calendar/sfcalendar.dart +++ b/packages/syncfusion_flutter_calendar/lib/src/calendar/sfcalendar.dart @@ -2891,7 +2891,9 @@ class _SfCalendarState extends State ? _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 diff --git a/packages/syncfusion_flutter_calendar/lib/src/calendar/views/timeline_view.dart b/packages/syncfusion_flutter_calendar/lib/src/calendar/views/timeline_view.dart index c213ae71..e53e26e7 100644 --- a/packages/syncfusion_flutter_calendar/lib/src/calendar/views/timeline_view.dart +++ b/packages/syncfusion_flutter_calendar/lib/src/calendar/views/timeline_view.dart @@ -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; @@ -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 diff --git a/packages/syncfusion_flutter_charts/example/lib/main.dart b/packages/syncfusion_flutter_charts/example/lib/main.dart index 4c06b957..9a474bc4 100644 --- a/packages/syncfusion_flutter_charts/example/lib/main.dart +++ b/packages/syncfusion_flutter_charts/example/lib/main.dart @@ -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 { +class _MyHomePageState extends State<_MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( @@ -39,25 +39,25 @@ class _MyHomePageState extends State { legend: Legend(isVisible: true), // Enable tooltip tooltipBehavior: TooltipBehavior(enable: true), - series: >[ - LineSeries( - dataSource: [ - SalesData('Jan', 35), - SalesData('Feb', 28), - SalesData('Mar', 34), - SalesData('Apr', 32), - SalesData('May', 40) + series: >[ + 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; diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis.dart b/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis.dart index 06375e65..f30ec654 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis.dart @@ -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 = diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis_panel.dart b/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis_panel.dart index a6787928..521b81dd 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis_panel.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/axis/axis_panel.dart @@ -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 @@ -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)); @@ -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)); @@ -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)); diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/axis/plotband.dart b/packages/syncfusion_flutter_charts/lib/src/chart/axis/plotband.dart index bcd53087..ede0dc01 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/axis/plotband.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/axis/plotband.dart @@ -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 @@ -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; diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/base/series_base.dart b/packages/syncfusion_flutter_charts/lib/src/chart/base/series_base.dart index a4287601..90a1cdfc 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/base/series_base.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/base/series_base.dart @@ -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; diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/box_and_whisker_series.dart b/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/box_and_whisker_series.dart index d982cb00..c7dee566 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/box_and_whisker_series.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/box_and_whisker_series.dart @@ -182,6 +182,7 @@ class _BoxPlotQuartileValues { _BoxPlotQuartileValues( {this.minimum, this.maximum, + //ignore: unused_element List outliers, this.upperQuartile, this.lowerQuartile, diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/xy_data_series.dart b/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/xy_data_series.dart index 0cf752d6..f46c7d7c 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/xy_data_series.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/chart_series/xy_data_series.dart @@ -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; @@ -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 && diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/common/data_label_renderer.dart b/packages/syncfusion_flutter_charts/lib/src/chart/common/data_label_renderer.dart index 8aff5e65..d7242710 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/common/data_label_renderer.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/common/data_label_renderer.dart @@ -244,27 +244,43 @@ void _calculateDataLabelPosition( point.label3 = point.dataLabelMapper ?? _getLabelText( point.open > point.close - ? !inversed ? point.close : point.open - : !inversed ? point.open : point.close, + ? !inversed + ? point.close + : point.open + : !inversed + ? point.open + : point.close, seriesRenderer); point.label4 = point.dataLabelMapper ?? _getLabelText( point.open > point.close - ? !inversed ? point.open : point.close - : !inversed ? point.close : point.open, + ? !inversed + ? point.open + : point.close + : !inversed + ? point.close + : point.open, seriesRenderer); } else { point.label3 = point.dataLabelMapper ?? _getLabelText( point.lowerQuartile > point.upperQuartile - ? !inversed ? point.upperQuartile : point.lowerQuartile - : !inversed ? point.lowerQuartile : point.upperQuartile, + ? !inversed + ? point.upperQuartile + : point.lowerQuartile + : !inversed + ? point.lowerQuartile + : point.upperQuartile, seriesRenderer); point.label4 = point.dataLabelMapper ?? _getLabelText( point.lowerQuartile > point.upperQuartile - ? !inversed ? point.lowerQuartile : point.upperQuartile - : !inversed ? point.upperQuartile : point.lowerQuartile, + ? !inversed + ? point.lowerQuartile + : point.upperQuartile + : !inversed + ? point.upperQuartile + : point.lowerQuartile, seriesRenderer); point.label5 = point.dataLabelMapper ?? _getLabelText(point.median, seriesRenderer); @@ -421,7 +437,9 @@ List<_ChartLocation> _getAlignedLabelLocations( dataLabel.alignment, (isRangeSeries ? point.high - : isBoxSeries ? point.maximum : point.yValue) < + : isBoxSeries + ? point.maximum + : point.yValue) < 0, transposed); if (isRangeSeries || isBoxSeries) { @@ -434,7 +452,9 @@ List<_ChartLocation> _getAlignedLabelLocations( dataLabel.alignment, (isRangeSeries ? point.low - : isBoxSeries ? point.minimum : point.yValue) < + : isBoxSeries + ? point.minimum + : point.yValue) < 0, transposed); } @@ -447,7 +467,9 @@ List<_ChartLocation> _getAlignedLabelLocations( dataLabel.alignment, (isRangeSeries ? point.high - : isBoxSeries ? point.maximum : point.yValue) < + : isBoxSeries + ? point.maximum + : point.yValue) < 0, transposed); if (isRangeSeries || isBoxSeries) { @@ -460,7 +482,9 @@ List<_ChartLocation> _getAlignedLabelLocations( dataLabel.alignment, (isRangeSeries ? point.low - : isBoxSeries ? point.minimum : point.yValue) < + : isBoxSeries + ? point.minimum + : point.yValue) < 0, transposed); } @@ -487,8 +511,11 @@ List<_ChartLocation> _getLabelLocations( seriesRenderer._seriesType.contains('candle'); final bool isBoxSeries = seriesRenderer._seriesType.contains('boxandwhisker'); final bool inversed = seriesRenderer._yAxisRenderer._axis.isInversed; - final num value = - isRangeSeries ? point.high : isBoxSeries ? point.maximum : point.yValue; + final num value = isRangeSeries + ? point.high + : isBoxSeries + ? point.maximum + : point.yValue; final bool minus = (value < 0 && !inversed) || (!(value < 0) && inversed); if (!_chartState._requireInvertedAxis) { chartLocation.y = !isBoxSeries @@ -1834,34 +1861,33 @@ bool _isLabelWithinRange(CartesianSeriesRenderer seriesRenderer, bool withInRange = true; final bool isBoxSeries = seriesRenderer._seriesType.contains('boxandwhisker'); if (!(seriesRenderer._yAxisRenderer is LogarithmicAxisRenderer)) { - withInRange = - _withInRange(point.xValue, seriesRenderer._xAxisRenderer._visibleRange) && - (seriesRenderer._seriesType.contains('range') || - seriesRenderer._seriesType == 'hilo' + withInRange = _withInRange( + point.xValue, seriesRenderer._xAxisRenderer._visibleRange) && + (seriesRenderer._seriesType.contains('range') || + seriesRenderer._seriesType == 'hilo' + ? (_withInRange(isBoxSeries ? point.minimum : point.low, + seriesRenderer._yAxisRenderer._visibleRange) || + _withInRange(isBoxSeries ? point.maximum : point.high, + seriesRenderer._yAxisRenderer._visibleRange)) + : seriesRenderer._seriesType == 'hiloopenclose' || + seriesRenderer._seriesType.contains('candle') || + isBoxSeries ? (_withInRange(isBoxSeries ? point.minimum : point.low, - seriesRenderer._yAxisRenderer._visibleRange) || + seriesRenderer._yAxisRenderer._visibleRange) && _withInRange(isBoxSeries ? point.maximum : point.high, + seriesRenderer._yAxisRenderer._visibleRange) && + _withInRange(isBoxSeries ? point.lowerQuartile : point.open, + seriesRenderer._yAxisRenderer._visibleRange) && + _withInRange( + isBoxSeries ? point.upperQuartile : point.close, seriesRenderer._yAxisRenderer._visibleRange)) - : seriesRenderer._seriesType == 'hiloopenclose' || - seriesRenderer._seriesType.contains('candle') || - isBoxSeries - ? (_withInRange(isBoxSeries ? point.minimum : point.low, - seriesRenderer._yAxisRenderer._visibleRange) && - _withInRange(isBoxSeries ? point.maximum : point.high, - seriesRenderer._yAxisRenderer._visibleRange) && - _withInRange( - isBoxSeries ? point.lowerQuartile : point.open, - seriesRenderer._yAxisRenderer._visibleRange) && - _withInRange( - isBoxSeries ? point.upperQuartile : point.close, - seriesRenderer._yAxisRenderer._visibleRange)) - : _withInRange( - seriesRenderer._seriesType.contains('100') - ? point.cumulativeValue - : seriesRenderer._seriesType == 'waterfall' - ? point.endValue ?? 0 - : point.yValue, - seriesRenderer._yAxisRenderer._visibleRange)); + : _withInRange( + seriesRenderer._seriesType.contains('100') + ? point.cumulativeValue + : seriesRenderer._seriesType == 'waterfall' + ? point.endValue ?? 0 + : point.yValue, + seriesRenderer._yAxisRenderer._visibleRange)); } return withInRange; } diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/technical_indicator.dart b/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/technical_indicator.dart index bc66acea..c03f5bef 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/technical_indicator.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/technical_indicator.dart @@ -425,6 +425,7 @@ class TechnicalIndicatorsRenderer { CartesianChartPoint sourcePoint, CartesianSeries series, int index, + //ignore: unused_element [TechnicalIndicators indicator]) { final CartesianChartPoint point = CartesianChartPoint(x, null); diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/tma_indicator.dart b/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/tma_indicator.dart index 7c45971f..6a2b5707 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/tma_indicator.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/technical_indicators/tma_indicator.dart @@ -162,7 +162,9 @@ class TmaIndicator extends TechnicalIndicators { /// To return list of spliced values List _splice(List list, int index, - [num howMany, num elements]) { + //ignore: unused_element + [num howMany, + num elements]) { if (elements != null) { list.insertAll(index, [elements]); } diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/trendlines/trendlines.dart b/packages/syncfusion_flutter_charts/lib/src/chart/trendlines/trendlines.dart index 4e8e0483..83b82365 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/trendlines/trendlines.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/trendlines/trendlines.dart @@ -629,7 +629,9 @@ class TrendlineRenderer { final dynamic xVal = point.xValue != null && (math.log(point.xValue)).isFinite ? math.log(point.xValue) - : (point.x is String) ? point.xValue : point.x; + : (point.x is String) + ? point.xValue + : point.x; xValues.add(xVal); if (!(seriesRenderer._series is RangeAreaSeries || seriesRenderer._series is RangeColumnSeries || @@ -701,7 +703,9 @@ class TrendlineRenderer { final dynamic xVal = (point.xValue != null && (math.log(point.xValue)).isFinite) ? math.log(point.xValue) - : (point.x is String) ? point.xValue : point.x; + : (point.x is String) + ? point.xValue + : point.x; xLogValue.add(xVal); if (!(seriesRenderer._series is RangeAreaSeries || seriesRenderer._series is RangeColumnSeries || diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/tooltip_painter.dart b/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/tooltip_painter.dart index b38efe15..05528ee4 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/tooltip_painter.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/tooltip_painter.dart @@ -433,18 +433,28 @@ class _TooltipPainter extends CustomPainter { _getLabelValue(point.cumulativeValue, axisRenderer._axis, digits); } if (tooltip.format != null) { - resultantString = (seriesRenderer._seriesType.contains('range') || seriesRenderer._seriesType == 'hilo') && !isTrendLine + resultantString = (seriesRenderer._seriesType.contains('range') || seriesRenderer._seriesType == 'hilo') && + !isTrendLine ? (tooltip.format .replaceAll('point.x', values[0]) .replaceAll('point.high', highValue) .replaceAll('point.low', lowValue) .replaceAll('seriesRenderer._series.name', seriesRenderer._series.name ?? seriesRenderer._seriesName)) - : (seriesRenderer._seriesType.contains('hiloopenclose') || seriesRenderer._seriesType.contains('candle')) && !isTrendLine - ? (tooltip.format.replaceAll('point.x', values[0]).replaceAll('point.high', highValue).replaceAll('point.low', lowValue).replaceAll('point.open', openValue).replaceAll('point.close', closeValue).replaceAll( - 'seriesRenderer._series.name', - seriesRenderer._series.name ?? seriesRenderer._seriesName)) - : (seriesRenderer._seriesType.contains('boxandwhisker')) && !isTrendLine + : (seriesRenderer._seriesType.contains('hiloopenclose') || seriesRenderer._seriesType.contains('candle')) && + !isTrendLine + ? (tooltip.format + .replaceAll('point.x', values[0]) + .replaceAll('point.high', highValue) + .replaceAll('point.low', lowValue) + .replaceAll('point.open', openValue) + .replaceAll('point.close', closeValue) + .replaceAll( + 'seriesRenderer._series.name', + seriesRenderer._series.name ?? + seriesRenderer._seriesName)) + : (seriesRenderer._seriesType.contains('boxandwhisker')) && + !isTrendLine ? (tooltip.format .replaceAll('point.x', values[0]) .replaceAll('point.minimum', minimumValue) @@ -835,7 +845,9 @@ class _TooltipPainter extends CustomPainter { final double tooltipRightEnd = x + (rect.width / 2); xPos = xPos < boundaryRect.left ? boundaryRect.left - : tooltipRightEnd > totalWidth ? totalWidth - rect.width : xPos; + : tooltipRightEnd > totalWidth + ? totalWidth - rect.width + : xPos; yPos = yPos - (pointerLength / 2); } else { isTop = false; @@ -848,7 +860,9 @@ class _TooltipPainter extends CustomPainter { final double tooltipRightEnd = x + (rect.width / 2); xPos = xPos < boundaryRect.left ? boundaryRect.left - : tooltipRightEnd > totalWidth ? totalWidth - rect.width : xPos; + : tooltipRightEnd > totalWidth + ? totalWidth - rect.width + : xPos; } if (xPos <= boundaryRect.left + 5) { xPos = xPos + 5; diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/trackball_painter.dart b/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/trackball_painter.dart index fd1143ee..a65f5611 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/trackball_painter.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/trackball_painter.dart @@ -900,7 +900,9 @@ class _TrackballPainter extends CustomPainter { final double tooltipRightEnd = x + (labelRect.width / 2); xPos = xPos < boundaryRect.left ? boundaryRect.left - : tooltipRightEnd > totalWidth ? totalWidth - labelRect.width : xPos; + : tooltipRightEnd > totalWidth + ? totalWidth - labelRect.width + : xPos; yPos = yPos - pointerLength; if (yPos + labelRect.height >= boundaryRect.bottom) { yPos = boundaryRect.bottom - labelRect.height; @@ -1322,8 +1324,11 @@ class _TrackballPainter extends CustomPainter { final double width = j > 0 ? _measureText(str1[j - 1], labelStyle).width : 0; previousWidth += width; - final String colon = - boldString.isNotEmpty ? '' : j > 0 ? ' :' : ''; + final String colon = boldString.isNotEmpty + ? '' + : j > 0 + ? ' :' + : ''; labelStyle = TextStyle( fontWeight: ((headerText && boldString.isEmpty) || xFormat || isBold) @@ -1788,11 +1793,13 @@ class _TrackballPainter extends CustomPainter { .toString() + '\n' + 'LowerQuartile : ' + - _getLabelValue(lowerQuartileValue, cartesianSeriesRenderer._yAxisRenderer._axis) + _getLabelValue(lowerQuartileValue, + cartesianSeriesRenderer._yAxisRenderer._axis) .toString() + '\n' + 'UpperQuartile : ' + - _getLabelValue(upperQuartileValue, cartesianSeriesRenderer._yAxisRenderer._axis) + _getLabelValue(upperQuartileValue, + cartesianSeriesRenderer._yAxisRenderer._axis) .toString() : 'High : ' + _getLabelValue(highValue, cartesianSeriesRenderer._yAxisRenderer._axis) @@ -1807,14 +1814,16 @@ class _TrackballPainter extends CustomPainter { .toString() + '\n' + 'Close : ' + - _getLabelValue(closeValue, cartesianSeriesRenderer._yAxisRenderer._axis) + _getLabelValue(closeValue, + cartesianSeriesRenderer._yAxisRenderer._axis) .toString() : 'High : ' + _getLabelValue(highValue, cartesianSeriesRenderer._yAxisRenderer._axis) .toString() + '\n' + 'Low : ' + - _getLabelValue(lowValue, cartesianSeriesRenderer._yAxisRenderer._axis).toString(); + _getLabelValue(lowValue, cartesianSeriesRenderer._yAxisRenderer._axis) + .toString(); } return labelValue; } diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/zooming_panning.dart b/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/zooming_panning.dart index b5e9b238..b8963566 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/zooming_panning.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/user_interaction/zooming_panning.dart @@ -428,7 +428,11 @@ class ZoomPanBehaviorRenderer with ZoomBehavior { num origin = axisRenderer._orientation == AxisOrientation.horizontal ? xPos / _chartState._chartAxis._axisClipRect.width : 1 - (yPos / _chartState._chartAxis._axisClipRect.height); - origin = origin > 1 ? 1 : origin < 0 ? 0 : origin; + origin = origin > 1 + ? 1 + : origin < 0 + ? 0 + : origin; zoomFactor = (cumulative == 1) ? 1 : _minMax(1 / cumulative, 0, 1); _zoomPosition = (cumulative == 1) ? 0 @@ -777,7 +781,11 @@ class ZoomPanBehaviorRenderer with ZoomBehavior { origin = axisRenderer._orientation == AxisOrientation.horizontal ? mouseX / _chartState._chartAxis._axisClipRect.width : 1 - (mouseY / _chartState._chartAxis._axisClipRect.height); - origin = origin > 1 ? 1 : origin < 0 ? 0 : origin; + origin = origin > 1 + ? 1 + : origin < 0 + ? 0 + : origin; zoomFactor = (cumulative == 1) ? 1 : _minMax(1 / cumulative, 0, 1); zoomPosition = (cumulative == 1) ? 0 diff --git a/packages/syncfusion_flutter_charts/lib/src/chart/utils/helper.dart b/packages/syncfusion_flutter_charts/lib/src/chart/utils/helper.dart index 99eb4c1d..f03fd789 100644 --- a/packages/syncfusion_flutter_charts/lib/src/chart/utils/helper.dart +++ b/packages/syncfusion_flutter_charts/lib/src/chart/utils/helper.dart @@ -193,7 +193,9 @@ _ChartLocation _calculatePoint( ? _calculateLogBaseValue(x > 1 ? x : 1, xAxis.logBase) : x; y = yAxis is LogarithmicAxis - ? y != null ? _calculateLogBaseValue(y > 1 ? y : 1, yAxis.logBase) : 0 + ? y != null + ? _calculateLogBaseValue(y > 1 ? y : 1, yAxis.logBase) + : 0 : y; x = _valueToCoefficient(x, xAxisRenderer); y = _valueToCoefficient(y, yAxisRenderer); @@ -815,7 +817,9 @@ Rect _getTransposedShadowRect( ? (math.min(point1.y, point2.y) - stackedColumnSeries.trackBorderWidth - stackedColumnSeries.trackPadding) - : isStackedBar ? rect.top : rect.top, + : isStackedBar + ? rect.top + : rect.top, isColumn || isRangeColumn || isHistogram ? _chartState._chartAxis._axisClipRect.width : isStackedColumn @@ -1170,6 +1174,7 @@ void _calculateSideBySidePositions( /// Find the column and bar series collection in axes. List _findSeriesCollection( SfCartesianChartState _chartState, + //ignore: unused_element [bool isRect]) { final List seriesRendererCollection = []; diff --git a/packages/syncfusion_flutter_charts/lib/src/circular_chart/renderer/common.dart b/packages/syncfusion_flutter_charts/lib/src/circular_chart/renderer/common.dart index 21729456..202fd8af 100644 --- a/packages/syncfusion_flutter_charts/lib/src/circular_chart/renderer/common.dart +++ b/packages/syncfusion_flutter_charts/lib/src/circular_chart/renderer/common.dart @@ -424,7 +424,9 @@ Color _getCircularDataLabelColor(ChartPoint currentPoint, ? 'Pie' : seriesRenderer._seriesType == 'doughnut' ? 'Doughnut' - : seriesRenderer._seriesType == 'radialbar' ? 'RadialBar' : 'Default'; + : seriesRenderer._seriesType == 'radialbar' + ? 'RadialBar' + : 'Default'; switch (seriesType) { case 'Pie': case 'Doughnut': diff --git a/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/axis/radial_axis.dart b/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/axis/radial_axis.dart index 0b4ce2e3..44411cea 100644 --- a/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/axis/radial_axis.dart +++ b/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/axis/radial_axis.dart @@ -853,11 +853,15 @@ class RadialAxisRenderer extends GaugeAxisRenderer { final double xValue = x + (midPoint.dx == 0 ? 0 - : (x - midPoint.dx) >= radius ? 0 : (x - midPoint.dx)); + : (x - midPoint.dx) >= radius + ? 0 + : (x - midPoint.dx)); final double yValue = y + (midPoint.dy == 0 ? 0 - : (y - midPoint.dy) >= radius ? 0 : (y - midPoint.dy)); + : (y - midPoint.dy) >= radius + ? 0 + : (y - midPoint.dy)); return Offset(xValue, yValue); } @@ -909,11 +913,15 @@ class RadialAxisRenderer extends GaugeAxisRenderer { final double xValue = x + (midRegionPoint.dx == 0 ? 0 - : (x - midRegionPoint.dx) >= radius ? 0 : (x - midRegionPoint.dx)); + : (x - midRegionPoint.dx) >= radius + ? 0 + : (x - midRegionPoint.dx)); final double yValue = y + (midRegionPoint.dy == 0 ? 0 - : (y - midRegionPoint.dy) >= radius ? 0 : (y - midRegionPoint.dy)); + : (y - midRegionPoint.dy) >= radius + ? 0 + : (y - midRegionPoint.dy)); return Offset(xValue, yValue); } @@ -1044,7 +1052,9 @@ class RadialAxisRenderer extends GaugeAxisRenderer { double _getAxisOffset() { double offset = 0; offset = _isTicksOutside - ? _axis.showTicks ? (_maximumTickLength + _actualTickOffset) : 0 + ? _axis.showTicks + ? (_maximumTickLength + _actualTickOffset) + : 0 : 0; offset += _isLabelsOutside ? _axis.showLabels diff --git a/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/utils/helper.dart b/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/utils/helper.dart index 347cecf1..3a3c5f32 100644 --- a/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/utils/helper.dart +++ b/packages/syncfusion_flutter_gauges/lib/src/radial_gauge/utils/helper.dart @@ -33,6 +33,7 @@ double _getMinMax(double value, double min, double max) { } // Measure the text and return the text size +//ignore: unused_element Size _getTextSize(String textValue, GaugeTextStyle textStyle, [int angle]) { Size size; final TextPainter textPainter = TextPainter( diff --git a/packages/syncfusion_flutter_maps/example/android/gradle.properties b/packages/syncfusion_flutter_maps/example/android/gradle.properties index 94adc3a3..a6738207 100644 --- a/packages/syncfusion_flutter_maps/example/android/gradle.properties +++ b/packages/syncfusion_flutter_maps/example/android/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +android.enableR8=true diff --git a/packages/syncfusion_flutter_maps/lib/maps.dart b/packages/syncfusion_flutter_maps/lib/maps.dart index 82b6f96c..ba8b353c 100644 --- a/packages/syncfusion_flutter_maps/lib/maps.dart +++ b/packages/syncfusion_flutter_maps/lib/maps.dart @@ -1,4 +1,4 @@ -/// Syncfusion Flutter Maps is a data visualization library written natively in +/// Syncfusion Flutter Maps is a data visualization library written natively in /// Dart for creating beautiful and customizable maps. /// /// To use, import `package:syncfusion_flutter_maps/maps.dart`; diff --git a/packages/syncfusion_flutter_maps/lib/src/common/utils.dart b/packages/syncfusion_flutter_maps/lib/src/common/utils.dart index 8e329a19..ddacec81 100644 --- a/packages/syncfusion_flutter_maps/lib/src/common/utils.dart +++ b/packages/syncfusion_flutter_maps/lib/src/common/utils.dart @@ -105,8 +105,11 @@ void _readJsonFile(Map data) { shapeFileData.decodedJsonData.containsKey('features'); final bool hasGeometries = shapeFileData.decodedJsonData.containsKey('geometries'); - final String key = - hasFeatures ? 'features' : hasGeometries ? 'geometries' : null; + final String key = hasFeatures + ? 'features' + : hasGeometries + ? 'geometries' + : null; final int jsonLength = key.isEmpty ? 0 : shapeFileData.decodedJsonData[key].length; diff --git a/packages/syncfusion_flutter_maps/lib/src/features/maps_data_label.dart b/packages/syncfusion_flutter_maps/lib/src/features/maps_data_label.dart index cb9bda7f..f13b242a 100644 --- a/packages/syncfusion_flutter_maps/lib/src/features/maps_data_label.dart +++ b/packages/syncfusion_flutter_maps/lib/src/features/maps_data_label.dart @@ -186,7 +186,9 @@ class _RenderMapDataLabel extends _ShapeLayerChildRenderBoxBase { mapDataSource.forEach((String key, _MapModel model) { dataLabelText = defaultController.isInInteractive ? model.visibleDataLabelText - : hasMapper ? model.dataLabelText : model.primaryKey; + : hasMapper + ? model.dataLabelText + : model.primaryKey; if (dataLabelText == null) { return; } diff --git a/packages/syncfusion_flutter_maps/lib/src/layer/maps_tile_layer.dart b/packages/syncfusion_flutter_maps/lib/src/layer/maps_tile_layer.dart index 436b14e1..3df2664a 100644 --- a/packages/syncfusion_flutter_maps/lib/src/layer/maps_tile_layer.dart +++ b/packages/syncfusion_flutter_maps/lib/src/layer/maps_tile_layer.dart @@ -3,7 +3,7 @@ part of maps; /// Tile layer which renders the tiles returned from the Web Map Tile /// Services (WMTS) like OpenStreetMap, Bing Maps, Google Maps, TomTom etc. /// -/// The [MapTileLayer.urlTemplate] accepts the URL in WMTS format +/// The [MapTileLayer.urlTemplate] accepts the URL in WMTS format /// i.e. {z} — zoom level, {x} and {y} — tile coordinates. /// /// This URL might vary slightly depends on the providers. The formats can be, @@ -17,7 +17,7 @@ part of maps; /// The subscription key may be needed for some of the providers. Please include /// them in the [MapTileLayer.urlTemplate] itself as mentioned in above example. /// Please note that the format may vary between the each map providers. You can -/// check the exact URL format needed for the providers in their official +/// check the exact URL format needed for the providers in their official /// websites. /// /// Regarding the tile rendering, at the lowest zoom level (Level 0), the map is @@ -32,8 +32,8 @@ part of maps; /// /// However, based on the size of the [SfMaps] widget, /// [MapTileLayer.initialFocalLatLng] and [MapTileLayer.initialZoomLevel] number -/// of initial tiles needed in the view port alone will be rendered. -/// While zooming and panning, new tiles will be requested and rendered on +/// of initial tiles needed in the view port alone will be rendered. +/// While zooming and panning, new tiles will be requested and rendered on /// demand based on the current zoom level and focal point. /// The current zoom level and focal point can be obtained from the /// [MapZoomPanBehavior.zoomLevel] and [MapZoomPanBehavior.focalLatLng] @@ -59,7 +59,7 @@ part of maps; /// ``` /// /// See also: -/// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] +/// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] /// with the instance of [MapZoomPanBehavior]. class MapTileLayer extends MapLayer { /// Creates a [MapTileLayer]. @@ -88,7 +88,7 @@ class MapTileLayer extends MapLayer { /// URL to request the tiles from the providers. /// - /// The [MapTileLayer.urlTemplate] accepts the URL in WMTS format + /// The [MapTileLayer.urlTemplate] accepts the URL in WMTS format /// i.e. {z} — zoom level, {x} and {y} — tile coordinates. /// /// This URL might vary slightly depends on the providers. The formats can be, @@ -100,8 +100,8 @@ class MapTileLayer extends MapLayer { /// current center point and the zoom level. /// /// The subscription key may be needed for some of the providers. Please - /// include them in the [MapTileLayer.urlTemplate] itself as mentioned in - /// above example. Please note that the format may vary between the each + /// include them in the [MapTileLayer.urlTemplate] itself as mentioned in + /// above example. Please note that the format may vary between the each /// map providers. You can check the exact URL format needed for the providers /// in their official websites. /// @@ -153,8 +153,8 @@ class MapTileLayer extends MapLayer { /// /// Some of the providers provide different map types. For example, Bing Maps /// provide map types like Road, Aerial, AerialWithLabels etc. These types too - /// can be passed in the [MapTileLayer.urlTemplate] itself as shown in the - /// above example. You can check the official websites of the tile providers + /// can be passed in the [MapTileLayer.urlTemplate] itself as shown in the + /// above example. You can check the official websites of the tile providers /// to know about the available types and the code for it. /// /// See also: @@ -165,11 +165,11 @@ class MapTileLayer extends MapLayer { /// Represents the initial focal latitude and longitude position. /// /// Based on the size of the [SfMaps] widget,[MapTileLayer.initialFocalLatLng] - /// and [MapTileLayer.initialZoomLevel] number of initial tiles needed in the - /// view port alone will be rendered. While zooming and panning, new tiles - /// will be requested and rendered on demand based on the current zoom level - /// and focal point. The current zoom level and focal point can be obtained - /// from the [MapZoomPanBehavior.zoomLevel] and + /// and [MapTileLayer.initialZoomLevel] number of initial tiles needed in the + /// view port alone will be rendered. While zooming and panning, new tiles + /// will be requested and rendered on demand based on the current zoom level + /// and focal point. The current zoom level and focal point can be obtained + /// from the [MapZoomPanBehavior.zoomLevel] and /// [MapZoomPanBehavior.focalLatLng]. /// /// This properties cannot be changed dynamically. @@ -177,7 +177,7 @@ class MapTileLayer extends MapLayer { /// Defaults to `MapLatLng(0.0, 0.0)`. /// /// See also: - /// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] + /// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] /// with the instance of [MapZoomPanBehavior]. /// * [MapZoomPanBehavior.focalLatLng], to dynamically change the center /// position. @@ -187,11 +187,11 @@ class MapTileLayer extends MapLayer { /// Represents the initial zooming level. /// /// Based on the size of the [SfMaps] widget,[MapTileLayer.initialFocalLatLng] - /// and [MapTileLayer.initialZoomLevel] number of initial tiles needed in the - /// view port alone will be rendered. While zooming and panning, new tiles - /// will be requested and rendered on demand based on the current zoom level - /// and focal point. The current zoom level and focal point can be obtained - /// from the [MapZoomPanBehavior.zoomLevel] and + /// and [MapTileLayer.initialZoomLevel] number of initial tiles needed in the + /// view port alone will be rendered. While zooming and panning, new tiles + /// will be requested and rendered on demand based on the current zoom level + /// and focal point. The current zoom level and focal point can be obtained + /// from the [MapZoomPanBehavior.zoomLevel] and /// [MapZoomPanBehavior.focalLatLng]. /// /// This properties cannot be changed dynamically. @@ -199,7 +199,7 @@ class MapTileLayer extends MapLayer { /// Defaults to 1. /// /// See also: - /// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] + /// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] /// with the instance of [MapZoomPanBehavior]. /// * [MapZoomPanBehavior.focalLatLng], to dynamically change the center /// position. diff --git a/packages/syncfusion_flutter_maps/lib/src/maps.dart b/packages/syncfusion_flutter_maps/lib/src/maps.dart index 415b6671..0d2a7302 100644 --- a/packages/syncfusion_flutter_maps/lib/src/maps.dart +++ b/packages/syncfusion_flutter_maps/lib/src/maps.dart @@ -76,7 +76,7 @@ part of maps; /// Tile layer which renders the tiles returned from the Web Map Tile /// Services (WMTS) like OpenStreetMap, Bing Maps, Google Maps, TomTom etc. /// -/// The [MapTileLayer.urlTemplate] accepts the URL in WMTS format +/// The [MapTileLayer.urlTemplate] accepts the URL in WMTS format /// i.e. {z} — zoom level, {x} and {y} — tile coordinates. /// /// This URL might vary slightly depends on the providers. The formats can be, @@ -89,8 +89,8 @@ part of maps; /// /// The subscription key may be needed for some of the providers. Please include /// them in the [MapTileLayer.urlTemplate] itself as mentioned in above example. -/// Please note that the format may vary between the each map providers. -/// You can check the exact URL format needed for the providers in their +/// Please note that the format may vary between the each map providers. +/// You can check the exact URL format needed for the providers in their /// official websites. /// /// Regarding the tile rendering, at the lowest zoom level (Level 0), the map is @@ -105,8 +105,8 @@ part of maps; /// /// However, based on the size of the [SfMaps] widget, /// [MapTileLayer.initialFocalLatLng] and [MapTileLayer.initialZoomLevel] number -/// of initial tiles needed in the view port alone will be rendered. -/// While zooming and panning, new tiles will be requested and rendered on +/// of initial tiles needed in the view port alone will be rendered. +/// While zooming and panning, new tiles will be requested and rendered on /// demand based on the current zoom level and focal point. /// The current zoom level and focal point can be obtained from the /// [MapZoomPanBehavior.zoomLevel] and [MapZoomPanBehavior.focalLatLng] @@ -136,7 +136,7 @@ part of maps; /// bubbles, legends, selection etc. /// * [MapShapeLayerDelegate], for providing the data for the elements like data /// labels, tooltip, bubbles, legends etc. -/// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] +/// * For enabling zooming and panning, set [MapTileLayer.zoomPanBehavior] /// with the instance of [MapZoomPanBehavior]. class SfMaps extends StatefulWidget { diff --git a/packages/syncfusion_flutter_pdf/CHANGELOG.md b/packages/syncfusion_flutter_pdf/CHANGELOG.md index 4be5a821..8348c8ad 100644 --- a/packages/syncfusion_flutter_pdf/CHANGELOG.md +++ b/packages/syncfusion_flutter_pdf/CHANGELOG.md @@ -2,6 +2,54 @@ No changes. +## [18.2.59-beta.1] - 09/24/2020 + +**Bugs** + +* The meta package issue has been resolved now. + +## [18.2.59-beta] - 09/23/2020 + +**Bugs** + +* Now, the issue with package version solving failed has been resolved. + +## [18.2.57-beta] - 09/08/2020 + +No changes. + +## [18.2.56-beta] - 09/01/2020 + +No changes. + +## [18.2.55-beta] - 08/25/2020 + +No changes. + +## [18.2.54-beta] - 08/18/2020 + +No changes. + +## [18.2.48-beta] - 08/04/2020 + +No changes. + +## [18.2.47-beta] - 07/28/2020 + +No changes. + +## [18.2.46-beta] - 07/21/2020 + +No changes. + +## [18.2.45-beta] - 07/14/2020 + +No changes. + +## [18.2.44-beta] - 07/07/2020 + +No changes. + ## [18.1.52-beta] - 05/14/2020 **Bugs** diff --git a/packages/syncfusion_flutter_pdf/lib/pdf.dart b/packages/syncfusion_flutter_pdf/lib/pdf.dart index 74a68b54..92ee38eb 100644 --- a/packages/syncfusion_flutter_pdf/lib/pdf.dart +++ b/packages/syncfusion_flutter_pdf/lib/pdf.dart @@ -9,7 +9,6 @@ import 'package:flutter/material.dart'; import 'package:intl/date_symbol_data_local.dart'; import 'package:intl/intl.dart'; - part 'src/pdf/implementation/pdf_document/pdf_document.dart'; part 'src/pdf/implementation/pdf_document/pdf_catalog.dart'; part 'src/pdf/implementation/pdf_document/enums.dart'; diff --git a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/annotations/pdf_line_annotation.dart b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/annotations/pdf_line_annotation.dart index 061c0086..7dc82eff 100644 --- a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/annotations/pdf_line_annotation.dart +++ b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/annotations/pdf_line_annotation.dart @@ -609,8 +609,12 @@ class PdfLineAnnotation extends PdfAnnotation { final bool isContainsMeasure = _dictionary._items .containsKey(_PdfName(_DictionaryProperties.measure)); final double length = caption == 'Top' - ? isContainsMeasure ? 2 * font.height : font.height - : isContainsMeasure ? 3 * (font.height / 2) : font.height / 2; + ? isContainsMeasure + ? 2 * font.height + : font.height + : isContainsMeasure + ? 3 * (font.height / 2) + : font.height / 2; captionPosition = _getAxisValue(centerPoint, angle + 90, length); } else { captionPosition = _getAxisValue(centerPoint, angle + 90, diff --git a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/graphics/brushes/pdf_solid_brush.dart b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/graphics/brushes/pdf_solid_brush.dart index 1fe2d625..895e5d9a 100644 --- a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/graphics/brushes/pdf_solid_brush.dart +++ b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/graphics/brushes/pdf_solid_brush.dart @@ -16,7 +16,11 @@ class PdfSolidBrush implements PdfBrush { @override bool operator ==(Object other) { - return other is PdfSolidBrush ? color == other.color ? true : false : false; + return other is PdfSolidBrush + ? color == other.color + ? true + : false + : false; } @override diff --git a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/layouting/pdf_grid_layouter.dart b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/layouting/pdf_grid_layouter.dart index f9dd9c25..c3c61244 100644 --- a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/layouting/pdf_grid_layouter.dart +++ b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/layouting/pdf_grid_layouter.dart @@ -442,7 +442,9 @@ class _PdfGridLayouter extends _ElementLayouter { _currentPage._section == param.page._section; _currentBounds.y = format.paginateBounds.top == 0 ? _grid._defaultBorder.top.width / 2 - : format == null ? 0 : format.paginateBounds.top; + : format == null + ? 0 + : format.paginateBounds.top; if (_currentPage != null) { final Map pageLayoutResult = _raiseBeforePageLayout( diff --git a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/pdf_grid.dart b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/pdf_grid.dart index b2dce58b..4713653c 100644 --- a/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/pdf_grid.dart +++ b/packages/syncfusion_flutter_pdf/lib/src/pdf/implementation/structured_elements/grid/pdf_grid.dart @@ -493,7 +493,9 @@ class PdfGrid extends PdfLayoutElement { PdfPage page}) { ArgumentError.checkNotNull(bounds); _initialWidth = bounds.width == 0 - ? page != null ? page.getClientSize().width : graphics.clientSize.width + ? page != null + ? page.getClientSize().width + : graphics.clientSize.width : bounds.width; _isWidthSet = true; if (graphics != null) { diff --git a/packages/syncfusion_flutter_pdfviewer/pubspec.yaml b/packages/syncfusion_flutter_pdfviewer/pubspec.yaml index 701e10a9..5cb801f2 100644 --- a/packages/syncfusion_flutter_pdfviewer/pubspec.yaml +++ b/packages/syncfusion_flutter_pdfviewer/pubspec.yaml @@ -10,6 +10,7 @@ environment: dependencies: flutter: sdk: flutter + vector_math: ">=1.1.0 <3.0.0" path_provider: ^1.6.18 syncfusion_flutter_core: path: ../syncfusion_flutter_core diff --git a/packages/syncfusion_flutter_sliders/CHANGELOG.md b/packages/syncfusion_flutter_sliders/CHANGELOG.md index a1a92c4c..612e7608 100644 --- a/packages/syncfusion_flutter_sliders/CHANGELOG.md +++ b/packages/syncfusion_flutter_sliders/CHANGELOG.md @@ -1,4 +1,4 @@ -## [18.3.35] - 10/01/2020 +## [18.3.35-beta] - 10/01/2020 ## Slider diff --git a/packages/syncfusion_flutter_sliders/example/android/.gitignore b/packages/syncfusion_flutter_sliders/example/android/.gitignore deleted file mode 100644 index bc2100d8..00000000 --- a/packages/syncfusion_flutter_sliders/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/syncfusion_flutter_sliders/example/ios/.gitignore b/packages/syncfusion_flutter_sliders/example/ios/.gitignore deleted file mode 100644 index e96ef602..00000000 --- a/packages/syncfusion_flutter_sliders/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/syncfusion_flutter_sliders/example/lib/main.dart b/packages/syncfusion_flutter_sliders/example/lib/main.dart index 0fcb8473..d3fa39ea 100644 --- a/packages/syncfusion_flutter_sliders/example/lib/main.dart +++ b/packages/syncfusion_flutter_sliders/example/lib/main.dart @@ -76,15 +76,14 @@ class _MyHomePageState extends State { child: SfCartesianChart( margin: const EdgeInsets.all(0), primaryXAxis: DateTimeAxis( - minimum: dateMin, - maximum: dateMax, + minimum: _dateMin, + maximum: _dateMax, isVisible: false, ), - primaryYAxis: - NumericAxis(isVisible: false, maximum: 4), + primaryYAxis: NumericAxis(isVisible: false, maximum: 4), series: >[ SplineAreaSeries( - dataSource: chartData, + dataSource: _chartData, xValueMapper: (Data sales, _) => sales.x, yValueMapper: (Data sales, _) => sales.y) ], diff --git a/packages/syncfusion_flutter_sliders/example/test/widget_test.dart b/packages/syncfusion_flutter_sliders/example/test/widget_test.dart deleted file mode 100644 index 570e0e47..00000000 --- a/packages/syncfusion_flutter_sliders/example/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -void main() {} diff --git a/packages/syncfusion_flutter_sliders/pubspec.yaml b/packages/syncfusion_flutter_sliders/pubspec.yaml index e61034eb..cdbed922 100644 --- a/packages/syncfusion_flutter_sliders/pubspec.yaml +++ b/packages/syncfusion_flutter_sliders/pubspec.yaml @@ -1,6 +1,6 @@ name: syncfusion_flutter_sliders description: Syncfusion Flutter Sliders library is written natively in Dart for creating highly interactive and UI-rich slider controls for filtering purposes. -version: 18.3.35 +version: 18.3.35-beta homepage: https://github.com/syncfusion/flutter-widgets/tree/master/packages/syncfusion_flutter_sliders environment: diff --git a/packages/syncfusion_flutter_xlsio/CHANGELOG.md b/packages/syncfusion_flutter_xlsio/CHANGELOG.md index 62de47b4..2c8065c9 100644 --- a/packages/syncfusion_flutter_xlsio/CHANGELOG.md +++ b/packages/syncfusion_flutter_xlsio/CHANGELOG.md @@ -1,11 +1,16 @@ +## [18.3.35-beta.1] - 10/02/2020 + +**Features** +* Updated the code with respect to coding standards. + ## [18.3.35-beta] - 10/01/2020 Initial release **Features** -* Provided support for creating a simple Excel document with workbook and worksheets. -* Provided support for adding text, number, and date time values in worksheet cells. -* Provided support for applying merge and Excel cell formatting to worksheet cells. -* Provided support for adding formulas to Excel worksheet cells. -* Provided support for adding images (JPEG and PNG only) to Excel worksheet -* Provided support for adding charts to Excel worksheet \ No newline at end of file +* Create simple Excel documents. +* Add text, number, and date time values in the worksheet cells. +* Apply cell formatting, merge and unmerge cells. +* Add basic formulas to Excel worksheet cells. +* Add images (JPEG and PNG) to Excel worksheets. +* Add pie chart, bar chart, column chart, line chart, stacked column chart,stacked line chart and stacked bar chart to Excel worksheets. \ No newline at end of file diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/calc_engine.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/calc_engine.dart index d46c689f..c79d67c2 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/calc_engine.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/calc_engine.dart @@ -22,7 +22,7 @@ class CalcEngine { _tokenOr ]; - _dateTime1900Double = Range.toOADate(_dateTime1900); + _dateTime1900Double = Range._toOADate(_dateTime1900); } static SheetFamilyItem _defaultFamilyItem; static Map _modelToSheetID; @@ -191,7 +191,7 @@ class CalcEngine { /// The list of error strings which are used within the Essential Calculate internally. Users can make changes to this internal error strings. /// Default settings by assigning the new strings to the corresponding position.Reload_errorStrings should be invoked to reset or modify the internal error strings. - List formulaErrorStrings = [ + final List _formulaErrorStrings = [ 'binary operators cannot start an expression', ////0 'cannot parse', ////1 'bad library', ////2 @@ -286,7 +286,8 @@ class CalcEngine { } /// register_gridAsSheet is a method that registers an Worksheet Object so it can be referenced in a formula from another Worksheet Object. - void registerGridAsSheet(String refName, Worksheet model, int sheetFamilyID) { + void _registerGridAsSheet( + String refName, Worksheet model, int sheetFamilyID) { refName = refName.replaceAll("'", "''"); _modelToSheetID ??= {}; @@ -377,7 +378,7 @@ class CalcEngine { /// This method retrieves the value in the requested cell reference using fresh computations /// for any cells that affect the value of the requested cell. - String pullUpdatedValue(String cellRef) { + String _pullUpdatedValue(String cellRef) { bool isUseFormulaValueChanged = false; _inAPull = true; _multiTick = false; @@ -389,7 +390,7 @@ class CalcEngine { String txt; if (!_dependentFormulaCells.containsKey(s) && !_formulaInfoTable.containsKey(s)) { - txt = getValueFromParentObject(s, true); + txt = _getValueFromParentObject(s, true); if (_useFormulaValues) { isUseFormulaValueChanged = true; @@ -401,7 +402,7 @@ class CalcEngine { _ignoreValueChanged = true; final int row = _getRowIndex(s); final int col = _getColIndex(s); - _grid.setValueRowCol(txt, row, col); + _grid._setValueRowCol(txt, row, col); _ignoreValueChanged = saveIVC; } @@ -445,7 +446,7 @@ class CalcEngine { return -1; } } - throw Exception(formulaErrorStrings[_badIndex]); + throw Exception(_formulaErrorStrings[_badIndex]); } /// A method that gets the column index from a cell reference passed in. @@ -502,7 +503,7 @@ class CalcEngine { return s1; } - throw Exception(formulaErrorStrings[_improperFormula]); + throw Exception(_formulaErrorStrings[_improperFormula]); } /// A method that computes a parsed formula. @@ -521,7 +522,7 @@ class CalcEngine { String _computedValue(String formula) { _exceptionThrown = false; bool isEmptyString = false; - if (textIsEmpty(formula)) { + if (_textIsEmpty(formula)) { return formula; } try { @@ -529,7 +530,7 @@ class CalcEngine { if (_computedValueLevel > _maximumRecursiveCalls) { _computedValueLevel = 0; - throw Exception(formulaErrorStrings[_tooComplex]); + throw Exception(_formulaErrorStrings[_tooComplex]); } final Stack _stack = Stack(); @@ -590,7 +591,7 @@ class CalcEngine { final String s = result[0]; //Below condition is added to return Error String when s is Error String. if (_errorStrings.contains(s)) return s; - _stack._push(getValueFromParentObject(s, true)); + _stack._push(_getValueFromParentObject(s, true)); } else if (formula[i] == 'q') { final int ii = formula.substring(i + 1).indexOf(_leftBracket); if (ii > 0) { @@ -612,7 +613,7 @@ class CalcEngine { final String name = formula.substring(i + 1, i + 1 + ii); if (name == 'AVG' && excelLikeComputations) { - return formulaErrorStrings[_badIndex]; + return _formulaErrorStrings[_badIndex]; } if (_libraryFunctions[name] != null) { final int j = @@ -649,7 +650,7 @@ class CalcEngine { } i += j + ii + 2; } else { - return formulaErrorStrings[_missingFormula]; + return _formulaErrorStrings[_missingFormula]; } } else if (formula[0] == _bMarker) { ////Restart the processing with the formula without library finctions. @@ -657,7 +658,7 @@ class CalcEngine { _stack._clear(); continue; } else { - return formulaErrorStrings[_improperFormula]; + return _formulaErrorStrings[_improperFormula]; } } else if (_isDigit(formula.codeUnitAt(i)) || formula[i] == 'u') { String s = ''; @@ -668,7 +669,7 @@ class CalcEngine { i = result[2]; sheet = result[3]; - s = s + getValueFromParentObject(result[0], true); + s = s + _getValueFromParentObject(result[0], true); } else { while (i < formula.length && (_isDigit(formula.codeUnitAt(i)) || @@ -686,7 +687,7 @@ class CalcEngine { s = s + formula[i]; i = i + 1; } - while (_stack.count > 0) { + while (_stack._count > 0) { s = _stack._pop().toString() + s; } _stack._push(s); @@ -1057,7 +1058,7 @@ class CalcEngine { } } String s2 = ''; - if (_stack.count > 0) s2 = _popString(_stack); + if (_stack._count > 0) s2 = _popString(_stack); if (s2.isNotEmpty && s2[0] == _tic[0]) { if (s2.length > 1 && s2[s2.length - 1] == _tic[0]) { s2 = s2.substring(1, 1 + s2.length - 2); @@ -1110,12 +1111,12 @@ class CalcEngine { } } - if (_stack.count == 0) { + if (_stack._count == 0) { return ''; } else { String s = ''; double d; - int cc = _stack.count; + int cc = _stack._count; do { { //Checks if the stack element is a error String. If yes, then stops popping other stack element and returns the error String. @@ -1156,7 +1157,7 @@ class CalcEngine { _exceptionThrown = true; _computedValueLevel = 0; // ignore: prefer_contains - if (e.toString().indexOf(formulaErrorStrings[_cellEmpty]) > -1) { + if (e.toString().indexOf(_formulaErrorStrings[_cellEmpty]) > -1) { return ''; } else { return e.toString(); @@ -1203,7 +1204,7 @@ class CalcEngine { String adjustRange; final List ranges = _splitArgsPreservingQuotedCommas(range); if (range == null || range == '') { - return formulaErrorStrings[_wrongNumberArguments]; + return _formulaErrorStrings[_wrongNumberArguments]; } for (final r in ranges) { adjustRange = r; @@ -1264,7 +1265,7 @@ class CalcEngine { String s1; final List ranges = _splitArgsPreservingQuotedCommas(range); if (ranges.isEmpty || range == null || range == '') { - return formulaErrorStrings[_invalidArguments]; + return _formulaErrorStrings[_invalidArguments]; } for (final r in ranges) { // ignore: prefer_contains @@ -1328,7 +1329,7 @@ class CalcEngine { if (ranges.length == 1 && !range.startsWith(_tic) && (range == null || range == '')) { - return formulaErrorStrings[_wrongNumberArguments]; + return _formulaErrorStrings[_wrongNumberArguments]; } for (final r in ranges) { @@ -1392,7 +1393,7 @@ class CalcEngine { String s1; final List ranges = _splitArgsPreservingQuotedCommas(range); if (range == null || range == '') { - return formulaErrorStrings[_wrongNumberArguments]; + return _formulaErrorStrings[_wrongNumberArguments]; } for (final r in ranges) { @@ -1473,8 +1474,8 @@ class CalcEngine { } if (s1.isNotEmpty) { - if (s1 == (formulaErrorStrings[19])) { - return formulaErrorStrings[19]; + if (s1 == (_formulaErrorStrings[19])) { + return _formulaErrorStrings[19]; } d = double.tryParse(s1.replaceAll(_tic, '')); dt = DateTime.tryParse(s1.replaceAll(_tic, '')); @@ -1504,8 +1505,8 @@ class CalcEngine { } if (s1.isNotEmpty) { - if (s1 == (formulaErrorStrings[19])) { - return formulaErrorStrings[19]; + if (s1 == (_formulaErrorStrings[19])) { + return _formulaErrorStrings[19]; } d = double.tryParse(s1.replaceAll(_tic, '')); dt = DateTime.tryParse(s1.replaceAll(_tic, '')); @@ -1524,13 +1525,13 @@ class CalcEngine { /// Conditionally computes one of two alternatives depending upon a logical expression. String _computeIf(String args) { if (args == null || args == '') { - return formulaErrorStrings[_wrongNumberArguments]; + return _formulaErrorStrings[_wrongNumberArguments]; } String s1 = ''; ////parsed formula if (args.isNotEmpty && _indexOfAny(args, [parseArgumentSeparator, ':']) == -1) { - return formulaErrorStrings[_requires3Args]; + return _formulaErrorStrings[_requires3Args]; } else { final List s = _splitArgsPreservingQuotedCommas(args); if (s.length <= 3) { @@ -1613,7 +1614,7 @@ class CalcEngine { return e.toString(); } } else { - return formulaErrorStrings[_requires3Args]; + return _formulaErrorStrings[_requires3Args]; } } return s1; @@ -1621,7 +1622,7 @@ class CalcEngine { /// A Virtual method to compute the value based on the argument passed in. String _getValueFromArg(String arg) { - if (textIsEmpty(arg)) { + if (_textIsEmpty(arg)) { return ''; } double d; @@ -1641,7 +1642,7 @@ class CalcEngine { if (!arg.startsWith(_sheetToken.toString())) { arg = _putTokensForSheets(arg); } - String s1 = getValueFromParentObject(arg, true); + String s1 = _getValueFromParentObject(arg, true); if (arg != _trueValueStr && arg != _falseValueStr) { d = double.tryParse(s1.replaceAll(_tic, '')); if (!_getValueFromArgPreserveLeadingZeros && @@ -1694,7 +1695,7 @@ class CalcEngine { } /// A method that parses the text in a formula passed in. - String parseFormula(String formula) { + String _parseFormula(String formula) { try { if (formula.isNotEmpty && formula[0] == CalcEngine._formulaCharacter) { formula = formula.substring(1); @@ -1801,11 +1802,11 @@ class CalcEngine { String _parse(String text) { _exceptionThrown = false; - if (textIsEmpty(text)) { + if (_textIsEmpty(text)) { return text; } if (text.contains(_tic)) { - text = checkForStringTIC(text); + text = _checkForStringTIC(text); } if (_formulaChar.isNotEmpty && text.isNotEmpty && _formulaChar == text[0]) { @@ -1872,11 +1873,11 @@ class CalcEngine { while ((i = text.indexOf(')')) > -1) { final int k = text.substring(0, i).lastIndexOf('('); if (k == -1) { - throw Exception(formulaErrorStrings[_mismatchedParentheses]); + throw Exception(_formulaErrorStrings[_mismatchedParentheses]); } if (k == i - 1) { - throw Exception(formulaErrorStrings[_emptyExpression]); + throw Exception(_formulaErrorStrings[_emptyExpression]); } String s = ''; if (_ignoreBracet) { @@ -1892,7 +1893,7 @@ class CalcEngine { ////All parens should have been removed. // ignore: prefer_contains if (!_ignoreBracet && text.indexOf('(') > -1) { - throw Exception(formulaErrorStrings[_mismatchedParentheses]); + throw Exception(_formulaErrorStrings[_mismatchedParentheses]); } String retValue = _parseSimple(text); @@ -1920,7 +1921,7 @@ class CalcEngine { } if (leftParens == -1) { - throw Exception(formulaErrorStrings[_mismatchedParentheses]); + throw Exception(_formulaErrorStrings[_mismatchedParentheses]); } int i = leftParens - 1; @@ -2222,7 +2223,7 @@ class CalcEngine { if (!isNotOperator) { if (i < 1 && text[i] != '-') { throw Exception( - formulaErrorStrings[_operatorsCannotStartAnExpression]); + _formulaErrorStrings[_operatorsCannotStartAnExpression]); } ////Process left argument. @@ -2232,7 +2233,7 @@ class CalcEngine { ////String final int k = text.substring(0, j - 1).lastIndexOf(_tic); if (k < 0) { - throw Exception(formulaErrorStrings[_cannotParse]); + throw Exception(_formulaErrorStrings[_cannotParse]); } left = text.substring(k, k + j - k + 1); ////Keep the tics. @@ -2241,7 +2242,7 @@ class CalcEngine { ////Block of already parsed code. final int k = _findLastNonQB(text.substring(0, j - 1)); if (k < 0) { - throw Exception(formulaErrorStrings[_cannotParse]); + throw Exception(_formulaErrorStrings[_cannotParse]); } left = text.substring(k + 1, k + 1 + j - k - 1); @@ -2304,7 +2305,7 @@ class CalcEngine { ////Add error check for 2%. if (j > -1 && period && text[j] == parseDecimalSeparator) { throw Exception( - formulaErrorStrings[_numberContains2DecimalPoints]); + _formulaErrorStrings[_numberContains2DecimalPoints]); } j = j + 1; @@ -2391,7 +2392,7 @@ class CalcEngine { ////Process right argument. if (i == text.length - 1) { throw Exception( - formulaErrorStrings[_expressionCannotEndWithAnOperator]); + _formulaErrorStrings[_expressionCannotEndWithAnOperator]); } else { j = i + 1; @@ -2404,7 +2405,7 @@ class CalcEngine { ////String final int k = text.substring(j + 1).indexOf(_tic); if (k < 0) { - throw Exception(formulaErrorStrings[_cannotParse]); + throw Exception(_formulaErrorStrings[_cannotParse]); } right = text.substring(j, j + k + 2); @@ -2413,7 +2414,7 @@ class CalcEngine { ////Block of already parsed code. final int k = _findNonQB(text.substring(j + 1)); if (k < 0) { - throw Exception(formulaErrorStrings[_cannotParse]); + throw Exception(_formulaErrorStrings[_cannotParse]); } right = text.substring(j + 1, j + 1 + k); @@ -2440,7 +2441,7 @@ class CalcEngine { final int k = j + 1; if (k == text.length) { - throw Exception(formulaErrorStrings[_cannotParse]); + throw Exception(_formulaErrorStrings[_cannotParse]); } right = text.substring(j, j + k - j + 1); @@ -2552,7 +2553,7 @@ class CalcEngine { rightIndex = j + 1; } else { throw Exception( - formulaErrorStrings[_invalidCharactersFollowingAnOperator]); + _formulaErrorStrings[_invalidCharactersFollowingAnOperator]); } } @@ -2580,7 +2581,7 @@ class CalcEngine { if (text[j] == _bMarker) { final int k = _findLastNonQB(text.substring(0, j - 1)); if (k < 0) { - throw Exception(formulaErrorStrings[_cannotParse]); + throw Exception(_formulaErrorStrings[_cannotParse]); } } else if (text[j] == _rightBracket) { ////library member @@ -2597,11 +2598,11 @@ class CalcEngine { } if (k < 0) { - throw Exception(formulaErrorStrings[_badLibrary]); + throw Exception(_formulaErrorStrings[_badLibrary]); } } else if (!_isDigit(text.codeUnitAt(j))) { ////number - ////Throw new Exception(formulaErrorStrings[invalid_char_in_number]). + ////Throw new Exception(_formulaErrorStrings[invalid_char_in_number]). } else { bool period = false; bool percent = false; @@ -2620,7 +2621,8 @@ class CalcEngine { } if (j > -1 && period && text[j] == parseDecimalSeparator) { - throw Exception(formulaErrorStrings[_numberContains2DecimalPoints]); + throw Exception( + _formulaErrorStrings[_numberContains2DecimalPoints]); } } @@ -2633,7 +2635,7 @@ class CalcEngine { if (text[k] == _sheetToken) { if (k > 0 && !oneTokenFound) { if (_rethrowExceptions) { - throw Exception(formulaErrorStrings[_missingSheet]); + throw Exception(_formulaErrorStrings[_missingSheet]); } else { return [_errorStrings[2].toString(), needToContinue]; } @@ -2680,13 +2682,13 @@ class CalcEngine { /// Determines whether the arg is a valid cell name. bool _isCellReference(String args) { - if (textIsEmpty(args)) { + if (_textIsEmpty(args)) { return false; } args = _putTokensForSheets(args); final String _sheetTokenStr = _getSheetToken(args); bool containsBoth = false; - if (!textIsEmpty(_sheetTokenStr)) { + if (!_textIsEmpty(_sheetTokenStr)) { args = args.replaceAll(_sheetTokenStr, ''); } @@ -2727,7 +2729,7 @@ class CalcEngine { } /// Returns the value of specified cell in a _grid. - String getValueFromParentObject(String cell1, bool calculateFormula) { + String _getValueFromParentObject(String cell1, bool calculateFormula) { if (cell1 == _trueValueStr || cell1 == _falseValueStr) { return cell1; } @@ -2767,7 +2769,7 @@ class CalcEngine { if (calculateFormula) { val = _getValueComputeFormulaIfNecessary(row, col, _grid); } else { - final Object s = _grid.getValueRowCol(row, col); + final Object s = _grid._getValueRowCol(row, col); val = s != null ? s.toString() : ''; } @@ -2780,7 +2782,7 @@ class CalcEngine { try { bool alreadyComputed = false; FormulaInfo formula = _formulaInfoTable[_cell] as FormulaInfo; - final Object o = grd.getValueRowCol(row, col); + final Object o = grd._getValueRowCol(row, col); String val = (o != null && o.toString() != '') ? o.toString() : ''; ////null; //xx _grid[row, col]; @@ -2836,7 +2838,7 @@ class CalcEngine { bool compute = true; final bool isArray = _isArrayFormula; try { - formula._parsedFormula = parseFormula(val); + formula._parsedFormula = _parseFormula(val); } catch (e) { if (_inAPull) { val = e.toString(); @@ -2911,8 +2913,8 @@ class CalcEngine { } double _getSerialDateTimeFromDate(DateTime dt) { - double d = Range.toOADate(dt) - _dateTime1900Double; - d = 1 + Range.toOADate(dt) - _dateTime1900Double; + double d = Range._toOADate(dt) - _dateTime1900Double; + d = 1 + Range._toOADate(dt) - _dateTime1900Double; if (_treat1900AsLeapYear && d > 59) { d += 1; } @@ -2935,7 +2937,7 @@ class CalcEngine { final int c2 = _getColIndex(cells[last]); final int c = _getColIndex(_cell); if (c >= c1 && c <= c2) { - s = RangeInfo.getAlphaLabel(c) + r1.toString(); + s = RangeInfo._getAlphaLabel(c) + r1.toString(); } } return s; @@ -2980,7 +2982,7 @@ class CalcEngine { args = 'A' + args.substring(0, i) + ':' + - RangeInfo.getAlphaLabel(count) + + RangeInfo._getAlphaLabel(count) + args.substring(i + 1); i = args.indexOf(':'); } @@ -3053,7 +3055,8 @@ class CalcEngine { for (i = row1; i <= row2; ++i) { for (j = col1; j <= col2; ++j) { try { - cells[k++] = book + sheet + RangeInfo.getAlphaLabel(j) + i.toString(); + cells[k++] = + book + sheet + RangeInfo._getAlphaLabel(j) + i.toString(); } catch (e) { continue; } @@ -3160,7 +3163,7 @@ class CalcEngine { if (j < text.length - 2 && text[j + 1] == _tic[0]) { j = text.indexOf(_tic, j + 2); if (j == -1) { - throw Exception(formulaErrorStrings[_mismatchedTics]); + throw Exception(_formulaErrorStrings[_mismatchedTics]); } } @@ -3174,7 +3177,7 @@ class CalcEngine { i = text.indexOf(_tic, i); } } else { - throw Exception(formulaErrorStrings[_mismatchedTics]); + throw Exception(_formulaErrorStrings[_mismatchedTics]); } } } @@ -3306,7 +3309,7 @@ class CalcEngine { } /// Tests whether a String is NULL or empty. - static bool textIsEmpty(String s) { + static bool _textIsEmpty(String s) { return s == null || s == ''; } @@ -3327,7 +3330,7 @@ class CalcEngine { } /// This method check '\'in the String and removes if the String contains '\'\. - String checkForStringTIC(String text) { + String _checkForStringTIC(String text) { int i = 0; bool stringTIC = false; final String doubleTIC = _tic + _tic; @@ -3339,7 +3342,7 @@ class CalcEngine { //Below condition checks whether the parsed text conatins TIC after the double TIC(eg.\"new \"\" name\"). j = text.indexOf(_tic, j + 2); if (j == -1) { - throw Exception(formulaErrorStrings[_mismatchedTics]); + throw Exception(_formulaErrorStrings[_mismatchedTics]); } } //Below condition is avoid to remove "\"\ while it placed inside of the String value(eg., \"

\"\"Req\"\"

\"). @@ -3347,7 +3350,7 @@ class CalcEngine { stringTIC = true; j = text.indexOf(_tic, j + 2); if (j == -1) { - throw Exception(formulaErrorStrings[_mismatchedTics]); + throw Exception(_formulaErrorStrings[_mismatchedTics]); } } String s = text.substring(i, i + j - i + 1); diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/formula_info.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/formula_info.dart index 778f45f0..94c93c4c 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/formula_info.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/formula_info.dart @@ -12,7 +12,7 @@ class FormulaInfo { /// that may be referenced by other formulas. class RangeInfo { /// GetAlphaLabel is a method that retrieves a String value for the column whose numerical index is passed in. - static String getAlphaLabel(int col) { + static String _getAlphaLabel(int col) { final List cols = List(10); int n = 0; while (col > 0 && n < 9) { diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/stack.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/stack.dart index 5ceef4ec..32889a60 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/stack.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/calculate/stack.dart @@ -5,7 +5,7 @@ class Stack { final Queue _queue = Queue(); /// Represent the count. - int get count { + int get _count { return _queue.length; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/border.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/border.dart index c882d003..76419852 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/border.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/border.dart @@ -26,7 +26,7 @@ class CellBorder implements Border { String color = '#000000'; /// Clone method of Cell Border. - CellBorder clone() { + CellBorder _clone() { final CellBorder cellBorder = CellBorder(lineStyle, color); return cellBorder; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/borders.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/borders.dart index 35286179..df51124c 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/borders.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/borders.dart @@ -18,14 +18,14 @@ class Borders { Border all; /// Represent the workbook. - Workbook workbook; + Workbook _workbook; } /// Represents cell borders class BordersCollection implements Borders { /// Creates an new instances of borders. BordersCollection(Workbook book) { - workbook = book; + _workbook = book; left = CellBorder(LineStyle.none, '#000000'); right = CellBorder(LineStyle.none, '#000000'); top = CellBorder(LineStyle.none, '#000000'); @@ -50,7 +50,7 @@ class BordersCollection implements Borders { /// Represent the workbook. @override - Workbook workbook; + Workbook _workbook; /// Represent the left border. @override @@ -118,13 +118,13 @@ class BordersCollection implements Borders { } /// Clone method of BordersCollecton. - BordersCollection clone() { - final BordersCollection bordersCollection = BordersCollection(workbook); - bordersCollection.all = all.clone(); - bordersCollection.left = left.clone(); - bordersCollection.right = right.clone(); - bordersCollection.top = top.clone(); - bordersCollection.bottom = bottom.clone(); + BordersCollection _clone() { + final BordersCollection bordersCollection = BordersCollection(_workbook); + bordersCollection.all = all._clone(); + bordersCollection.left = left._clone(); + bordersCollection.right = right._clone(); + bordersCollection.top = top._clone(); + bordersCollection.bottom = bottom._clone(); return bordersCollection; } @@ -149,7 +149,7 @@ class BordersCollection implements Borders { int get hashCode => hashValues(all, left, right, top, bottom); /// Crear all the borders. - void clear() { + void _clear() { if (_all != null) { _all = null; } @@ -177,7 +177,7 @@ class BordersCollectionWrapper implements Borders { /// Creates an new instances of borders. BordersCollectionWrapper(List arrRanges, Workbook book) { _arrRanges = arrRanges; - workbook = book; + _workbook = book; _bordersCollection = []; for (final Range range in _arrRanges) { _bordersCollection.add(range.cellStyle.borders); @@ -201,7 +201,7 @@ class BordersCollectionWrapper implements Borders { /// Represent the workbook. @override - Workbook workbook; + Workbook _workbook; List _arrRanges; List _bordersCollection; @@ -317,11 +317,12 @@ class BordersCollectionWrapper implements Borders { } /// Clear the borders. - void clear() { + // ignore: unused_element + void _clear() { final int last = _arrRanges.length; for (int index = 0; index < last; index++) { final Range range = _arrRanges[index]; - (range.cellStyle.borders as BordersCollection).clear(); + (range.cellStyle.borders as BordersCollection)._clear(); } } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style.dart index 07154125..5cc26783 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style.dart @@ -122,11 +122,13 @@ class CellStyle implements Style { } /// Gets number format object. - FormatImpl get numberFormatObject { + _Format get numberFormatObject { //MS Excel sets 14th index by default if the index is out of range for any the datatype. //So, using the same here in XlsIO. if (_book.innerFormats.count > 14 && - !_book.innerFormats.contains(numberFormatIndex)) numberFormatIndex = 14; + !_book.innerFormats._contains(numberFormatIndex)) { + numberFormatIndex = 14; + } return _book.innerFormats[numberFormatIndex]; } @@ -134,24 +136,24 @@ class CellStyle implements Style { /// Returns or sets the format code for the object. Read/write String. String get numberFormat { - return numberFormatObject.formatString; + return numberFormatObject._formatString; } @override /// Sets the number format. set numberFormat(String value) { - numberFormatIndex = _book.innerFormats.findOrCreateFormat(value); + numberFormatIndex = _book.innerFormats._findOrCreateFormat(value); } /// Represents the wookbook - Workbook get workbook { + Workbook get _workbook { return _book; } /// clone method of cell style - CellStyle clone() { - final CellStyle _cellStyle = CellStyle(workbook); + CellStyle _clone() { + final CellStyle _cellStyle = CellStyle(_workbook); _cellStyle.name = name; _cellStyle.backColor = backColor; _cellStyle.fontName = fontName; @@ -170,7 +172,7 @@ class CellStyle implements Style { _cellStyle.numberFormat = numberFormat; _cellStyle.numberFormatIndex = numberFormatIndex; _cellStyle.isGlobalStyle = isGlobalStyle; - _cellStyle.borders = borders.clone(); + _cellStyle.borders = borders._clone(); return _cellStyle; } @@ -220,9 +222,9 @@ class CellStyle implements Style { borders); /// clear the borders - void clear() { + void _clear() { if (_borders != null) { - (_borders as BordersCollection).clear(); + (_borders as BordersCollection)._clear(); _borders = null; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style_xfs.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style_xfs.dart index b0d08cf0..4e60982a 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style_xfs.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_style_xfs.dart @@ -3,17 +3,17 @@ part of xlsio; /// Represents cell style xfs. class CellStyleXfs { /// Represents number format id. - int numberFormatId; + int _numberFormatId; /// Represents font id. - int fontId; + int _fontId; /// Represents fill id. - int fillId; + int _fillId; /// Represents border id. - int borderId; + int _borderId; /// Represents alignment. - Alignment alignment; + Alignment _alignment; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_xfs.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_xfs.dart index 23895b32..04e65468 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_xfs.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/cell_xfs.dart @@ -3,5 +3,5 @@ part of xlsio; /// Represents cell xfs. class CellXfs extends CellStyleXfs { /// Represents xf id. - int xfId; + int _xfId; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/extend_compare_style.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/extend_compare_style.dart index 1863951f..256e8049 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/extend_compare_style.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/extend_compare_style.dart @@ -2,32 +2,10 @@ part of xlsio; /// Represents the extend compare style. -class ExtendCompareStyle { +class _ExtendCompareStyle { /// Represents the index of cell style. int _index; /// Represents the result of the compare style. bool _result; - - /// Represents the index of cell style. - int get index { - { - return _index; - } - } - - set index(int value) { - _index = value; - } - - /// Represents the result of the compare style. - bool get result { - { - return _result; - } - } - - set result(bool value) { - _result = value; - } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/global_style.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/global_style.dart index c1cc40d1..6f5b26cb 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/global_style.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/global_style.dart @@ -1,23 +1,24 @@ part of xlsio; /// Represents cell styles. -class GlobalStyle { +class _GlobalStyle { /// Creates an new instances of the cell styles. - GlobalStyle() { - name = 'Normal'; - xfId = 0; - builtinId = 0; + _GlobalStyle() { + _name = 'Normal'; + _xfId = 0; + _builtinId = 0; } /// Represents cell style name. - String name; + String _name; /// Represents xf id. - int xfId; + int _xfId; /// Number format. - String numberFormat; + // ignore: unused_field + String _numberFormat; /// build in id. - int builtinId; + int _builtinId; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/styles_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/styles_collection.dart index e3330c11..27d6b8e4 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/styles_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/cell_styles/styles_collection.dart @@ -34,7 +34,7 @@ class StylesCollection { } /// Default styles names. - List defaultStyleNames = [ + final List _defaultStyleNames = [ 'normal', 'rowLevel_', 'colLevel_', @@ -112,17 +112,17 @@ class StylesCollection { } if (_dictStyles.containsKey(styleName) && - !workbook.styles.defaultStyleNames.contains(styleName)) { + !workbook.styles._defaultStyleNames.contains(styleName)) { throw Exception('Name of style must be unique.'); } final Style style = CellStyle(_book, styleName); (style as CellStyle).isGlobalStyle = true; int index = 0; - if (workbook.styles.defaultStyleNames.contains(style.name)) { - initializeStyleCollections(style.name, style); + if (workbook.styles._defaultStyleNames.contains(style.name)) { + _initializeStyleCollections(style.name, style); (style as CellStyle)._builtinId = - workbook.styles.defaultStyleNames.indexOf(style.name); + workbook.styles._defaultStyleNames.indexOf(style.name); } index = workbook.styles._styles.length; style.index = index; @@ -155,7 +155,7 @@ class StylesCollection { } /// Intialize the style collections. - void initializeStyleCollections(String styleName, CellStyle style) { + void _initializeStyleCollections(String styleName, CellStyle style) { switch (styleName) { case 'bad': style.backColor = '#FFC7CE'; @@ -410,10 +410,10 @@ class StylesCollection { } /// clear the cell style. - void clear() { + void _clear() { if (_styles != null) { for (final CellStyle style in _styles) { - style.clear(); + style._clear(); } _styles.clear(); } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format.dart index 0418988a..dec3aca4 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format.dart @@ -1,54 +1,54 @@ part of xlsio; /// Represents the format Impl class. -class FormatImpl { +class _Format { /// Initializes new instance of the format. - FormatImpl(FormatsCollection parent, [int index, String strFormat]) { + _Format(FormatsCollection parent, [int index, String strFormat]) { _parent = parent; - this.index = index; - formatString = strFormat; + _index = index; + _formatString = strFormat; } FormatsCollection _parent; /// Format index used in other records. - int index = 0; + int _index = 0; /// Format string. - String formatString; + String _formatString; /// Parsed format. - FormatSectionCollection _parsedFormat; + _FormatSectionCollection _parsedFormat; /// Reference to the format parser. - final _parser = FormatParserImpl(); + final _parser = _FormatParser(); /// Returns format type for a specified value. - ExcelFormatType getFormatTypeFromDouble(double value) { - prepareFormat(); + ExcelFormatType _getFormatTypeFromDouble(double value) { + _prepareFormat(); return _parsedFormat._getFormatTypeFromDouble(value); } /// Checks whether format is already parsed, if it isn't than parses it. - void prepareFormat() { + void _prepareFormat() { if (_parsedFormat != null) return; - final formatString = this.formatString; - _parsedFormat = _parser.parse(_parent.parent, formatString); + final formatString = _formatString; + _parsedFormat = _parser._parse(_parent.parent, formatString); } /// Applies format to the value. - String applyFormat(double value, bool bShowHiddenSymbols, [Range cell]) { - prepareFormat(); + String _applyFormat(double value, bool bShowHiddenSymbols, [Range cell]) { + _prepareFormat(); return _parsedFormat._applyFormat(value, bShowHiddenSymbols, cell); } /// clear the format. - void clear() { + void _clear() { _parser._clear(); if (_parsedFormat != null) { _parsedFormat._dispose(); - _parsedFormat.innerList.clear(); + _parsedFormat._innerList.clear(); } _parsedFormat = null; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_parser.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_parser.dart index dd5259a2..d154edb5 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_parser.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_parser.dart @@ -3,11 +3,11 @@ part of xlsio; /// /// Class used for format parsing. /// -class FormatParserImpl { +class _FormatParser { /// /// List with all known format tokens. /// - List _arrFormatTokens = []; + List<_FormatTokenBase> _arrFormatTokens = []; /// /// Regular expression for checking if specified switch argument present in numberformat. @@ -18,26 +18,27 @@ class FormatParserImpl { /// Initializes a new instance of the FormatParserImpl class. /// // ignore: sort_constructors_first - FormatParserImpl() { - _arrFormatTokens.add(CharacterToken()); - _arrFormatTokens.add(YearToken()); - _arrFormatTokens.add(MonthToken()); - _arrFormatTokens.add(DayToken()); - _arrFormatTokens.add(HourToken()); - _arrFormatTokens.add(Hour24Token()); - _arrFormatTokens.add(MinuteToken()); - _arrFormatTokens.add(SecondToken()); - _arrFormatTokens.add(AmPmToken()); - _arrFormatTokens.add(SignificantDigitToken()); - _arrFormatTokens.add(DecimalPointToken()); - _arrFormatTokens.add(FractionToken()); - _arrFormatTokens.add(UnknownToken()); + _FormatParser() { + _arrFormatTokens.add(_CharacterToken()); + _arrFormatTokens.add(_YearToken()); + _arrFormatTokens.add(_MonthToken()); + _arrFormatTokens.add(_DayToken()); + _arrFormatTokens.add(_HourToken()); + _arrFormatTokens.add(_Hour24Token()); + _arrFormatTokens.add(_MinuteToken()); + _arrFormatTokens.add(_SecondToken()); + _arrFormatTokens.add(_AmPmToken()); + _arrFormatTokens.add(_SignificantDigitToken()); + _arrFormatTokens.add(_DecimalPointToken()); + _arrFormatTokens.add(_FractionToken()); + _arrFormatTokens.add(_UnknownToken()); } /// /// Parses format string. /// - FormatSectionCollection parse(Workbook workbook, String strFormat) { + // ignore: unused_element + _FormatSectionCollection _parse(Workbook workbook, String strFormat) { if (strFormat == null) throw ('strFormat - string cannot be null'); strFormat = _numberFormatRegex.hasMatch(strFormat) ? strFormat.replaceAll(RegExp(r'strFormat'), '') @@ -46,14 +47,14 @@ class FormatParserImpl { if (iFormatLength == 0) throw ('strFormat - string cannot be empty'); - final List arrParsedExpression = []; + final List<_FormatTokenBase> arrParsedExpression = []; int iPos = 0; while (iPos < iFormatLength) { final len = _arrFormatTokens.length; for (int i = 0; i < len; i++) { - final FormatTokenBase token = _arrFormatTokens[i]; - final int iNewPos = token.tryParse(strFormat, iPos); + final _FormatTokenBase token = _arrFormatTokens[i]; + final int iNewPos = token._tryParse(strFormat, iPos); if (iNewPos > iPos) { // token = ( FormatTokenBase )token.Clone(); @@ -63,7 +64,7 @@ class FormatParserImpl { } } } - return FormatSectionCollection(workbook, arrParsedExpression); + return _FormatSectionCollection(workbook, arrParsedExpression); } void _clear() { diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section.dart index df2807f3..37eba41f 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section.dart @@ -1,108 +1,108 @@ part of xlsio; /// Class used for Format Section. -class FormatSection { +class _FormatSection { /// Table for token type detection. Value in TokenType arrays must be sorted. final _defultPossibleTokens = [ [ - TokenType.unknown, - TokenType.string, - TokenType.reservedPlace, - TokenType.character, - TokenType.color + _TokenType.unknown, + _TokenType.string, + _TokenType.reservedPlace, + _TokenType.character, + _TokenType.color ], ExcelFormatType.unknown, - [TokenType.general, TokenType.culture], + [_TokenType.general, _TokenType.culture], ExcelFormatType.general, [ - TokenType.unknown, - TokenType.string, - TokenType.reservedPlace, - TokenType.character, - TokenType.color, - TokenType.condition, - TokenType.text, - TokenType.asterix, - TokenType.culture, + _TokenType.unknown, + _TokenType.string, + _TokenType.reservedPlace, + _TokenType.character, + _TokenType.color, + _TokenType.condition, + _TokenType.text, + _TokenType.asterix, + _TokenType.culture, ], ExcelFormatType.text, [ - TokenType.unknown, - TokenType.string, - TokenType.reservedPlace, - TokenType.character, - TokenType.color, - TokenType.condition, - TokenType.significantDigit, - TokenType.insignificantDigit, - TokenType.placeReservedDigit, - TokenType.percent, - TokenType.scientific, - TokenType.thousandsSeparator, - TokenType.decimalPoint, - TokenType.asterix, - TokenType.fraction, - TokenType.culture, - TokenType.dollar, + _TokenType.unknown, + _TokenType.string, + _TokenType.reservedPlace, + _TokenType.character, + _TokenType.color, + _TokenType.condition, + _TokenType.significantDigit, + _TokenType.insignificantDigit, + _TokenType.placeReservedDigit, + _TokenType.percent, + _TokenType.scientific, + _TokenType.thousandsSeparator, + _TokenType.decimalPoint, + _TokenType.asterix, + _TokenType.fraction, + _TokenType.culture, + _TokenType.dollar, ], ExcelFormatType.number, [ - TokenType.unknown, - TokenType.day, - TokenType.string, - TokenType.reservedPlace, - TokenType.character, - TokenType.color, - TokenType.condition, - TokenType.significantDigit, - TokenType.insignificantDigit, - TokenType.placeReservedDigit, - TokenType.percent, - TokenType.scientific, - TokenType.thousandsSeparator, - TokenType.decimalPoint, - TokenType.asterix, - TokenType.fraction, - TokenType.culture, - TokenType.dollar, + _TokenType.unknown, + _TokenType.day, + _TokenType.string, + _TokenType.reservedPlace, + _TokenType.character, + _TokenType.color, + _TokenType.condition, + _TokenType.significantDigit, + _TokenType.insignificantDigit, + _TokenType.placeReservedDigit, + _TokenType.percent, + _TokenType.scientific, + _TokenType.thousandsSeparator, + _TokenType.decimalPoint, + _TokenType.asterix, + _TokenType.fraction, + _TokenType.culture, + _TokenType.dollar, ], ExcelFormatType.number, [ - TokenType.unknown, - TokenType.hour, - TokenType.hour24, - TokenType.minute, - TokenType.minuteTotal, - TokenType.second, - TokenType.secondTotal, - TokenType.year, - TokenType.month, - TokenType.day, - TokenType.string, - TokenType.reservedPlace, - TokenType.character, - TokenType.amPm, - TokenType.color, - TokenType.condition, - TokenType.significantDigit, - TokenType.decimalPoint, - TokenType.asterix, - TokenType.fraction, - TokenType.culture, + _TokenType.unknown, + _TokenType.hour, + _TokenType.hour24, + _TokenType.minute, + _TokenType.minuteTotal, + _TokenType.second, + _TokenType.secondTotal, + _TokenType.year, + _TokenType.month, + _TokenType.day, + _TokenType.string, + _TokenType.reservedPlace, + _TokenType.character, + _TokenType.amPm, + _TokenType.color, + _TokenType.condition, + _TokenType.significantDigit, + _TokenType.decimalPoint, + _TokenType.asterix, + _TokenType.fraction, + _TokenType.culture, ], ExcelFormatType.dateTime ]; /// Break tokens when locating hour token. - final _defultBreakHour = [TokenType.minute]; + final _defultBreakHour = [_TokenType.minute]; /// Break tokens when locating second token. final _defultBreakSecond = [ - TokenType.minute, - TokenType.hour, - TokenType.day, - TokenType.month, - TokenType.year, + _TokenType.minute, + _TokenType.hour, + _TokenType.day, + _TokenType.month, + _TokenType.year, ]; /// Return this value when element wasn't found. @@ -110,14 +110,14 @@ class FormatSection { /// Possible digit tokens in the millisecond token. final _defultMilliSecondTokens = [ - TokenType.significantDigit, + _TokenType.significantDigit, ]; /// Maximum month token length. final _defultMonthTokenLength = 5; /// Array of tokens. - List _arrTokens; + List<_FormatTokenBase> _arrTokens; /// Indicates whether format is prepared. bool _bFormatPrepared = false; @@ -153,7 +153,7 @@ class FormatSection { Workbook _workbook; /// Gets the number of tokens in the section. - int get count { + int get _count { return _arrTokens.length; } @@ -168,8 +168,8 @@ class FormatSection { /// Initializes a new instance of the FormatSection class based on array of tokens. // ignore: sort_constructors_first - FormatSection( - Workbook workbook, var parent, List arrTokens) { + _FormatSection( + Workbook workbook, var parent, List<_FormatTokenBase> arrTokens) { if (arrTokens == null) throw Exception('arrTokens'); _workbook = workbook; _arrTokens = arrTokens; @@ -188,7 +188,7 @@ class FormatSection { _bFraction = false; } - _iIntegerEnd = count - 1; + _iIntegerEnd = _count - 1; _bFormatPrepared = true; } @@ -197,21 +197,21 @@ class FormatSection { bool bDigit = false; _bMultiplePoints = false; - final int len = count; + final int len = _count; for (int i = 0; i < len; i++) { - final FormatTokenBase token = _arrTokens[i]; + final _FormatTokenBase token = _arrTokens[i]; - switch (token.tokenType) { - case TokenType.amPm: - final HourToken hour = _findCorrespondingHourSection(i); - if (hour != null) hour.isAmPm = true; + switch (token._tokenType) { + case _TokenType.amPm: + final _HourToken hour = _findCorrespondingHourSection(i); + if (hour != null) hour._isAmPm = true; break; - case TokenType.minute: + case _TokenType.minute: _checkMinuteToken(i); break; - case TokenType.decimalPoint: + case _TokenType.decimalPoint: if (_iDecimalPointPos < 0) { _iDecimalPointPos = _assignPosition(_iDecimalPointPos, i); } else { @@ -219,19 +219,19 @@ class FormatSection { } break; - case TokenType.scientific: + case _TokenType.scientific: _iScientificPos = _assignPosition(_iScientificPos, i); break; - case TokenType.significantDigit: - case TokenType.insignificantDigit: - case TokenType.placeReservedDigit: + case _TokenType.significantDigit: + case _TokenType.insignificantDigit: + case _TokenType.placeReservedDigit: if (!bDigit) { bDigit = true; } break; - case TokenType.fraction: + case _TokenType.fraction: if (_iFractionPos < 0) { _iFractionPos = i; _bFraction = true; @@ -246,16 +246,16 @@ class FormatSection { } /// Searches for corresponding hour token. - HourToken _findCorrespondingHourSection(int index) { + _HourToken _findCorrespondingHourSection(int index) { int i = index; do { i--; - if (i < 0) i += count; + if (i < 0) i += _count; - final FormatTokenBase token = _arrTokens[i]; + final _FormatTokenBase token = _arrTokens[i]; - if (token.tokenType == TokenType.hour) { + if (token._tokenType == _TokenType.hour) { return token; } } while (i != index); @@ -264,7 +264,7 @@ class FormatSection { } /// Applies format to the value. - String applyFormat(double value, bool bShowReservedSymbols, [Range cell]) { + String _applyFormat(double value, bool bShowReservedSymbols, [Range cell]) { _prepareFormat(); value = _prepareValue(value, bShowReservedSymbols); @@ -280,7 +280,7 @@ class FormatSection { strResult = _applyFormatNumber(value, bShowReservedSymbols, 0, _iIntegerEnd, false, _bGroupDigits, bAddNegative); - strResult = Worksheet.convertSecondsMinutesToHours(strResult, value); + strResult = Worksheet._convertSecondsMinutesToHours(strResult, value); if (_bFraction) { dFractionValue = value; @@ -314,24 +314,24 @@ class FormatSection { final double originalValue = value; for (int i = iStart; _checkCondition(iEnd, bForward, i); i += iDelta) { - final FormatTokenBase token = _arrTokens[i]; + final _FormatTokenBase token = _arrTokens[i]; final double tempValue = originalValue; String strTokenResult = - token.applyFormat(tempValue, bShowReservedSymbols, culture, this); + token._applyFormat(tempValue, bShowReservedSymbols, culture, this); //If the Month token length is 5 , Ms Excel consider as 1. - if (token is MonthToken && - token.format.length == _defultMonthTokenLength) { + if (token is _MonthToken && + token._format.length == _defultMonthTokenLength) { strTokenResult = strTokenResult.substring(0, 1); } - if (token is MilliSecondToken) { + if (token is _MilliSecondToken) { final int milliSecond = int.parse(strTokenResult.substring(1)); - if (token.format == '0' && milliSecond >= 5) { + if (token._format == '0' && milliSecond >= 5) { _isMilliSecondFormatValue = true; - } else if (token.format == '00' && milliSecond >= 50) { + } else if (token._format == '00' && milliSecond >= 50) { _isMilliSecondFormatValue = true; - } else if (token.format == '000' && milliSecond >= 500) { + } else if (token._format == '000' && milliSecond >= 500) { _isMilliSecondFormatValue = true; } } @@ -353,11 +353,11 @@ class FormatSection { /// Prepares value for format application. double _prepareValue(double value, bool bShowReservedSymbols) { - final int len = count; + final int len = _count; for (int i = 0; i < len; i++) { - final FormatTokenBase token = _arrTokens[i]; + final _FormatTokenBase token = _arrTokens[i]; - if (token.tokenType == TokenType.percent) { + if (token._tokenType == _TokenType.percent) { value *= 100; } } @@ -370,7 +370,7 @@ class FormatSection { final int len = _defultPossibleTokens.length; for (int i = 0; i < len; i += 2) { - final List arrPossibleTokens = _defultPossibleTokens[i]; + final List<_TokenType> arrPossibleTokens = _defultPossibleTokens[i]; final ExcelFormatType formatType = (_defultPossibleTokens[i + 1]) as ExcelFormatType; @@ -386,19 +386,19 @@ class FormatSection { } /// Checks whether section contains only specified token types. - bool _checkTokenTypes(List arrPossibleTokens) { + bool _checkTokenTypes(List<_TokenType> arrPossibleTokens) { if (arrPossibleTokens == null) { throw ("arrPossibleTokens - value can't be null"); } - final int iCount = count; + final int iCount = _count; if (iCount == 0 && arrPossibleTokens.isEmpty) return true; final int len = iCount; for (int i = 0; i < len; i++) { - final FormatTokenBase token = _arrTokens[i]; + final _FormatTokenBase token = _arrTokens[i]; - if (!_containsIn(arrPossibleTokens, token.tokenType)) return false; + if (!_containsIn(arrPossibleTokens, token._tokenType)) return false; } return true; @@ -409,33 +409,33 @@ class FormatSection { // Here we should check whether this token is really minute token // or it is month token. It can be minute token if it has hour // section before it or second section after it. - final FormatTokenBase token = _arrTokens[iTokenIndex]; + final _FormatTokenBase token = _arrTokens[iTokenIndex]; - if (token.tokenType != TokenType.minute) throw ('Wrong token type.'); + if (token._tokenType != _TokenType.minute) throw ('Wrong token type.'); final bool bMinute = (_findTimeToken(iTokenIndex - 1, _defultBreakHour, - false, [TokenType.hour, TokenType.hour24]) != + false, [_TokenType.hour, _TokenType.hour24]) != -1) || (_findTimeToken(iTokenIndex + 1, _defultBreakSecond, true, - [TokenType.second, TokenType.secondTotal]) != + [_TokenType.second, _TokenType.secondTotal]) != -1); if (!bMinute) { - final MonthToken month = MonthToken(); - month.format = token.format; + final _MonthToken month = _MonthToken(); + month._format = token._format; _arrTokens[iTokenIndex] = month; } } /// Searches for required time token. - int _findTimeToken(int iTokenIndex, List arrBreakTypes, - bool bForward, List arrTypes) { - final int iCount = count; + int _findTimeToken(int iTokenIndex, List<_TokenType> arrBreakTypes, + bool bForward, List<_TokenType> arrTypes) { + final int iCount = _count; final int iDelta = bForward ? 1 : -1; while (iTokenIndex >= 0 && iTokenIndex < iCount) { - final FormatTokenBase token = _arrTokens[iTokenIndex]; - final TokenType tokenType = token.tokenType; + final _FormatTokenBase token = _arrTokens[iTokenIndex]; + final _TokenType tokenType = token._tokenType; // ignore: prefer_contains if (arrBreakTypes.indexOf(tokenType) != -1) break; @@ -453,26 +453,27 @@ class FormatSection { void _setRoundSeconds() { bool bRound = true; - int iCount = count; + int iCount = _count; for (int i = 0; i < iCount; i++) { - final FormatTokenBase token = _arrTokens[i]; + final _FormatTokenBase token = _arrTokens[i]; - if (token.tokenType == TokenType.decimalPoint) { + if (token._tokenType == _TokenType.decimalPoint) { final int iStartIndex = i; String strFormat = ''; i++; while (i < iCount && // ignore: prefer_contains - (_defultMilliSecondTokens.indexOf(_arrTokens[i].tokenType) != -1)) { - strFormat += _arrTokens[i].format; + (_defultMilliSecondTokens.indexOf(_arrTokens[i]._tokenType) != + -1)) { + strFormat += _arrTokens[i]._format; i++; } if (i != iStartIndex + 1) { - final MilliSecondToken milli = MilliSecondToken(); - milli.format = strFormat; + final _MilliSecondToken milli = _MilliSecondToken(); + milli._format = strFormat; final int iRemoveCount = i - iStartIndex; _arrTokens.removeRange(iStartIndex, iStartIndex + iRemoveCount); _arrTokens.insert(iStartIndex, milli); @@ -485,16 +486,16 @@ class FormatSection { if (bRound) return; for (int i = 0; i < iCount; i++) { - final FormatTokenBase token = _arrTokens[i]; + final _FormatTokenBase token = _arrTokens[i]; - if (token.tokenType == TokenType.second) { - (token as SecondToken).roundValue = false; + if (token._tokenType == _TokenType.second) { + (token as _SecondToken)._roundValue = false; } } } /// Indicates whether type of specified token is in the array of tokens. - bool _containsIn(List arrPossibleTokens, TokenType token) { + bool _containsIn(List<_TokenType> arrPossibleTokens, _TokenType token) { if (arrPossibleTokens == null) { throw ("arrPossibleTokens - Value can't be null"); } @@ -503,15 +504,15 @@ class FormatSection { while (iLastIndex != iFirstIndex) { final double iMiddleIndex = (iLastIndex + iFirstIndex) / 2; - final TokenType curToken = arrPossibleTokens[iMiddleIndex.floor()]; + final _TokenType curToken = arrPossibleTokens[iMiddleIndex.floor()]; - if (TokenType.values.indexOf(curToken) >= - TokenType.values.indexOf(token)) { + if (_TokenType.values.indexOf(curToken) >= + _TokenType.values.indexOf(token)) { if (iLastIndex == iMiddleIndex.floor()) break; iLastIndex = iMiddleIndex.floor(); - } else if (TokenType.values.indexOf(curToken) < - TokenType.values.indexOf(token)) { + } else if (_TokenType.values.indexOf(curToken) < + _TokenType.values.indexOf(token)) { if (iFirstIndex == iMiddleIndex.floor()) break; iFirstIndex = iMiddleIndex.floor(); diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section_collection.dart index ff9f4cd1..1b3214ea 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_section_collection.dart @@ -1,7 +1,7 @@ part of xlsio; /// Class used for Section Collection. -class FormatSectionCollection { +class _FormatSectionCollection { /// Index of section with positive number format. static const int _defaultPostiveSection = 0; @@ -15,15 +15,15 @@ class FormatSectionCollection { static const int _defaultTextSection = 3; /// Represent the inner collection of format section. - List innerList; + List<_FormatSection> _innerList; // Indexer of the class // ignore: public_member_api_docs - FormatSection operator [](index) => innerList[index]; + _FormatSection operator [](index) => _innerList[index]; // Returns the count of pivot reference collection. int get _count { - return innerList.length; + return _innerList.length; } /// Indicates whether format contains conditions. @@ -34,16 +34,16 @@ class FormatSectionCollection { /// Initializes a new instance of the FormatSectionCollection class. // ignore: sort_constructors_first - FormatSectionCollection(Workbook workbook, - [List arrTokens]) { + _FormatSectionCollection(Workbook workbook, + [List<_FormatTokenBase> arrTokens]) { _workbook = workbook; - innerList = []; + _innerList = []; if (arrTokens != null) _parse(arrTokens); } /// Returns format type for a specified value. ExcelFormatType _getFormatTypeFromDouble(double value) { - final FormatSection section = _getSection(value); + final _FormatSection section = _getSection(value); if (section == null) { throw FormatException("Can't find required format section."); @@ -53,52 +53,52 @@ class FormatSectionCollection { } /// Splits array of tokens by SectionSeparator. - void _parse(List arrTokens) { + void _parse(List<_FormatTokenBase> arrTokens) { if (arrTokens == null) throw Exception('arrTokens should not be null'); - List arrCurrentSection = []; + List<_FormatTokenBase> arrCurrentSection = []; final int len = arrTokens.length; for (int i = 0; i < len; i++) { - final FormatTokenBase token = arrTokens[i]; + final _FormatTokenBase token = arrTokens[i]; - if (token.tokenType == TokenType.section) { - innerList.add(FormatSection(_workbook, this, arrCurrentSection)); + if (token._tokenType == _TokenType.section) { + _innerList.add(_FormatSection(_workbook, this, arrCurrentSection)); arrCurrentSection = []; } else { arrCurrentSection.add(token); } } - innerList.add(FormatSection(_workbook, this, arrCurrentSection)); + _innerList.add(_FormatSection(_workbook, this, arrCurrentSection)); } /// Applies format to the value. String _applyFormat(double value, bool bShowReservedSymbols, [Range cell]) { - final FormatSection section = _getSection(value); + final _FormatSection section = _getSection(value); if (section != null) { if (!_bConditionalFormat && value < 0 && _count > 1) value = -value; if ((section.formatType == ExcelFormatType.text) && - innerList.length == _defaultTextSection) { + _innerList.length == _defaultTextSection) { if (value == 0.0) { return ''; } } - return section.applyFormat(value, bShowReservedSymbols, cell); + return section._applyFormat(value, bShowReservedSymbols, cell); } throw FormatException("Can't locate correct section."); } /// Returns section for formatting with specified index. - FormatSection _getSectionFromIndex(int iSectionIndex) { + _FormatSection _getSectionFromIndex(int iSectionIndex) { return this[iSectionIndex % _count]; } /// Returns section that corresponds to the specified value. - FormatSection _getSection(double value) { - FormatSection result; + _FormatSection _getSection(double value) { + _FormatSection result; if (value > 0) { result = _getSectionFromIndex(_defaultPostiveSection); @@ -112,15 +112,15 @@ class FormatSectionCollection { } /// Searches for section that should be used for zero number formatting. - FormatSection _getZeroSection() { + _FormatSection _getZeroSection() { if (_bConditionalFormat) { throw Exception( 'This method is not supported for number formats with conditions.'); } - final int iSectionsCount = innerList.length; + final int iSectionsCount = _innerList.length; final int iLastSection = iSectionsCount - 1; - FormatSection result; + _FormatSection result; if (iLastSection < _defaultZeroSection) { result = this[_defaultPostiveSection]; @@ -131,11 +131,11 @@ class FormatSectionCollection { } void _dispose() { - final int count = innerList.length; + final int count = _innerList.length; for (int i = 0; i < count; i++) { - innerList[i]._clear(); - innerList[i] = null; + _innerList[i]._clear(); + _innerList[i] = null; } } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_constants.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_constants.dart index 3296007c..7f0e0ad3 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_constants.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_constants.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for format constants. /// -class FormatConstants { +class _FormatConstants { /// /// Number of hours in a day. /// @@ -17,5 +17,6 @@ class FormatConstants { /// /// Number of minutes in a day. /// + // ignore: unused_field static const int _minutesInDay = _hoursInDay * _minutesInHour; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_enums.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_enums.dart index 3adae2c7..77db215e 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_enums.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_enums.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Represents possible token types. /// -enum TokenType { +enum _TokenType { /// /// Represents unknown format token. /// diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_format_token_base.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_format_token_base.dart index 7e0b7e52..3de1fb64 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_format_token_base.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/_format_token_base.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Base class for formula tokens. /// -abstract class FormatTokenBase { +abstract class _FormatTokenBase { /// /// Part of format. /// @@ -13,12 +13,12 @@ abstract class FormatTokenBase { /// /// Tries to parse format string. /// - int tryParse(String strFormat, int iIndex); + int _tryParse(String strFormat, int iIndex); /// /// Tries to parse format string using regular expression. /// - int tryParseRegex(RegExp regex, String strFormat, int iIndex) { + int _tryParseRegex(RegExp regex, String strFormat, int iIndex) { if (regex == null) throw ("regex - Value can't be null"); if (strFormat == null) throw ("strFormat - Value can't be null"); @@ -32,10 +32,10 @@ abstract class FormatTokenBase { } final Match m = regex.matchAsPrefix(strFormat, iIndex); if (regex.hasMatch(strFormat) && m != null && m.start == iIndex) { - format = regex.stringMatch(strFormat); + _format = regex.stringMatch(strFormat); iIndex += _strFormat.length; if (m.end != iIndex) { - format = _strFormat + _strFormat; + _format = _strFormat + _strFormat; iIndex = m.end; } } @@ -45,36 +45,38 @@ abstract class FormatTokenBase { /// /// Applies format to the value. /// - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section); /// /// Applies format to the value. /// - String applyFormatString(String value, bool bShowHiddenSymbols); + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols); /// /// Gets or sets format of the token. /// - String get format { + String get _format { return _strFormat; } - set format(String value) { + set _format(String value) { if (value == null) throw ('value - string cannot be null.'); if (value.isEmpty) throw ('value - string cannot be empty.'); if (_strFormat != value) { _strFormat = value; - onFormatChange(); + _onFormatChange(); } } /// /// Searches for string from strings array in the format starting from the specified position. /// - int findString( + // ignore: unused_element + int _findString( List arrStrings, String strFormat, int iIndex, bool bIgnoreCase) { if (strFormat == null) throw ('strFormat - string cannot be null.'); @@ -91,12 +93,12 @@ abstract class FormatTokenBase { /// /// This method is called after format string was changed. /// - void onFormatChange() {} + void _onFormatChange() {} /// /// Gets type of the token. Read-only. /// - TokenType get tokenType { - return TokenType.general; + _TokenType get _tokenType { + return _TokenType.general; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/am_pm_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/am_pm_token.dart index f1d8d193..98fc2dd0 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/am_pm_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/am_pm_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Contains Am Pm Token descriptions. /// -class AmPmToken extends FormatTokenBase { +class _AmPmToken extends _FormatTokenBase { final _aMPMRegex = RegExp('[Am/PM]{4,}'); /// @@ -25,7 +25,7 @@ class AmPmToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { if (strFormat == null) throw ('strFormat'); final int iFormatLength = strFormat.length; @@ -35,16 +35,16 @@ class AmPmToken extends FormatTokenBase { if (iIndex < 0 || iIndex > iFormatLength - 1) { throw ('iIndex - Value cannot be less than 0 and greater than than format length - 1.'); } - return tryParseRegex(_aMPMRegex, strFormat, iIndex); + return _tryParseRegex(_aMPMRegex, strFormat, iIndex); } /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - final DateTime date = Range.fromOADate(value); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { + final DateTime date = Range._fromOADate(value); final int iHour = date.hour; @@ -59,14 +59,16 @@ class AmPmToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { throw Exception(); } /// /// Checks the AMPM is other pattern. /// - static String checkAndApplyAMPM(String format) { + // ignore: unused_element + static String _checkAndApplyAMPM(String format) { if (format == null) throw ("format - Value can't be null"); return format; } @@ -75,7 +77,7 @@ class AmPmToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.amPm; + _TokenType get _tokenType { + return _TokenType.amPm; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/character_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/character_token.dart index db1394f0..7e8a03a7 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/character_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/character_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for Character Token. /// -class CharacterToken extends FormatTokenBase { +class _CharacterToken extends _FormatTokenBase { /// /// Start of the token. /// @@ -16,7 +16,7 @@ class CharacterToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { if (strFormat == null) throw ('strFormat - string cannot be null.'); final int iFormatLength = strFormat.length; @@ -48,8 +48,8 @@ class CharacterToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { return _strFormat; } @@ -57,7 +57,8 @@ class CharacterToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return _strFormat; } @@ -65,7 +66,7 @@ class CharacterToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.character; + _TokenType get _tokenType { + return _TokenType.character; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/day_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/day_token.dart index 5709feaf..fab44a20 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/day_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/day_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for describing Day Tokens. /// -class DayToken extends FormatTokenBase { +class _DayToken extends _FormatTokenBase { /// /// Regular expression for minutes part of the format: /// @@ -18,8 +18,8 @@ class DayToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { - final int iResult = tryParseRegex(_dayRegex, strFormat, iIndex); + int _tryParse(String strFormat, int iIndex) { + final int iResult = _tryParseRegex(_dayRegex, strFormat, iIndex); if (iResult != iIndex) { _strFormatLower = _strFormat.toLowerCase(); @@ -32,8 +32,8 @@ class DayToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { double tempValue = value; if (_strFormatLower.length > 2 && @@ -42,7 +42,7 @@ class DayToken extends FormatTokenBase { tempValue = tempValue - 1; } - final DateTime date = Range.fromOADate(tempValue); + final DateTime date = Range._fromOADate(tempValue); return DateFormat(' ' + _strFormatLower).format(date).substring(1); } @@ -50,7 +50,8 @@ class DayToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -58,7 +59,7 @@ class DayToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.day; + _TokenType get _tokenType { + return _TokenType.day; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/decimal_point_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/decimal_point_token.dart index d4704543..7f882008 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/decimal_point_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/decimal_point_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for describing DecimalSeparatorToken. /// -class DecimalPointToken extends SingleCharToken { +class _DecimalPointToken extends _SingleCharToken { /// /// Format character. /// @@ -13,8 +13,8 @@ class DecimalPointToken extends SingleCharToken { /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { return _strFormat; } @@ -22,7 +22,7 @@ class DecimalPointToken extends SingleCharToken { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { if (strFormat == null) throw ('strFormat - string cannot be null'); final int iFormatLength = strFormat.length; @@ -50,7 +50,8 @@ class DecimalPointToken extends SingleCharToken { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -58,7 +59,7 @@ class DecimalPointToken extends SingleCharToken { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.decimalPoint; + _TokenType get _tokenType { + return _TokenType.decimalPoint; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/digit_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/digit_token.dart index b068578d..4449fb15 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/digit_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/digit_token.dart @@ -3,13 +3,13 @@ part of xlsio; /// /// Class used for describing Digit Tokens. /// -abstract class DigitToken extends SingleCharToken { +abstract class _DigitToken extends _SingleCharToken { /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { final int iDigit = 0; return _getDigitString(value, iDigit, bShowHiddenSymbols); } @@ -18,7 +18,8 @@ abstract class DigitToken extends SingleCharToken { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return value; } @@ -34,7 +35,7 @@ abstract class DigitToken extends SingleCharToken { } @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { return iIndex; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/fraction_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/fraction_token.dart index 1701d1a8..3f7ca8ec 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/fraction_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/fraction_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for Fraction tokens. /// -class FractionToken extends SingleCharToken { +class _FractionToken extends _SingleCharToken { /// /// Format character. /// @@ -13,7 +13,7 @@ class FractionToken extends SingleCharToken { /// Initializes a new instance of the FractionToken class. /// // ignore: sort_constructors_first - FractionToken() { + _FractionToken() { formatChar = _defaultFormatChar; } @@ -21,8 +21,8 @@ class FractionToken extends SingleCharToken { /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { return (section != null && section.formatType == ExcelFormatType.dateTime) ? culture.dateTimeFormat.dateSeparator : _strFormat; @@ -32,7 +32,7 @@ class FractionToken extends SingleCharToken { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { if (strFormat == null) throw ('strFormat'); final int iFormatLength = strFormat.length; @@ -60,7 +60,8 @@ class FractionToken extends SingleCharToken { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return _strFormat; } @@ -68,7 +69,7 @@ class FractionToken extends SingleCharToken { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.fraction; + _TokenType get _tokenType { + return _TokenType.fraction; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_24_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_24_token.dart index 8b2420b6..ab628310 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_24_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_24_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for 24 hour Token. /// -class Hour24Token extends FormatTokenBase { +class _Hour24Token extends _FormatTokenBase { /// /// Regular expression for hours part of the format: /// @@ -13,21 +13,21 @@ class Hour24Token extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { - return tryParseRegex(_hourRegex, strFormat, iIndex); + int _tryParse(String strFormat, int iIndex) { + return _tryParseRegex(_hourRegex, strFormat, iIndex); } /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { double temp = value; if (temp <= 60) temp = temp - 1; - final DateTime date = Range.fromOADate(value); + final DateTime date = Range._fromOADate(value); double dHour; - dHour = temp * FormatConstants._hoursInDay; + dHour = temp * _FormatConstants._hoursInDay; dHour = (value > 0) ? (dHour % 24).ceilToDouble() == date.hour ? dHour.ceilToDouble() @@ -43,7 +43,8 @@ class Hour24Token extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -51,7 +52,7 @@ class Hour24Token extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.hour24; + _TokenType get _tokenType { + return _TokenType.hour24; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_token.dart index fcdbeaf9..3eaae1e4 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/hour_token.dart @@ -1,7 +1,7 @@ part of xlsio; // ignore: public_member_api_docs -class HourToken extends FormatTokenBase { +class _HourToken extends _FormatTokenBase { /// /// Regular expression for hours part of the format: /// @@ -10,17 +10,18 @@ class HourToken extends FormatTokenBase { /// /// Defined 12hr format. /// - static const String dEF_FORMAT = 'h'; + static const String _defaultFormat = 'h'; /// /// Long format. /// - static const String dEF_FORMAT_LONG = '00'; + static const String _defaultFormatLong = '00'; /// /// Indicates whether token should be formatted using am/pm time format. /// - bool isAmPm = false; + // ignore: prefer_final_fields + bool _isAmPm = false; @override String _strFormat; @@ -29,21 +30,21 @@ class HourToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { - return tryParseRegex(hourRegex, strFormat, iIndex); + int _tryParse(String strFormat, int iIndex) { + return _tryParseRegex(hourRegex, strFormat, iIndex); } /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - final DateTime date = Range.fromOADate(value); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { + final DateTime date = Range._fromOADate(value); int iHour = date.hour; - if (isAmPm) iHour = int.parse(DateFormat(dEF_FORMAT).format(date)); + if (_isAmPm) iHour = int.parse(DateFormat(_defaultFormat).format(date)); if (_strFormat.length > 1) { - return NumberFormat(dEF_FORMAT_LONG).format(iHour); + return NumberFormat(_defaultFormatLong).format(iHour); } else { return iHour.toString(); } @@ -53,7 +54,8 @@ class HourToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -61,7 +63,7 @@ class HourToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.hour; + _TokenType get _tokenType { + return _TokenType.hour; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/milli_second_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/milli_second_token.dart index e53c296c..96cf2caa 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/milli_second_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/milli_second_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for MilliSecond Token. /// -class MilliSecondToken extends FormatTokenBase { +class _MilliSecondToken extends _FormatTokenBase { //Class constants /// /// Long format. @@ -19,7 +19,7 @@ class MilliSecondToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { throw ('NotImplementedException'); } @@ -27,9 +27,9 @@ class MilliSecondToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - final DateTime date = Range.fromOADate(value); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { + final DateTime date = Range._fromOADate(value); int iMilliSecond = date.millisecond; final int iFormatLen = _strFormat.length; @@ -39,7 +39,7 @@ class MilliSecondToken extends FormatTokenBase { if (iFormatLen < _defaultMaxLen) { final int iPow = _defaultMaxLen - iFormatLen; iMilliSecond = - FormatSection._round(iMilliSecond / math.pow(10, iPow)).toInt(); + _FormatSection._round(iMilliSecond / math.pow(10, iPow)).toInt(); strNativeFormat = _strFormat.substring(1, 1 + iFormatLen - 1); } else { strNativeFormat = _defaultFormatLong; @@ -55,7 +55,8 @@ class MilliSecondToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -63,7 +64,7 @@ class MilliSecondToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.milliSecond; + _TokenType get _tokenType { + return _TokenType.milliSecond; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/minute_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/minute_token.dart index 32768061..fa166052 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/minute_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/minute_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for Minute Token. /// -class MinuteToken extends FormatTokenBase { +class _MinuteToken extends _FormatTokenBase { /// /// Regular expression for minutes part of the format: /// @@ -12,28 +12,29 @@ class MinuteToken extends FormatTokenBase { /// /// Long type of the format. /// - static const String DEF_FORMAT_LONG = '00'; + // ignore: unused_field + static const String _DEF_FORMAT_LONG = '00'; /// /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { - return tryParseRegex(_minuteRegex, strFormat, iIndex); + int _tryParse(String strFormat, int iIndex) { + return _tryParseRegex(_minuteRegex, strFormat, iIndex); } /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - final DateTime date = Range.fromOADate(value); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { + final DateTime date = Range._fromOADate(value); int iMinute = date.minute; final int iSecond = date.second; final int iMilliSecond = date.millisecond; - if (iMilliSecond >= SecondToken._defaultMilliSecondHalf && iSecond == 59) { + if (iMilliSecond >= _SecondToken._defaultMilliSecondHalf && iSecond == 59) { if (!section._isMilliSecondFormatValue) { iMinute++; } else { @@ -52,7 +53,8 @@ class MinuteToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -60,7 +62,7 @@ class MinuteToken extends FormatTokenBase { /// This method is called after format string was changed. /// @override - void onFormatChange() { + void _onFormatChange() { _strFormat = _strFormat.toLowerCase(); } @@ -68,7 +70,7 @@ class MinuteToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.minute; + _TokenType get _tokenType { + return _TokenType.minute; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/minute_total_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/minute_total_token.dart deleted file mode 100644 index 4217cc94..00000000 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/minute_total_token.dart +++ /dev/null @@ -1,48 +0,0 @@ -part of xlsio; - -/// -/// Class used for organizing Minutes since midnight. -/// -class MinuteTotalToken extends FormatTokenBase { - /// - /// Regular expression for hours part of the format: - /// - static final _hourRegex = RegExp('\\[[m]+\\]'); - - /// - /// Tries to parse format string. - /// - @override - int tryParse(String strFormat, int iIndex) { - return tryParseRegex(_hourRegex, strFormat, iIndex); - } - - /// - /// Applies format to the value. - /// - @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - double tempValue = value; - - if (tempValue < 60) tempValue = tempValue - 1; - final double dHour = tempValue * FormatConstants._minutesInDay; - return dHour.toString(); - } - - /// - /// Applies format to the value. - /// - @override - String applyFormatString(String value, bool bShowHiddenSymbols) { - return ''; - } - - /// - /// Gets type of the token. Read-only. - /// - @override - TokenType get tokenType { - return TokenType.minuteTotal; - } -} diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/month_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/month_token.dart index ae8486b2..f66fdf21 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/month_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/month_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for Month Token. /// -class MonthToken extends FormatTokenBase { +class _MonthToken extends _FormatTokenBase { /// /// Regular expression for minutes part of the format: /// @@ -13,17 +13,17 @@ class MonthToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { - return tryParseRegex(_monthRegex, strFormat, iIndex); + int _tryParse(String strFormat, int iIndex) { + return _tryParseRegex(_monthRegex, strFormat, iIndex); } /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - final DateTime date = Range.fromOADate(value); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { + final DateTime date = Range._fromOADate(value); final DateFormat formatter = DateFormat(_strFormat.toUpperCase()); final String formatted = formatter.format(date); return formatted; @@ -33,7 +33,8 @@ class MonthToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -41,7 +42,7 @@ class MonthToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.month; + _TokenType get _tokenType { + return _TokenType.month; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/second_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/second_token.dart index ac39221d..cc3e6551 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/second_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/second_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for Seconds Token. /// -class SecondToken extends FormatTokenBase { +class _SecondToken extends _FormatTokenBase { /// /// Regular expression for minutes part of the format: /// @@ -22,28 +22,29 @@ class SecondToken extends FormatTokenBase { /// /// Indicates whether number of seconds must be rounded. /// - bool roundValue = true; + // ignore: prefer_final_fields + bool _roundValue = true; /// /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { - return tryParseRegex(_secondRegex, strFormat, iIndex); + int _tryParse(String strFormat, int iIndex) { + return _tryParseRegex(_secondRegex, strFormat, iIndex); } /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - final DateTime date = Range.fromOADate(value); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { + final DateTime date = Range._fromOADate(value); int iSecond = date.second; final int iMilliSecond = date.millisecond; - if (roundValue && iMilliSecond >= _defaultMilliSecondHalf) iSecond++; + if (_roundValue && iMilliSecond >= _defaultMilliSecondHalf) iSecond++; if (_strFormat.length > 1) { /// when second is more than 59, display it as 00. @@ -57,7 +58,8 @@ class SecondToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -65,7 +67,7 @@ class SecondToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.second; + _TokenType get _tokenType { + return _TokenType.second; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/significant_digit_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/significant_digit_token.dart index a8bc1b49..386e3d8f 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/significant_digit_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/significant_digit_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for Significant Digit Token. /// -class SignificantDigitToken extends DigitToken { +class _SignificantDigitToken extends _DigitToken { /// /// Format character. /// @@ -13,7 +13,7 @@ class SignificantDigitToken extends DigitToken { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { if (strFormat == null) throw ('strFormat'); final int iFormatLength = strFormat.length; @@ -26,7 +26,7 @@ class SignificantDigitToken extends DigitToken { final String chCurrent = strFormat[iIndex]; - if (isNumeric(chCurrent)) { + if (_isNumeric(chCurrent)) { iIndex++; _strFormat = chCurrent; } else if (strFormat[iIndex] == '\\' && @@ -38,7 +38,7 @@ class SignificantDigitToken extends DigitToken { } ///Checking the string is numeric or not. - bool isNumeric(String s) { + bool _isNumeric(String s) { if (s == null) { return false; } @@ -48,8 +48,8 @@ class SignificantDigitToken extends DigitToken { /// /// Format character. Read-only. /// - @override - String get formatChar { + // ignore: unused_element + String get _formatChar { if (_strFormat == null) return _defaultFormatChar; return _strFormat; } @@ -58,7 +58,7 @@ class SignificantDigitToken extends DigitToken { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.significantDigit; + _TokenType get _tokenType { + return _TokenType.significantDigit; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/single_char_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/single_char_token.dart index 9261a37d..1dad50ef 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/single_char_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/single_char_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for character token. /// -abstract class SingleCharToken extends FormatTokenBase { +abstract class _SingleCharToken extends _FormatTokenBase { /// /// Gets format character. Read-only. /// @@ -13,7 +13,7 @@ abstract class SingleCharToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { if (strFormat == null) throw ('strFormat - string cannot be null'); final int iFormatLength = strFormat.length; diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/unknown_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/unknown_token.dart index d89c5924..057828ae 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/unknown_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/unknown_token.dart @@ -3,12 +3,12 @@ part of xlsio; /// /// Class used for UnknownToken. /// -class UnknownToken extends FormatTokenBase { +class _UnknownToken extends _FormatTokenBase { /// /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { + int _tryParse(String strFormat, int iIndex) { if (strFormat == null) throw ('strFormat'); final int iFormatLength = strFormat.length; @@ -23,8 +23,8 @@ class UnknownToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { if (_strFormat == 'g' || _strFormat == 'G') { return ''; } else { @@ -36,7 +36,8 @@ class UnknownToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return _strFormat; } @@ -44,7 +45,7 @@ class UnknownToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.unknown; + _TokenType get _tokenType { + return _TokenType.unknown; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/year_token.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/year_token.dart index d384dad8..c1df585f 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/year_token.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/format_tokens/year_token.dart @@ -3,7 +3,7 @@ part of xlsio; /// /// Class used for YearToken. /// -class YearToken extends FormatTokenBase { +class _YearToken extends _FormatTokenBase { /// /// Regular expression for minutes part of the format: /// @@ -13,17 +13,17 @@ class YearToken extends FormatTokenBase { /// Tries to parse format string. /// @override - int tryParse(String strFormat, int iIndex) { - return tryParseRegex(_yearRegex, strFormat, iIndex); + int _tryParse(String strFormat, int iIndex) { + return _tryParseRegex(_yearRegex, strFormat, iIndex); } /// /// Applies format to the value. /// @override - String applyFormat(double value, bool bShowHiddenSymbols, CultureInfo culture, - FormatSection section) { - final DateTime date = Range.fromOADate(value); + String _applyFormat(double value, bool bShowHiddenSymbols, + CultureInfo culture, _FormatSection section) { + final DateTime date = Range._fromOADate(value); final int iYear = date.year; if (_strFormat.length > 2) { @@ -37,7 +37,8 @@ class YearToken extends FormatTokenBase { /// Applies format to the value. /// @override - String applyFormatString(String value, bool bShowHiddenSymbols) { + // ignore: unused_element + String _applyFormatString(String value, bool bShowHiddenSymbols) { return ''; } @@ -45,7 +46,7 @@ class YearToken extends FormatTokenBase { /// Gets type of the token. Read-only. /// @override - TokenType get tokenType { - return TokenType.year; + _TokenType get _tokenType { + return _TokenType.year; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/formats_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/formats_collection.dart index 4a28d4c2..4105d60e 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/formats_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/formats/formats_collection.dart @@ -6,37 +6,45 @@ class FormatsCollection { Workbook _parent; /// Represents the Decimal Seprator. - static const String decimalSeparator = '.'; + // ignore: unused_field + static const String _decimalSeparator = '.'; /// Represents the Thousand seprator. - static const String thousandSeparator = ','; + // ignore: unused_field + static const String _thousandSeparator = ','; /// Represents the percentage in decimal numbers. - static const String percentage = '%'; + // ignore: unused_field + static const String _percentage = '%'; /// Represents the fraction symbol. - static const String fraction = '/'; + // ignore: unused_field + static const String _fraction = '/'; /// Represents the index of the date format. - static const String date = 'date'; + // ignore: unused_field + static const String _date = 'date'; /// Represents the time separator. - static const String time = ':'; + // ignore: unused_field + static const String _time = ':'; /// Represents the Exponenet Symbol. static const String exponent = 'E'; /// Represents the Minus symbol. - static const String minus = '-'; + // ignore: unused_field + static const String _minus = '-'; /// Represents the Currency Symbol. - static const String currency = '\$'; + // ignore: unused_field + static const String _currency = '\$'; /// Represents the default exponential Symbol. - static const String default_exponential = 'E+'; + static const String _default_exponential = 'E+'; /// Index to the first user-defined number format. - static const int default_first_custom_index = 163; + static const int _default_first_custom_index = 163; /// Default format Strings. final _defaultFormatString = [ @@ -79,13 +87,13 @@ class FormatsCollection { ]; /// Maximum number formats count in a workbook. 36 Default + 206 Custom formats. - static const int max_formats_count = 242; + static const int _max_formats_count = 242; - /// Index-to-FormatImpl. - Map _rawFormats = {}; + /// Index-to-_Format. + Map _rawFormats = {}; - /// Dictionary. Key - format string, value - FormatImpl. - Map _hashFormatStrings = {}; + /// Dictionary. Key - format string, value - _Format. + Map _hashFormatStrings = {}; /// Gets the number of elements contained in the collection. Read-only int get count { @@ -98,7 +106,7 @@ class FormatsCollection { } /// Indexer of the class - FormatImpl operator [](index) => _rawFormats[index]; + _Format operator [](index) => _rawFormats[index]; /// Initializes new instance and sets its application and parent objects. // ignore: sort_constructors_first @@ -109,17 +117,17 @@ class FormatsCollection { /// /// Inserts all default formats into list. /// - void insertDefaultFormats() { - FormatImpl curFormat; + void _insertDefaultFormats() { + _Format curFormat; int iFormatIndex = 0; final int iLength = _defaultFormatString.length; for (int iIndex = 0; iIndex < iLength; iIndex++) { - curFormat = FormatImpl(this); - curFormat.index = iFormatIndex; - curFormat.formatString = _defaultFormatString[iIndex]; - if (!_rawFormats.containsKey(curFormat.index)) { - _rawFormats[curFormat.index] = curFormat; - _hashFormatStrings[curFormat.formatString] = curFormat; + curFormat = _Format(this); + curFormat._index = iFormatIndex; + curFormat._formatString = _defaultFormatString[iIndex]; + if (!_rawFormats.containsKey(curFormat._index)) { + _rawFormats[curFormat._index] = curFormat; + _hashFormatStrings[curFormat._formatString] = curFormat; } if (iFormatIndex == 22) iFormatIndex = 36; iFormatIndex++; @@ -127,8 +135,8 @@ class FormatsCollection { } /// Gets all used formats. - List getUsedFormats() { - final List result = []; + List<_Format> _getUsedFormats() { + final List<_Format> result = []; final List keys = _rawFormats.keys.toList(); final int index = keys.indexOf(49); @@ -138,9 +146,9 @@ class FormatsCollection { if (index >= 0 && index < iCount - 1) { for (int i = index + 1; i < iCount; i++) { - final FormatImpl format = _rawFormats[keys[i]]; + final _Format format = _rawFormats[keys[i]]; - if (format.index >= default_first_custom_index) result.add(format); + if (format._index >= _default_first_custom_index) result.add(format); } } @@ -148,27 +156,27 @@ class FormatsCollection { } /// Searches for format with specified format string and creates one if a match is not found. - int findOrCreateFormat(String formatString) { + int _findOrCreateFormat(String formatString) { return _hashFormatStrings.containsKey(formatString) - ? _hashFormatStrings[formatString].index - : createFormat(formatString); + ? _hashFormatStrings[formatString]._index + : _createFormat(formatString); } /// Method that creates format object based on the format string and registers it in the workbook. - int createFormat(String formatString) { + int _createFormat(String formatString) { if (formatString == null) throw Exception('formatString'); if (formatString.isEmpty) { throw Exception('formatString - string cannot be empty'); } - if (formatString.contains(default_exponential.toLowerCase())) { + if (formatString.contains(_default_exponential.toLowerCase())) { formatString = formatString.replaceAll( - default_exponential.toLowerCase(), default_exponential); + _default_exponential.toLowerCase(), _default_exponential); } // formatString = GetCustomizedString(formatString); if (_hashFormatStrings.containsKey(formatString)) { - final FormatImpl format = _hashFormatStrings[formatString]; - return format.index; + final _Format format = _hashFormatStrings[formatString]; + return format._index; } if (_parent.cultureInfo._culture == 'en-US') { final String localStr = formatString.replaceAll('\'\$\'', '\$'); @@ -177,8 +185,8 @@ class FormatsCollection { for (final String formatStr in _hashFormatStrings.keys) { if (formatStr.replaceAll('\\', '').replaceAll('\'\$\'', '\$') == localStr) { - final FormatImpl format = _hashFormatStrings[formatStr]; - return format.index; + final _Format format = _hashFormatStrings[formatStr]; + return format._index; } } } @@ -186,14 +194,16 @@ class FormatsCollection { int index = _rawFormats.keys.toList()[iCount - 1]; /// NOTE: By Microsoft, indexes less than 163 are reserved for build-in formats. - if (index < default_first_custom_index) index = default_first_custom_index; + if (index < _default_first_custom_index) { + index = _default_first_custom_index; + } index++; - if (iCount < max_formats_count) { - final FormatImpl format = FormatImpl(this); - format.formatString = formatString; - format.index = index; - register(format); + if (iCount < _max_formats_count) { + final _Format format = _Format(this); + format._formatString = formatString; + format._index = index; + _register(format); } else { return 0; } @@ -201,30 +211,30 @@ class FormatsCollection { } /// Determines whether the IDictionary contains an element with the specified key. - bool contains(int key) { + bool _contains(int key) { return _rawFormats.containsKey(key); } /// Determines whether the IDictionary contains an element with the specified key. - bool containsFormat(String format) { + // ignore: unused_element + bool _containsFormat(String format) { return _hashFormatStrings.containsKey(format); } /// Adding formats to collection - void register(FormatImpl format) { + void _register(_Format format) { if (format == null) throw Exception('format'); - _rawFormats[format.index] = format; - _hashFormatStrings[format.formatString] = format; + _rawFormats[format._index] = format; + _hashFormatStrings[format._formatString] = format; } /// /// Removes all elements from the IDictionary. /// - void clear() { - for (final MapEntry formatImpl - in _hashFormatStrings.entries) { - formatImpl.value.clear(); + void _clear() { + for (final MapEntry format in _hashFormatStrings.entries) { + format.value._clear(); } _rawFormats.clear(); _hashFormatStrings.clear(); diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/culture_info.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/culture_info.dart index a7937600..59e9bbf2 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/culture_info.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/culture_info.dart @@ -43,31 +43,31 @@ class NumberFormatInfo { _locale = locale; } String _locale; - NumberSymbols _numberSymbols; + NumberSymbols _numberSymbolsField; - String _currencySymbol; + String _currencySymbolField; String _decimalSeparator; String _groupSeparator; /// Gets the number symbol. - NumberSymbols get numberSymbols { - if (_numberSymbols == null) { - _numberSymbols = numberFormatSymbols[_locale] as NumberSymbols; - if (_numberSymbols == null && _locale.length > 2) { - _numberSymbols = + NumberSymbols get _numberSymbols { + if (_numberSymbolsField == null) { + _numberSymbolsField = numberFormatSymbols[_locale] as NumberSymbols; + if (_numberSymbolsField == null && _locale.length > 2) { + _numberSymbolsField = numberFormatSymbols[_locale.replaceAll('-', '_')] as NumberSymbols; } - _numberSymbols ??= + _numberSymbolsField ??= numberFormatSymbols[_locale.substring(0, 2)] as NumberSymbols; } - return _numberSymbols; + return _numberSymbolsField; } /// Represents decimal separator. String get numberDecimalSeparator { if (_decimalSeparator == null) { - if (numberSymbols != null) { - _decimalSeparator = numberSymbols.DECIMAL_SEP; + if (_numberSymbols != null) { + _decimalSeparator = _numberSymbols.DECIMAL_SEP; } else { _decimalSeparator = '.'; } @@ -83,8 +83,8 @@ class NumberFormatInfo { /// Represents group separator. String get numberGroupSeparator { if (_groupSeparator == null) { - if (numberSymbols != null) { - _groupSeparator = numberSymbols.GROUP_SEP; + if (_numberSymbols != null) { + _groupSeparator = _numberSymbols.GROUP_SEP; } } else { _groupSeparator = ','; @@ -97,20 +97,21 @@ class NumberFormatInfo { } /// Represents Currency Symbol. - String get currencySymbol { - if (_currencySymbol == null) { - if (numberSymbols != null) { + String get _currencySymbol { + if (_currencySymbolField == null) { + if (_numberSymbols != null) { final format = NumberFormat.currency(locale: _locale); - _currencySymbol = format.currencySymbol; + _currencySymbolField = format.currencySymbol; } else { - _currencySymbol = '\$'; + _currencySymbolField = '\$'; } } - return _currencySymbol; + return _currencySymbolField; } - set currencySymbol(String value) { - _currencySymbol = value; + // ignore: unused_element + set _currencySymbol(String value) { + _currencySymbolField = value; } } @@ -122,7 +123,7 @@ class DateTimeFormatInfo { _dateTimeSymbols = dateTimeSymbolMap(); } String _locale; - DateSymbols _dateSymbols; + DateSymbols _dateSymbolsField; /// Represents date separator. String _dateSeparator; @@ -142,30 +143,31 @@ class DateTimeFormatInfo { Map _dateTimeSymbols; /// Maximum supported date time. - DateTime maxSupportedDateTime = DateTime(9999, 12, 31); + final DateTime _maxSupportedDateTime = DateTime(9999, 12, 31); /// Minimum supported date time. - DateTime minSupportedDateTime = DateTime(0001, 01, 01); + // ignore: unused_field + final DateTime _minSupportedDateTime = DateTime(0001, 01, 01); /// Gets the date symbols. - DateSymbols get dateSymbols { - if (_dateSymbols == null) { - _dateSymbols = _dateTimeSymbols[_locale] as DateSymbols; - if (_dateSymbols == null && _locale.length > 2) { - _dateSymbols = + DateSymbols get _dateSymbols { + if (_dateSymbolsField == null) { + _dateSymbolsField = _dateTimeSymbols[_locale] as DateSymbols; + if (_dateSymbolsField == null && _locale.length > 2) { + _dateSymbolsField = _dateTimeSymbols[_locale.replaceAll('-', '_')] as DateSymbols; } - - _dateSymbols ??= _dateTimeSymbols[_locale.substring(0, 2)] as DateSymbols; + _dateSymbolsField ??= + _dateTimeSymbols[_locale.substring(0, 2)] as DateSymbols; } - return _dateSymbols; + return _dateSymbolsField; } /// Represents date separator. String get dateSeparator { if (_dateSeparator == null) { - if (dateSymbols != null) { - final dateFormat = dateSymbols.DATEFORMATS[3]; + if (_dateSymbols != null) { + final dateFormat = _dateSymbols.DATEFORMATS[3]; for (final String fraction in _fractionSeperators) { final index = dateFormat.indexOf(fraction); if (index != -1) { @@ -187,8 +189,8 @@ class DateTimeFormatInfo { /// The custom format string for a short date value. String get shortDatePattern { if (_shortDatePattern == null) { - if (dateSymbols != null) { - return dateSymbols.DATEFORMATS[3]; + if (_dateSymbols != null) { + return _dateSymbols.DATEFORMATS[3]; } else { _shortDatePattern = 'M/d/yyyy'; } @@ -203,8 +205,8 @@ class DateTimeFormatInfo { /// The custom format string for a short time value. String get shortTimePattern { if (_shortTimePattern == null) { - if (dateSymbols != null) { - return dateSymbols.TIMEFORMATS[3]; + if (_dateSymbols != null) { + return _dateSymbols.TIMEFORMATS[3]; } else { _shortTimePattern = 'h:mm tt'; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/serialize_workbook.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/serialize_workbook.dart index 586ada37..d51eea6e 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/serialize_workbook.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/serialize_workbook.dart @@ -7,14 +7,11 @@ class SerializeWorkbook { _workbook = workbook; } - /// Decode the Zip file - Archive archive = Archive(); - /// Workbook to serialize. Workbook _workbook; /// Serialize workbook - void saveInternal() { + void _saveInternal() { _updateGlobalStyles(); _saveWorkbook(); _saveWorksheets(); @@ -88,7 +85,7 @@ class SerializeWorkbook { builder.attribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); - if (!sheet.isSummaryRowBelow) { + if (!sheet._isSummaryRowBelow) { builder.element('sheetPr', nest: () { builder.element('OutlinePr', nest: () { builder.attribute('summaryBelow', '0'); @@ -138,16 +135,16 @@ class SerializeWorkbook { cell._styleIndex = -1; } builder.element('c', nest: () { - builder.attribute('r', cell.refName); - if (cell.saveType != null) { - builder.attribute('t', cell.saveType); + builder.attribute('r', cell.addressLocal); + if (cell._saveType != null) { + builder.attribute('t', cell._saveType); } if (cell._styleIndex != -1) { builder.attribute('s', cell._styleIndex.toString()); } String strFormula = cell.formula; if (strFormula != null && strFormula != '') { - if (strFormula[0] == '=' && cell.saveType != 's') { + if (strFormula[0] == '=' && cell._saveType != 's') { strFormula = strFormula.substring(1).replaceAll('\'', '\"'); builder.element('f', nest: strFormula); @@ -166,7 +163,7 @@ class SerializeWorkbook { } else if (cell.number != null) { builder.element('v', nest: cell.number.toString()); } else if (cell.text != null) { - if (cell.saveType == 's') { + if (cell._saveType == 's') { builder.element('v', nest: cell._textIndex.toString()); } else { @@ -216,7 +213,7 @@ class SerializeWorkbook { }); if ((sheet.pictures != null && sheet.pictures.count > 0) || (sheet.charts != null && sheet.chartCount > 0)) { - _workbook.drawingCount++; + _workbook._drawingCount++; _saveDrawings(sheet); if (sheet.charts != null && sheet.chartCount > 0) { sheet.charts.serializeCharts(sheet); @@ -339,19 +336,19 @@ class SerializeWorkbook { builder.element('xdr:clientData', nest: () {}); }); final imageData = picture.imageData; - _workbook.imageCount += 1; + _workbook._imageCount += 1; String imgPath; if (Picture.isJpeg(imageData)) { imgPath = - 'xl/media/image' + _workbook.imageCount.toString() + '.jpeg'; - if (!_workbook.defaultContentTypes.containsKey('jpeg')) { - _workbook.defaultContentTypes['jpeg'] = 'image/jpeg'; + 'xl/media/image' + _workbook._imageCount.toString() + '.jpeg'; + if (!_workbook._defaultContentTypes.containsKey('jpeg')) { + _workbook._defaultContentTypes['jpeg'] = 'image/jpeg'; } } else { imgPath = - 'xl/media/image' + _workbook.imageCount.toString() + '.png'; - if (!_workbook.defaultContentTypes.containsKey('png')) { - _workbook.defaultContentTypes['png'] = 'image/png'; + 'xl/media/image' + _workbook._imageCount.toString() + '.png'; + if (!_workbook._defaultContentTypes.containsKey('png')) { + _workbook._defaultContentTypes['png'] = 'image/png'; } } _addToArchive(imageData, imgPath); @@ -362,7 +359,7 @@ class SerializeWorkbook { final stringXml = builder.buildDocument().copy().toString(); final bytes = utf8.encode(stringXml); _addToArchive(bytes, - 'xl/drawings/drawing' + (_workbook.drawingCount).toString() + '.xml'); + 'xl/drawings/drawing' + (_workbook._drawingCount).toString() + '.xml'); } /// Serialize drawing relations. @@ -391,7 +388,7 @@ class SerializeWorkbook { } if (sheet.pictures.count != 0) { final length = sheet.pictures.count; - int id = _workbook.imageCount - sheet.pictures.count; + int id = _workbook._imageCount - sheet.pictures.count; for (int i = 1; i <= length; i++) { id++; builder.element('Relationship', nest: () { @@ -415,7 +412,7 @@ class SerializeWorkbook { _addToArchive( bytes, 'xl/drawings/_rels/drawing' + - (_workbook.drawingCount).toString() + + (_workbook._drawingCount).toString() + '.xml.rels'); } @@ -457,7 +454,7 @@ class SerializeWorkbook { picture.lastRowOffset = (rowHiddenHeight * picture.lastRowOffset) / 256; picture.lastRowOffset = - (picture.lastRowOffset / _workbook.unitProportions[7]) + (picture.lastRowOffset / _workbook._unitProportions[7]) .round() .toDouble(); break; @@ -507,7 +504,7 @@ class SerializeWorkbook { picture.lastColOffset = (colHiddenWidth * picture.lastColOffset) / 1024; picture.lastColOffset = - (picture.lastColOffset / _workbook.unitProportions[7]) + (picture.lastColOffset / _workbook._unitProportions[7]) .round() .toDouble(); @@ -522,7 +519,7 @@ class SerializeWorkbook { /// Converts the given value to pixels. double _convertToPixels(double value) { - return value * _workbook.unitProportions[6]; + return value * _workbook._unitProportions[6]; } /// Converts column width to pixels. @@ -557,7 +554,7 @@ class SerializeWorkbook { builder.attribute( 'Target', '../drawings/drawing' + - _workbook.drawingCount.toString() + + _workbook._drawingCount.toString() + '.xml'); }); } else if (sheet.charts != null && sheet.chartCount > 0) { @@ -568,7 +565,7 @@ class SerializeWorkbook { builder.attribute( 'Target', '../drawings/drawing' + - _workbook.drawingCount.toString() + + _workbook._drawingCount.toString() + '.xml'); }); } @@ -592,15 +589,15 @@ class SerializeWorkbook { /// Serialize workbook shared string. void _saveSharedString() { final builder = XmlBuilder(); - final length = _workbook.sharedStrings.length; - if (_workbook.sharedStrings != null && length > 0) { + final length = _workbook._sharedStrings.length; + if (_workbook._sharedStrings != null && length > 0) { builder.processing('xml', 'version="1.0"'); builder.element('sst', nest: () { builder.attribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); builder.attribute('uniqueCount', length.toString()); - builder.attribute('count', _workbook.sharedStringCount.toString()); - _workbook.sharedStrings.forEach((key, value) { + builder.attribute('count', _workbook._sharedStringCount.toString()); + _workbook._sharedStrings.forEach((key, value) { if (key.indexOf('') != 0) { builder.element('si', nest: () { builder.element('t', nest: () { @@ -767,7 +764,7 @@ class SerializeWorkbook { builder.attribute('ContentType', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'); }); - if ((_workbook.imageCount > 0 && + if ((_workbook._imageCount > 0 && _workbook.worksheets[i].pictures != null && _workbook.worksheets[i].pictures.count > 0) || _workbook.worksheets[i].charts != null && @@ -795,17 +792,17 @@ class SerializeWorkbook { } } - if (_workbook.imageCount > 0) { - for (final key in _workbook.defaultContentTypes.keys) { + if (_workbook._imageCount > 0) { + for (final key in _workbook._defaultContentType.keys) { builder.element('Default', nest: () { builder.attribute('Extension', key); builder.attribute( - 'ContentType', _workbook.defaultContentTypes[key]); + 'ContentType', _workbook._defaultContentTypes[key]); }); } } - if (_workbook.sharedStringCount > 0) { + if (_workbook._sharedStringCount > 0) { builder.element('Override', nest: () { builder.attribute('PartName', '/xl/sharedStrings.xml'); builder.attribute('ContentType', @@ -847,7 +844,7 @@ class SerializeWorkbook { 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles'); builder.attribute('Target', 'styles.xml'); }); - if (_workbook.sharedStringCount > 0) { + if (_workbook._sharedStringCount > 0) { count = ++count; builder.element('Relationship', nest: () { builder.attribute('Id', 'rId' + count.toString()); @@ -932,12 +929,12 @@ class SerializeWorkbook { if (cellStyle.name == null) { _workbook.styles.addStyle(cellStyle); } - final globalStyle = GlobalStyle(); - globalStyle.name = cellStyle.name; - globalStyle.xfId = cellStyle.index; - globalStyle.numberFormat = cellStyle.numberFormat; - globalStyle.builtinId = cellStyle._builtinId; - _workbook.globalStyles[globalStyle.name] = globalStyle; + final globalStyle = _GlobalStyle(); + globalStyle._name = cellStyle.name; + globalStyle._xfId = cellStyle.index; + globalStyle._numberFormat = cellStyle.numberFormat; + globalStyle._builtinId = cellStyle._builtinId; + _workbook._globalStyles[globalStyle._name] = globalStyle; } } } @@ -946,11 +943,11 @@ class SerializeWorkbook { int _processCellStyle(CellStyle style, Workbook workbook) { final int index = workbook.styles.innerList.indexOf(style); if (style.isGlobalStyle && index >= 0) { - processNumFormatId(style, workbook); + _processNumFormatId(style, workbook); if (style.name == null) workbook.styles.addStyle(style); return style.index; } else if (index == -1) { - processNumFormatId(style, workbook); + _processNumFormatId(style, workbook); workbook.styles.addStyle(style); return style.index; } else { @@ -959,10 +956,10 @@ class SerializeWorkbook { } /// Process the number format for cell style. - void processNumFormatId(CellStyle style, Workbook workbook) { + void _processNumFormatId(CellStyle style, Workbook workbook) { if (style.numberFormat != 'General' && - !_workbook.innerFormats.contains(style.numberFormatIndex)) { - _workbook.innerFormats.createFormat(style.numberFormat); + !_workbook.innerFormats._contains(style.numberFormatIndex)) { + _workbook.innerFormats._createFormat(style.numberFormat); } } @@ -972,15 +969,16 @@ class SerializeWorkbook { CellStyleXfs cellXfs; if (style.isGlobalStyle) { cellXfs = CellXfs(); - if (_workbook.globalStyles.containsKey(style.name)) { - (cellXfs as CellXfs).xfId = _workbook.globalStyles[style.name].xfId; + if (_workbook._globalStyles.containsKey(style.name)) { + (cellXfs as CellXfs)._xfId = + _workbook._globalStyles[style.name]._xfId; } } else { cellXfs = CellXfs(); - (cellXfs as CellXfs).xfId = 0; + (cellXfs as CellXfs)._xfId = 0; } final compareFontResult = _workbook._isNewFont(style); - if (!compareFontResult.result) { + if (!compareFontResult._result) { final font = Font(); font.bold = style.bold; font.italic = style.italic; @@ -989,79 +987,79 @@ class SerializeWorkbook { font.underline = style.underline; font.color = ('FF' + style.fontColor.replaceAll('#', '')); _workbook.fonts.add(font); - cellXfs.fontId = _workbook.fonts.length - 1; + cellXfs._fontId = _workbook.fonts.length - 1; } else { - cellXfs.fontId = compareFontResult.index; + cellXfs._fontId = compareFontResult._index; } if (style.backColor != 'none') { final backColor = 'FF' + style.backColor.replaceAll('#', ''); if (_workbook.fills.containsKey(backColor)) { final fillId = _workbook.fills[backColor]; - cellXfs.fillId = fillId; + cellXfs._fillId = fillId; } else { final fillId = _workbook.fills.length + 2; _workbook.fills[backColor] = fillId; - cellXfs.fillId = fillId; + cellXfs._fillId = fillId; } } else { - cellXfs.fillId = 0; + cellXfs._fillId = 0; } //Add border if (!Workbook._isNewBorder(style)) { _workbook.borders.add(style.borders); - cellXfs.borderId = _workbook.borders.length; + cellXfs._borderId = _workbook.borders.length; } else { - cellXfs.borderId = 0; + cellXfs._borderId = 0; } //Add Number Format if (style.numberFormat != 'GENERAL') { - if (_workbook.innerFormats.contains(style.numberFormatIndex)) { + if (_workbook.innerFormats._contains(style.numberFormatIndex)) { final format = _workbook.innerFormats[style.numberFormatIndex]; - cellXfs.numberFormatId = format.index; + cellXfs._numberFormatId = format._index; } else { - cellXfs.numberFormatId = - _workbook.innerFormats.createFormat(style.numberFormat); + cellXfs._numberFormatId = + _workbook.innerFormats._createFormat(style.numberFormat); } } else { if (style.numberFormat == 'GENERAL' && style.numberFormatIndex == 14) { - cellXfs.numberFormatId = 14; + cellXfs._numberFormatId = 14; } else { - cellXfs.numberFormatId = 0; + cellXfs._numberFormatId = 0; } } //Add alignment - cellXfs.alignment = Alignment(); - cellXfs.alignment.indent = style.indent; - cellXfs.alignment.horizontal = + cellXfs._alignment = Alignment(); + cellXfs._alignment.indent = style.indent; + cellXfs._alignment.horizontal = style.hAlign.toString().split('.').toList().removeAt(1).toString(); - cellXfs.alignment.vertical = + cellXfs._alignment.vertical = style.vAlign.toString().split('.').toList().removeAt(1).toString(); - cellXfs.alignment.wrapText = style.wrapText ? 1 : 0; - cellXfs.alignment.rotation = style.rotation; + cellXfs._alignment.wrapText = style.wrapText ? 1 : 0; + cellXfs._alignment.rotation = style.rotation; if (style.isGlobalStyle) { - _workbook.cellStyleXfs.add(cellXfs); - _workbook.cellXfs.add(cellXfs as CellXfs); + _workbook._cellStyleXfs.add(cellXfs); + _workbook._cellXfs.add(cellXfs as CellXfs); } else { //Add cellxfs - _workbook.cellXfs.add(cellXfs as CellXfs); + _workbook._cellXfs.add(cellXfs as CellXfs); } } } /// Serialize number formats. void _saveNumberFormats(final builder) { - final arrFormats = _workbook.innerFormats.getUsedFormats(); + final arrFormats = _workbook.innerFormats._getUsedFormats(); if (arrFormats.isNotEmpty) { builder.element('numFmts', nest: () { builder.attribute('count', arrFormats.length.toString()); for (var i = 0; i < arrFormats.length; i++) { builder.element('numFmt', nest: () { - builder.attribute('numFmtId', arrFormats[i].index.toString()); + builder.attribute('numFmtId', arrFormats[i]._index.toString()); final String formatString = - arrFormats[i].formatString.replaceAll('\'', '\"'); + arrFormats[i]._formatString.replaceAll('\'', '\"'); builder.attribute('formatCode', formatString.toString()); }); } @@ -1194,21 +1192,21 @@ class SerializeWorkbook { void _saveCellStyleXfs(final builder) { builder.element('cellStyleXfs', nest: () { builder.attribute( - 'count', (_workbook.cellStyleXfs.length + 1).toString()); + 'count', (_workbook._cellStyleXfs.length + 1).toString()); builder.element('xf', nest: () { builder.attribute('numFmtId', '0'); builder.attribute('fontId', '0'); builder.attribute('fillId', '0'); builder.attribute('borderId', '0'); }); - if (_workbook.cellStyleXfs.isNotEmpty) { - for (final CellStyleXfs cellStyleXfs in _workbook.cellStyleXfs) { + if (_workbook._cellStyleXfs.isNotEmpty) { + for (final CellStyleXfs cellStyleXfs in _workbook._cellStyleXfs) { builder.element('xf', nest: () { builder.attribute( - 'numFmtId', cellStyleXfs.numberFormatId.toString()); - builder.attribute('fontId', cellStyleXfs.fontId.toString()); - builder.attribute('fillId', cellStyleXfs.fillId.toString()); - builder.attribute('borderId', cellStyleXfs.borderId.toString()); + 'numFmtId', cellStyleXfs._numberFormatId.toString()); + builder.attribute('fontId', cellStyleXfs._fontId.toString()); + builder.attribute('fillId', cellStyleXfs._fillId.toString()); + builder.attribute('borderId', cellStyleXfs._borderId.toString()); }); } } @@ -1218,15 +1216,15 @@ class SerializeWorkbook { /// Serialize cell styles xfs. void _saveCellXfs(final builder) { builder.element('cellXfs', nest: () { - builder.attribute('count', _workbook.cellXfs.length.toString()); - if (_workbook.cellXfs.isNotEmpty) { - for (final CellXfs cellXf in _workbook.cellXfs) { + builder.attribute('count', _workbook._cellXfs.length.toString()); + if (_workbook._cellXfs.isNotEmpty) { + for (final CellXfs cellXf in _workbook._cellXfs) { builder.element('xf', nest: () { - builder.attribute('numFmtId', cellXf.numberFormatId.toString()); - builder.attribute('fontId', cellXf.fontId.toString()); - builder.attribute('fillId', cellXf.fillId.toString()); - builder.attribute('borderId', cellXf.borderId.toString()); - builder.attribute('xfId', cellXf.xfId.toString()); + builder.attribute('numFmtId', cellXf._numberFormatId.toString()); + builder.attribute('fontId', cellXf._fontId.toString()); + builder.attribute('fillId', cellXf._fillId.toString()); + builder.attribute('borderId', cellXf._borderId.toString()); + builder.attribute('xfId', cellXf._xfId.toString()); _saveAlignment(cellXf, builder); }); } @@ -1237,25 +1235,26 @@ class SerializeWorkbook { /// Serialize alignment. void _saveAlignment(CellStyleXfs cellXf, final builder) { builder.element('alignment', nest: () { - if (cellXf.alignment.horizontal != null) { + if (cellXf._alignment.horizontal != null) { builder.attribute( - 'horizontal', cellXf.alignment.horizontal.toLowerCase()); + 'horizontal', cellXf._alignment.horizontal.toLowerCase()); } - if (cellXf.alignment.indent != 0) { - builder.attribute('indent', cellXf.alignment.indent.toString()); - } else if (cellXf.alignment.rotation != 0) { - builder.attribute('textRotation', cellXf.alignment.rotation.toString()); + if (cellXf._alignment.indent != 0) { + builder.attribute('indent', cellXf._alignment.indent.toString()); + } else if (cellXf._alignment.rotation != 0) { + builder.attribute( + 'textRotation', cellXf._alignment.rotation.toString()); } - if (cellXf.alignment.vertical != null) { - builder.attribute('vertical', cellXf.alignment.vertical.toLowerCase()); + if (cellXf._alignment.vertical != null) { + builder.attribute('vertical', cellXf._alignment.vertical.toLowerCase()); } - builder.attribute('wrapText', cellXf.alignment.wrapText.toString()); + builder.attribute('wrapText', cellXf._alignment.wrapText.toString()); }); } /// Serialize cell styles. void _saveGlobalCellstyles(final builder) { - final length = _workbook.globalStyles.length + 1; + final length = _workbook._globalStyles.length + 1; builder.element('cellStyles', nest: () { builder.attribute('count', length.toString()); builder.element('cellStyle', nest: () { @@ -1263,15 +1262,15 @@ class SerializeWorkbook { builder.attribute('xfId', '0'); builder.attribute('builtinId', '0'); }); - _workbook.globalStyles.forEach((key, value) { + _workbook._globalStyles.forEach((key, value) { builder.element('cellStyle', nest: () { if (key != null) { builder.attribute('name', key); builder.attribute( - 'xfId', _workbook.globalStyles[key].xfId.toString()); - if (_workbook.globalStyles[key].builtinId != 0) { + 'xfId', _workbook._globalStyles[key]._xfId.toString()); + if (_workbook._globalStyles[key]._builtinId != 0) { builder.attribute('builtinId', - _workbook.globalStyles[key].builtinId.toString()); + _workbook._globalStyles[key]._builtinId.toString()); } } }); @@ -1284,21 +1283,21 @@ class SerializeWorkbook { Range cell, int rowIndex, MergedCellCollection mergeCells) { if (cell.rowSpan != 0 || cell.columnSpan != 0) { final mCell = MergeCell(); - mCell.x = cell.index; + mCell.x = cell._index; mCell.width = cell.columnSpan; mCell.y = rowIndex; mCell.height = cell.rowSpan; - final startCell = Range.getCellName(mCell.y, mCell.x); - final endCell = - Range.getCellName(rowIndex + mCell.height, cell.index + mCell.width); + final startCell = Range._getCellName(mCell.y, mCell.x); + final endCell = Range._getCellName( + rowIndex + mCell.height, cell._index + mCell.width); mCell._reference = startCell + ':' + endCell; mergeCells.addCell(mCell); - final start = ExtendCell(); - start.x = mCell.x; - start.y = mCell.y; - final end = ExtendCell(); - end.x = cell.index + mCell.width; - end.y = rowIndex + mCell.height; + final start = _ExtendCell(); + start._x = mCell.x; + start._y = mCell.y; + final end = _ExtendCell(); + end._x = cell._index + mCell.width; + end._y = rowIndex + mCell.height; _updatedMergedCellStyles(start, end, cell); } return mergeCells; @@ -1306,18 +1305,18 @@ class SerializeWorkbook { /// Update merged cell styles void _updatedMergedCellStyles( - ExtendCell sCell, ExtendCell eCell, Range cell) { + _ExtendCell sCell, _ExtendCell eCell, Range cell) { final workbook = cell.workbook; - for (int x = sCell.x; x <= eCell.x; x++) { - for (int y = sCell.y; y <= eCell.y; y++) { - final extendStyle = ExtendStyle(); - extendStyle.x = x; - extendStyle.y = y; - extendStyle.styleIndex = cell._styleIndex; - if (workbook.mergedCellsStyle.containsKey(Range.getCellName(y, x))) { - workbook.mergedCellsStyle.remove(Range.getCellName(y, x)); + for (int x = sCell._x; x <= eCell._x; x++) { + for (int y = sCell._y; y <= eCell._y; y++) { + final extendStyle = _ExtendStyle(); + extendStyle._x = x; + extendStyle._y = y; + extendStyle._styleIndex = cell._styleIndex; + if (workbook._mergedCellsStyle.containsKey(Range._getCellName(y, x))) { + workbook._mergedCellsStyle.remove(Range._getCellName(y, x)); } - workbook.mergedCellsStyle[Range.getCellName(y, x)] = extendStyle; + workbook._mergedCellsStyle[Range._getCellName(y, x)] = extendStyle; } } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/workbook.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/workbook.dart index 331418b0..74ae4ca5 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/workbook.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/general/workbook.dart @@ -4,26 +4,26 @@ part of xlsio; class Workbook { /// Creates an new instances of the Workbook. Workbook([int count]) { - initializeWorkbook(null, null, count); + _initializeWorkbook(null, null, count); } /// Creates an new instances of the Workbook with currency. Workbook.withCulture(String culture, [String currency, int count]) { if (count != null) { - initializeWorkbook(culture, currency, count); + _initializeWorkbook(culture, currency, count); } else { - initializeWorkbook(culture, currency, 1); + _initializeWorkbook(culture, currency, 1); } } /// Represents zip archive to save the workbook. - Archive _archive; + Archive _archives; /// Represents the shared string dictionary. Map _sharedString; /// Represents the shared string count in the workbook. - int sharedStringCount = 0; + int _sharedStringCount = 0; /// Represents the maximum row count in the workbook. final int _maxRowCount = 1048576; @@ -32,10 +32,10 @@ class Workbook { final int _maxColumnCount = 16384; /// Represents the cell style collection in the workbok. - Map _cellStyles; + Map _cellStyles; /// Represents the merged cell collection in the workbok. - Map _mergedCellsStyle; + Map _mergedCellsStyles; /// Represents the worksheet collection. WorksheetCollection _worksheets; @@ -56,28 +56,29 @@ class Workbook { StylesCollection _styles; /// Represents the CellXf collection in the workbook. - List cellXfs; + List _cellXfs; /// Represents the CellStyleXf collection in the workbook. - List cellStyleXfs; + List _cellStyleXfs; /// Represents the print title collection. Map _printTitles; /// Represents the current culture. - String culture; + String _culture; /// Represents the current culture currency. - String currency; + // ignore: unused_field + String _currency; /// Represents the RGB colors. Map _rgbColors; /// Represents the drawing count in the workbook. - int drawingCount = 0; + int _drawingCount = 0; /// Represents the image count in the workbook. - int imageCount = 0; + int _imageCount = 0; /// Represents the chart count in the workbook. int chartCount = 0; @@ -89,7 +90,8 @@ class Workbook { FormatsCollection _rawFormats; /// Indicates whether all the formula in the workbook is evaluated. - bool enabledCalcEngine; + // ignore: unused_field + bool _enabledCalcEngine; /// Represents the culture info. CultureInfo _cultureInfo; @@ -108,66 +110,40 @@ class Workbook { 96 / 72.0 / 12700 // EMU ]; - /// Indicates whether the workbook is Parsed. - // bool get isParsed { - // return _isParsing; - // } - - // set isParsed(bool value) { - // _isParsing = value; - // } - /// Represents zip archive to save the workbook. Archive get archive { - _archive ??= Archive(); - return _archive; + _archives ??= Archive(); + return _archives; } set archive(Archive value) { - _archive = value; + _archives = value; } /// Represents the shared string list. - Map get sharedStrings { + Map get _sharedStrings { return _sharedString; } - // set sharedStrings(Map value) { - // _sharedString = value; - // } - - /// Represents the shared string count in the workbook. - // int get sharedStringCount { - // return _sharedStringCount; - // } - - // set sharedStringCount(int value) { - // _sharedStringCount = value; - // } - /// Gets dictionary with default content types. - Map get defaultContentTypes { + Map get _defaultContentType { return _defaultContentTypes; } /// Represents the cell style collection in the workbok. - Map get globalStyles { - _cellStyles ??= {}; + Map get _globalStyles { + _cellStyles ??= {}; return _cellStyles; } - set globalStyles(Map value) { - _cellStyles = value; - } - /// Represents the merged cell collection in the workbok. - Map get mergedCellsStyle { - _mergedCellsStyle ??= {}; - return _mergedCellsStyle; + Map get _mergedCellsStyle { + _mergedCellsStyles ??= {}; + return _mergedCellsStyles; } - set mergedCellsStyle(Map value) { - _mergedCellsStyle = value; + set _mergedCellsStyle(Map value) { + _mergedCellsStyles = value; } /// Represents the worksheet collection. @@ -186,80 +162,17 @@ class Workbook { _builtInProperties = value; } - // /// Represents the border collection in the workbook. - // List get borders { - // return _borders; - // } - - // set borders(List value) { - // _borders = value; - // } - - // /// Represents the Fill collection in the workbook. - // Map get fills { - // return _fills; - // } - - // set fills(Map value) { - // _fills = value; - // } - /// Represents the cell style collection in the workbook. StylesCollection get styles { _styles ??= StylesCollection(this); return _styles; } - // /// Represents the CellXf collection in the workbook. - // List get cellXfs { - // return _cellXfs; - // } - - // set cellXfs(List value) { - // _cellXfs = value; - // } - - // /// Represents the CellStyleXf collection in the workbook. - // List get cellStyleXfs { - // return _cellStyleXfs; - // } - - // set cellStyleXfs(List value) { - // _cellStyleXfs = value; - // } - /// Represents the unit conversion list. - List get unitProportions { + List get _unitProportions { return _unitsProportions; } - /// Represents the print title collection. - // Map get printTitles { - // return _printTitles; - // } - - // set printTitles(Map value) { - // _printTitles = value; - // } - - // /// Represents the current culture. - // String get culture { - // return _culture; - // } - - // set culture(String value) { - // _culture = value; - // } - - // /// Represents the current culture currency. - // String get currency { - // return _currency; - // } - - // set currency(String value) { - // _currency = value; - // } - /// Represents the current culture info. CultureInfo get cultureInfo { return _cultureInfo; @@ -271,19 +184,19 @@ class Workbook { } /// Initialize the workbook. - void initializeWorkbook( + void _initializeWorkbook( String givenCulture, String givenCurrency, int count) { if (givenCulture != null) { - culture = givenCulture; + _culture = givenCulture; } else { - culture = 'en-US'; + _culture = 'en-US'; } if (givenCurrency != null) { - currency = givenCurrency; + _currency = givenCurrency; } else { - currency = 'USD'; + _currency = 'USD'; } - _cultureInfo = CultureInfo(culture); + _cultureInfo = CultureInfo(_culture); _initialize(); if (count != null) { _worksheets = WorksheetCollection(this, count); @@ -298,14 +211,16 @@ class Workbook { borders = []; _styles = StylesCollection(this); _rawFormats = FormatsCollection(this); - _rawFormats.insertDefaultFormats(); + _rawFormats._insertDefaultFormats(); fills = {}; _styles.addStyle(CellStyle(this)); fonts.add(Font()); - cellXfs = []; - cellStyleXfs = []; - drawingCount = 0; - imageCount = 0; + _cellXfs = []; + _cellStyleXfs = []; + _drawingCount = 0; + _imageCount = 0; + _sharedStringCount = 0; + chartCount = 0; } /// Saves workbook with the specified file name. @@ -315,7 +230,7 @@ class Workbook { } _saving = true; final SerializeWorkbook serializer = SerializeWorkbook(this); - serializer.saveInternal(); + serializer._saveInternal(); final bytes = ZipEncoder().encode(archive); File(fileName).writeAsBytes(bytes); @@ -326,7 +241,7 @@ class Workbook { List saveStream() { _saving = true; final SerializeWorkbook serializer = SerializeWorkbook(this); - serializer.saveInternal(); + serializer._saveInternal(); final bytes = ZipEncoder().encode(archive); _saving = false; @@ -334,7 +249,7 @@ class Workbook { } /// Check whether the cell style font already exists. - ExtendCompareStyle _isNewFont(CellStyle toCompareStyle) { + _ExtendCompareStyle _isNewFont(CellStyle toCompareStyle) { bool result = false; int index = 0; for (final Font font in fonts) { @@ -354,15 +269,15 @@ class Workbook { } } index -= 1; - final ExtendCompareStyle style = ExtendCompareStyle(); - style.index = index; - style.result = result; + final _ExtendCompareStyle style = _ExtendCompareStyle(); + style._index = index; + style._result = result; return style; } /// Check whether the cell border already exists. static bool _isNewBorder(CellStyle toCompareStyle) { - final CellStyle bStyle = CellStyle(toCompareStyle.workbook); + final CellStyle bStyle = CellStyle(toCompareStyle._workbook); if (_isAllBorder(toCompareStyle.borders)) { return (bStyle.borders.all.color == toCompareStyle.borders.all.color && bStyle.borders.all.lineStyle == toCompareStyle.borders.all.lineStyle); @@ -384,25 +299,25 @@ class Workbook { /// Check if line style and color is applied for all borders. static bool _isAllBorder(Borders toCompareBorder) { - final CellStyle allBorderStyle = CellStyle(toCompareBorder.workbook); + final CellStyle allBorderStyle = CellStyle(toCompareBorder._workbook); return allBorderStyle.borders.all.color != toCompareBorder.all.color || allBorderStyle.borders.all.lineStyle != toCompareBorder.all.lineStyle; } /// Gets the culture info. - CultureInfo getCultureInfo() { + CultureInfo _getCultureInfo() { return _cultureInfo; } /// Dispose objects. void dispose() { - if (_archive != null) { - _archive.files.clear(); - _archive = null; + if (_archives != null) { + _archives.files.clear(); + _archives = null; } if (_worksheets != null) { - _worksheets.clear(); + _worksheets._clear(); _worksheets = null; } @@ -437,23 +352,23 @@ class Workbook { } if (_styles != null) { - _styles.clear(); + _styles._clear(); _styles = null; } - if (cellXfs != null) { - cellXfs.clear(); - cellXfs = null; + if (_cellXfs != null) { + _cellXfs.clear(); + _cellXfs = null; } if (_rawFormats != null) { - _rawFormats.clear(); + _rawFormats._clear(); _rawFormats = null; } - if (cellStyleXfs != null) { - cellStyleXfs.clear(); - cellStyleXfs = null; + if (_cellStyleXfs != null) { + _cellStyleXfs.clear(); + _cellStyleXfs = null; } if (_printTitles != null) { diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/picture.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/picture.dart index 7e862970..0ead89ba 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/picture.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/picture.dart @@ -16,9 +16,6 @@ class Picture { static const List _jpegSignature = [255, 216]; static const List _pngSignature = [137, 80, 78, 71, 13, 10, 26, 10]; - /// Gets/Sets the image String. - String image; - /// Gets/Sets the image data. List _imageData; @@ -89,7 +86,7 @@ class Picture { } /// clear the image data. - void clear() { + void _clear() { if (_imageData != null) { _imageData = null; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/pictures_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/pictures_collection.dart index 8074ebed..0b3a9ab8 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/pictures_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/images/pictures_collection.dart @@ -74,10 +74,10 @@ class PicturesCollection { } /// clear the Picture. - void clear() { + void _clear() { if (_pictures != null) { for (final Picture picture in _pictures) { - picture.clear(); + picture._clear(); } _pictures.clear(); } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/extend_style.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/extend_style.dart index 17bcbb28..c31301d4 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/extend_style.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/extend_style.dart @@ -1,13 +1,16 @@ part of xlsio; /// Represent Extended format style. -class ExtendStyle { +class _ExtendStyle { /// Gets/Sets X value. - int x; + // ignore: unused_field + int _x; /// Gets/Sets Y value. - int y; + // ignore: unused_field + int _y; /// Gets/Sets style index. - int styleIndex; + // ignore: unused_field + int _styleIndex; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/merge_cells.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/merge_cells.dart index d3f18b59..43300bd3 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/merge_cells.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/merged_cells/merge_cells.dart @@ -20,10 +20,10 @@ class MergeCell { /// Represents the extended format cell -class ExtendCell { +class _ExtendCell { /// Gets/Sets X value. - int x; + int _x; /// Gets/Sets Y value. - int y; + int _y; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/column_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/column_collection.dart index 5f88f623..242e56cf 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/column_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/column_collection.dart @@ -80,7 +80,7 @@ class ColumnCollection { } /// clear the column. - void clear() { + void _clear() { if (_innerList != null) { _innerList.clear(); } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range.dart index d4c3c8e8..78ff1ed6 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range.dart @@ -7,7 +7,6 @@ class Range { _worksheet = worksheet; } - // Fields /// Represents the row in range. int row; @@ -19,13 +18,12 @@ class Range { /// Represents the last column in range. int lastColumn; - String _rowColumn; /// Represents the cell type. CellType type; /// Represents the save type. - String saveType; + String _saveType; String _formula; double _number; String _text; @@ -34,9 +32,9 @@ class Range { Style _cellStyle; /// Represent the index of the Range. - int index; + int _index; int _textIndex; - Column _colObj; + Column _columnObj; Worksheet _worksheet; int _styleIndex; BuiltInStyles _builtInStyle; @@ -56,7 +54,7 @@ class Range { bool _isDefaultFormat = true; /// General format. - static const String DEF_GENERAL_FORMAT = 'General'; + static const String _defaultGeneralFormat = 'General'; /// Whitspace for the numberformat. static const String _defaultEmptyDigit = ' '; @@ -67,10 +65,6 @@ class Range { ///Equivalent symbol for formula. static const String _defaultEquivalent = '='; - // set index(int value) { - // _index = value; - // } - /// Gets the Range reference along with its sheet name in format "'Sheet1'!$A$1". Read-only. /// /// ```dart @@ -83,33 +77,19 @@ class Range { /// ``` String get addressGlobal { final String result = worksheet.name + '!'; - final String cell0 = '\$' + getCellNameWithSymbol(row, column); + final String cell0 = '\$' + _getCellNameWithSymbol(row, column); if (isSingleRange) { return result + cell0; } else { - final String cell1 = '\$' + getCellNameWithSymbol(lastRow, lastColumn); + final String cell1 = '\$' + _getCellNameWithSymbol(lastRow, lastColumn); return result + cell0 + ':' + cell1; } } - // /// Index of an sharedstring used for text. - // int get textIndex { - // return _textIndex; - // } - - // set textIndex(int value) { - // _textIndex = value; - // } - - /// Represent the address of the range. - String get rowColumn { - return _rowColumn; - } - /// Represents the reference name. - String get refName { - return getCellName(row, column); + String get addressLocal { + return _getCellName(row, column); } /// Represent the range formula. @@ -117,7 +97,7 @@ class Range { if (isSingleRange) { return _formula; } else { - return getRangeFormula(); + return getFormula(); } } @@ -140,7 +120,7 @@ class Range { if (isSingleRange) { return _number; } else { - return getRangeNumber(); + return _getNumber(); } } @@ -162,7 +142,7 @@ class Range { if (isSingleRange) { return _text; } else { - return getRangeText(); + return getText(); } } @@ -185,7 +165,7 @@ class Range { if (isSingleRange) { return _dateTime; } else { - return getRangeDateTime(); + return getDateTime(); } } @@ -254,8 +234,8 @@ class Range { String get calculatedValue { if (formula != null) { if (worksheet.calcEngine != null) { - final String cellRef = refName; - return worksheet.calcEngine.pullUpdatedValue(cellRef); + final String cellRef = addressLocal; + return worksheet.calcEngine._pullUpdatedValue(cellRef); } return null; } else { @@ -289,11 +269,11 @@ class Range { } if (format != null && format != '') { if (format.contains('\\')) { - format = checkAndGetDateUncustomizedString(format); + format = _checkAndGetDateUncustomizedString(format); } - format = checkForAccountingString(format); - format.replaceAllMapped(FormatParserImpl._numberFormatRegex, (match) { + format = _checkForAccountingString(format); + format.replaceAllMapped(_FormatParser._numberFormatRegex, (match) { return ''; }); } @@ -332,10 +312,10 @@ class Range { } /// Gets number format object corresponding to this Range. Read-only. - FormatImpl get innerNumberFormat { + _Format get _innerNumberFormat { int iFormatIndex = cellStyle.numberFormatIndex; if (workbook.innerFormats.count > 14 && - !workbook.innerFormats.contains(iFormatIndex)) iFormatIndex = 14; + !workbook.innerFormats._contains(iFormatIndex)) iFormatIndex = 14; return workbook.innerFormats[iFormatIndex]; } @@ -367,7 +347,7 @@ class Range { } else if (_cellStyle != null && !workbook._saving && (_cellStyle as CellStyle).isGlobalStyle) { - _cellStyle = (_cellStyle as CellStyle).clone(); + _cellStyle = (_cellStyle as CellStyle)._clone(); } return _cellStyle; } @@ -389,7 +369,7 @@ class Range { /// ``` set cellStyle(CellStyle value) { if (isSingleRange) { - _cellStyle = value.clone(); + _cellStyle = value._clone(); _setRange(); } else { // ignore: prefer_final_locals @@ -406,11 +386,6 @@ class Range { } } - /// Represent the column object of the range. - Column get columnObj { - return _colObj; - } - /// Represent the worksheet of the range. Worksheet get worksheet { return _worksheet; @@ -503,8 +478,8 @@ class Range { /// Represents the column width. double get columnWidth { - if (_colObj != null) { - return _colObj.width; + if (_columnObj != null) { + return _columnObj.width; } return 0; } @@ -521,15 +496,15 @@ class Range { /// ``` set columnWidth(double value) { if (isSingleRange) { - if (_colObj == null) { + if (_columnObj == null) { if (worksheet.columns != null && worksheet.columns.contains(column)) { - _colObj = worksheet.columns.getColumn(column); + _columnObj = worksheet.columns.getColumn(column); } else { - _colObj = worksheet.columns.add(); - _colObj.index = column; + _columnObj = worksheet.columns.add(); + _columnObj.index = column; } } - _colObj.width = value; + _columnObj.width = value; } else { // ignore: prefer_final_locals for (int iRow = row, iLastRow = lastRow; iRow <= iLastRow; iRow++) { @@ -557,7 +532,7 @@ class Range { /// workbook.dispose(); /// ``` List get cells { - if (_cells == null && !_bCells) infillCells(); + if (_cells == null && !_bCells) _infillCells(); if (_cells == null) throw Exception('Null cells'); return _cells; } @@ -589,7 +564,7 @@ class Range { if (isSingleRange) { _number = number; type = CellType.number; - saveType = 'n'; + _saveType = 'n'; _setRange(); } else { // ignore: prefer_final_locals @@ -605,7 +580,7 @@ class Range { } /// Set number value to the range. - double getRangeNumber() { + double _getNumber() { final double dValue = worksheet.getRangeByIndex(row, column).number; if (dValue == null) return dValue; // ignore: prefer_final_locals @@ -631,18 +606,18 @@ class Range { /// ``` void setText(String text) { int sharedStringIndex = 0; - if (workbook.sharedStrings != null && - workbook.sharedStrings.containsKey(text)) { - sharedStringIndex = workbook.sharedStrings[text]; + if (workbook._sharedStrings != null && + workbook._sharedStrings.containsKey(text)) { + sharedStringIndex = workbook._sharedStrings[text]; } else { - sharedStringIndex = workbook.sharedStrings.length; - workbook.sharedStrings[text] = sharedStringIndex; - workbook.sharedStringCount++; + sharedStringIndex = workbook._sharedStrings.length; + workbook._sharedStrings[text] = sharedStringIndex; + workbook._sharedStringCount++; } if (isSingleRange) { _text = text; type = CellType.text; - saveType = 's'; + _saveType = 's'; _textIndex = sharedStringIndex; _setRange(); } else { @@ -659,7 +634,7 @@ class Range { } /// Get text value to the range. - String getRangeText() { + String getText() { final String strValue = worksheet.getRangeByIndex(row, column).text; if (strValue == null) { return null; @@ -703,11 +678,11 @@ class Range { _cellStyle.numberFormatIndex = 14; } if (isSingleRange) { - _number = toOADate(dateTime); + _number = _toOADate(dateTime); _dateTime = dateTime; type = CellType.dateTime; _cellStyle = _cellStyle; - saveType = 'n'; + _saveType = 'n'; _setRange(); } else { // ignore: prefer_final_locals @@ -723,7 +698,7 @@ class Range { } /// Get Range Date time value. - DateTime getRangeDateTime() { + DateTime getDateTime() { final DateTime minimumDateValue = DateTime(0001, 1, 1, 0, 0, 0); Range range = worksheet.getRangeByIndex(row, column); final double dValue = range.number; @@ -773,7 +748,7 @@ class Range { } /// Get formula value to the range. - String getRangeFormula() { + String getFormula() { final String strValue = worksheet.getRangeByIndex(row, column).formula; if (strValue == null) return strValue; // ignore: prefer_final_locals @@ -823,20 +798,20 @@ class Range { } /// Set formula number value to the range. - void setFormulaNumberValue(double number) { + void _setFormulaNumberValue(double number) { _number = number; } /// Set formula string value to the range. - void setFormulaStringValue(String text) { + void _setFormulaStringValue(String text) { _text = text; - saveType = 'str'; + _saveType = 'str'; } /// Set formula DateTime value to the range. - void setFormulaDateValue(DateTime dateTime) { + void _setFormulaDateValue(DateTime dateTime) { _dateTime = dateTime; - _number = toOADate(dateTime); + _number = _toOADate(dateTime); if (_cellStyle != null) { _cellStyle = CellStyle(workbook); } @@ -844,33 +819,33 @@ class Range { } /// Set formula boolean value. - void setFormulaBooleanValue(String value) { + void _setFormulaBooleanValue(String value) { if (value == 'TRUE') { _boolean = '1'; } else { _boolean = '0'; } - saveType = 'b'; + _saveType = 'b'; } /// Set formula error string value. - void setFormulaErrorStringValue(String eValue) { + void _setFormulaErrorStringValue(String eValue) { _errorValue = eValue.split(' ').toList().removeAt(1).toString(); - saveType = 'e'; + _saveType = 'e'; } /// Get cell name from row and column. - static String getCellName(int row, int column) { - return getColumnName(column) + row.toString(); + static String _getCellName(int row, int column) { + return _getColumnName(column) + row.toString(); } /// Get cell name from row and column. - static String getCellNameWithSymbol(int row, int column) { - return getColumnName(column) + '\$' + row.toString(); + static String _getCellNameWithSymbol(int row, int column) { + return _getColumnName(column) + '\$' + row.toString(); } /// Get column name from column. - static String getColumnName(int col) { + static String _getColumnName(int col) { col--; String strColumnName = ''; do { @@ -882,7 +857,7 @@ class Range { } /// Check for escape sequence added string and removes it. - String checkAndGetDateUncustomizedString(String inputFormat) { + String _checkAndGetDateUncustomizedString(String inputFormat) { bool removed = false; if ((inputFormat.contains(',') || inputFormat.contains('.') || @@ -917,10 +892,10 @@ class Range { } /// Check for quotes added to format string. - String checkForAccountingString(String inputFormat) { + String _checkForAccountingString(String inputFormat) { if ((inputFormat.contains('\"'))) { final String currencySymbol = - workbook.cultureInfo.numberFormat.currencySymbol; + workbook.cultureInfo.numberFormat._currencySymbol; final int currencyIndex = inputFormat.indexOf(currencySymbol); if (currencyIndex != -1) { inputFormat = inputFormat.replaceAll( @@ -944,21 +919,21 @@ class Range { case CellType.number: case CellType.dateTime: final double dValue = number; - return getNumberOrDateTime(innerNumberFormat, dValue, row, column); + return _getNumberOrDateTime(_innerNumberFormat, dValue, row, column); break; case CellType.formula: - final bool bUpdate = updateNumberFormat(); - updateCellValue(worksheet, column, row, true); - FormatImpl formatImpl; + final bool bUpdate = _updateNumberFormat(); + _updateCellValue(worksheet, column, row, true); + _Format formatImpl; if (bUpdate) { formatImpl = worksheet.workbook.innerFormats[_cellStyle.numberFormatIndex]; } else { - formatImpl = innerNumberFormat; + formatImpl = _innerNumberFormat; } if (text != null) return text; if (number != null || dateTime != null) { - return getNumberOrDateTime(formatImpl, number, row, column); + return _getNumberOrDateTime(formatImpl, number, row, column); } break; default: @@ -968,10 +943,10 @@ class Range { } /// Gets the number or date time. - String getNumberOrDateTime( - FormatImpl formatImpl, double dValue, int row, int column) { + String _getNumberOrDateTime( + _Format formatImpl, double dValue, int row, int column) { String displayText = ''; - final ExcelFormatType formatType1 = formatImpl.getFormatTypeFromDouble(0); + final ExcelFormatType formatType1 = formatImpl._getFormatTypeFromDouble(0); switch (formatType1) { case ExcelFormatType.number: @@ -986,7 +961,7 @@ class Range { return '#DIV/0!'; } else { final NumberFormat formatter = - NumberFormat(numberFormat, workbook.culture); + NumberFormat(numberFormat, workbook._culture); String displayText = formatter.format(dValue); if (displayText.contains('\$') || displayText.endsWith('*')) { if (displayText.startsWith('_(')) { @@ -1007,12 +982,12 @@ class Range { dValue = number; if (dValue < 60) dValue++; if (dValue > - toOADate(workbook - .cultureInfo.dateTimeFormat.maxSupportedDateTime) || + _toOADate(workbook + .cultureInfo.dateTimeFormat._maxSupportedDateTime) || (dValue < 0)) { displayText = '######'; } else { - displayText = formatImpl.applyFormat(dValue, false, this); + displayText = formatImpl._applyFormat(dValue, false, this); } } return displayText; @@ -1024,22 +999,22 @@ class Range { } /// Update the cell value when calc engine is enabled. - static void updateCellValue( + static void _updateCellValue( Worksheet worksheet, int column, int row, bool updateCellVaue) { if (worksheet.calcEngine != null && updateCellVaue) { - final String cellRef = RangeInfo.getAlphaLabel(column) + row.toString(); - worksheet.calcEngine.pullUpdatedValue(cellRef); + final String cellRef = RangeInfo._getAlphaLabel(column) + row.toString(); + worksheet.calcEngine._pullUpdatedValue(cellRef); } } /// Updates the format for formula based display text. - bool updateNumberFormat() { + bool _updateNumberFormat() { final CalcEngine calcEngine = _worksheet.calcEngine; bool updated = false; - if (numberFormat == DEF_GENERAL_FORMAT && formula != null) { + if (numberFormat == _defaultGeneralFormat && formula != null) { final DateTimeFormatInfo dateTime = worksheet.workbook.cultureInfo.dateTimeFormat; - final String formula = getFormula(this.formula); + final String formula = _getFormulaWithoutSymbol(this.formula); switch (formula) { case 'TIME': numberFormat = dateTime.shortTimePattern; @@ -1064,14 +1039,14 @@ class Range { if (calcEngine != null && !calcEngine.excelLikeComputations) { calcEngine.excelLikeComputations = true; } - } else if (calcEngine != null && numberFormat != DEF_GENERAL_FORMAT) { + } else if (calcEngine != null && numberFormat != _defaultGeneralFormat) { calcEngine.excelLikeComputations = false; } return updated; } /// Returns the formula function name. - static String getFormula(String formula) { + static String _getFormulaWithoutSymbol(String formula) { if (formula != null) { formula = formula.replaceAll(_defaultEquivalent, _defaultEmptyDigit); formula = formula.trim(); @@ -1149,7 +1124,7 @@ class Range { } /// Convert date to OA value. - static double toOADate(DateTime date) { + static double _toOADate(DateTime date) { var ticks = 0; ticks = _dateToTicks(date.year, (date.month), date.day) + _timeToTicks(date.hour, date.minute, date.second); @@ -1170,7 +1145,7 @@ class Range { } /// Returns a DateTime equivalent to the specified OLE Automation Date. - static DateTime fromOADate(double doubleOLEValue) { + static DateTime _fromOADate(double doubleOLEValue) { if (doubleOLEValue < -657435.0 || doubleOLEValue > 2958465.99999999) { throw Exception('Not an valid OLE value.'); } @@ -1262,7 +1237,7 @@ class Range { } /// Fill internal collection by references on cells. - void infillCells() { + void _infillCells() { if (!_bCells) { _cells = []; @@ -1280,9 +1255,9 @@ class Range { } /// Releases the unmanaged resources used by the XmlReader and optionally releases the managed resources. - void clear() { + void _clear() { if (_cellStyle != null) { - (_cellStyle as CellStyle).clear(); + (_cellStyle as CellStyle)._clear(); _cellStyle = null; } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range_collection.dart index 64b3da9f..eed2402a 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/range_collection.dart @@ -39,13 +39,13 @@ class RangeCollection { /// Indexer set of the class operator []=(index, value) { if (_iCount <= index) { - updateSize(index + 1); + _updateSize(index + 1); } _innerList[index] = value; } /// Updates count of storage array. - void updateSize(int iCount) { + void _updateSize(int iCount) { if (iCount > _iCount) { final int iBufCount = _iCount * 2; @@ -67,13 +67,13 @@ class RangeCollection { } /// clear the Range. - void clear() { + void _clear() { if (_innerList != null) { for (int i = 0; i < _innerList.length; i++) { final Range range = _innerList[i]; _innerList[i] = null; - if (range != null) range.clear(); + if (range != null) range._clear(); } _innerList = null; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row.dart index 1119c943..2c0ecab6 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row.dart @@ -42,9 +42,9 @@ class Row { } /// clear the row. - void clear() { + void _clear() { if (_ranges != null) { - _ranges.clear(); + _ranges._clear(); } } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row_collection.dart index 124eb735..68f10358 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/range/row_collection.dart @@ -72,13 +72,13 @@ class RowCollection { } /// Clear the row. - void clear() { + void _clear() { if (_innerList != null) { for (int i = 0; i < _innerList.length; i++) { final Row row = _innerList[i]; _innerList[i] = null; - if (row != null) row.clear(); + if (row != null) row._clear(); } _innerList = null; } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet.dart index b0c19927..810f378d 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet.dart @@ -8,16 +8,7 @@ class Worksheet { } /// set summary row below - /// True if summary row is below. otherwise, False. - /// - /// ```dart - /// Workbook workbook = new Workbook(); - /// Worksheet sheet = workbook.worksheets[0]; - /// sheet.isSummaryRowBelow = false; - /// workbook.save('IsSummaryBelow.xlsx'); - /// workbook.dispose(); - /// ``` - bool isSummaryRowBelow = true; + final bool _isSummaryRowBelow = true; /// Represent the worksheet index. int index; @@ -150,14 +141,14 @@ class Worksheet { if (range == null) { range = Range(this); range.row = rowIndex; - range.column = range.index = columnIndex; + range.column = range._index = columnIndex; } range.lastRow = rowIndex; range.lastColumn = columnIndex; } else { range = Range(this); range.row = rowIndex; - range.column = range.index = columnIndex; + range.column = range._index = columnIndex; range.lastRow = lastRowIndex; range.lastColumn = lastColumnIndex; } @@ -229,15 +220,15 @@ class Worksheet { } /// Convert seconds into minute and minutes into hour. - static String convertSecondsMinutesToHours(String value, double dNumber) { + static String _convertSecondsMinutesToHours(String value, double dNumber) { bool isDateValue = false; if ((dNumber % 1) == 0) isDateValue = true; final CultureInfo currentCulture = CultureInfo.currentCulture; if (!isDateValue && (dNumber > -657435.0) && (dNumber < 2958465.99999999) && - Range.fromOADate(dNumber).millisecond > - SecondToken._defaultMilliSecondHalf) { + Range._fromOADate(dNumber).millisecond > + _SecondToken._defaultMilliSecondHalf) { final String decimalSeparator = currentCulture.numberFormat.numberDecimalSeparator; final RegExp regex = RegExp('([0-9]*:[0-9]*:[0-9]*\"' + @@ -249,10 +240,10 @@ class Worksheet { final matches = regex.allMatches(value); for (final Match match in matches) { final String semiColon = currentCulture.dateTimeFormat.timeSeparator; - final String valueFormat = SecondToken._defaultFormatLong; + final String valueFormat = _SecondToken._defaultFormatLong; final List timeValues = match.pattern.toString().split(semiColon.toString()); - final int minutesValue = Range.fromOADate(dNumber).minute; + final int minutesValue = Range._fromOADate(dNumber).minute; String updatedValue = timeValues[0]; int updateMinutesValue = 0; switch (timeValues.length) { @@ -270,7 +261,7 @@ class Worksheet { } break; case 3: - final int secondsValue = Range.fromOADate(dNumber).second; + final int secondsValue = Range._fromOADate(dNumber).second; final int updatedSecondsValue = secondsValue + (timeValues[timeValues.length - 1].contains(decimalSeparator) ? 0 @@ -353,12 +344,12 @@ class Worksheet { /// sheet.enableSheetCalculations(); /// ``` void enableSheetCalculations() { - _book.enabledCalcEngine = true; + _book._enabledCalcEngine = true; if (calcEngine == null) { CalcEngine.parseArgumentSeparator = - _book.getCultureInfo().textInfo.argumentSeparator; + _book._getCultureInfo().textInfo.argumentSeparator; CalcEngine.parseDecimalSeparator = - _book.getCultureInfo().numberFormat.numberDecimalSeparator; + _book._getCultureInfo().numberFormat.numberDecimalSeparator; calcEngine = CalcEngine(this); calcEngine.useDatesInCalculations = true; @@ -379,7 +370,7 @@ class Worksheet { (CalcEngine._modelToSheetID.containsKey(sheet))) { CalcEngine._modelToSheetID.remove(sheet); } - sheet.calcEngine.registerGridAsSheet(sheet.name, sheet, sheetFamilyID); + sheet.calcEngine._registerGridAsSheet(sheet.name, sheet, sheetFamilyID); } } } @@ -395,7 +386,7 @@ class Worksheet { } /// Get the value from the specified cell. - Object getValueRowCol(int iRow, int iColumn) { + Object _getValueRowCol(int iRow, int iColumn) { final Range range = getRangeByIndex(iRow, iColumn); if (range.formula != null) { return range.formula; @@ -408,14 +399,14 @@ class Worksheet { } /// Sets value for the specified cell. - void setValueRowCol(String value, int iRow, int iColumn) { + void _setValueRowCol(String value, int iRow, int iColumn) { if (value == null) throw Exception('null value'); final Range range = getRangeByIndex(iRow, iColumn); final CellType valType = range.type; if (value.isNotEmpty && value[0] == '=') { range.setFormula(value.substring(1)); } else { - final CultureInfo cultureInfo = _book.getCultureInfo(); + final CultureInfo cultureInfo = _book._getCultureInfo(); final double doubleValue = double.tryParse(value); final DateTime dateValue = DateTime.tryParse(value); final bool bDateTime = @@ -441,23 +432,23 @@ class Worksheet { isNumber = _checkIsNumber(value, cultureInfo); } - for (final String v in calcEngine.formulaErrorStrings) { + for (final String v in calcEngine._formulaErrorStrings) { if (value == v) istext = true; } if (valType == CellType.formula) { if (isNumber && !bDateTime) { - range.setFormulaNumberValue(doubleValue); + range._setFormulaNumberValue(doubleValue); } else if (bDateTime) { - range.setFormulaDateValue(dateValue); + range._setFormulaDateValue(dateValue); } else if (isboolean) { - range.setFormulaBooleanValue(value); + range._setFormulaBooleanValue(value); } else if (iserrorStrings) { - range.setFormulaErrorStringValue(value); + range._setFormulaErrorStringValue(value); } else if (value.contains('Exception:', 0) || istext) { range.setText(value); } else { - range.setFormulaStringValue(value); + range._setFormulaStringValue(value); } } else { if (isNumber && !bDateTime) { @@ -554,7 +545,8 @@ class Worksheet { } /// This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. - int getRowCount() { + // ignore: unused_element + int _getRowCount() { return rows.count; } @@ -567,8 +559,8 @@ class Worksheet { final Row row = rows[i]; if (row != null) { for (final Range cell in row.ranges.innerList) { - if (cell != null && firstCol > cell.index) { - firstCol = cell.index; + if (cell != null && firstCol > cell._index) { + firstCol = cell._index; } } } @@ -587,8 +579,8 @@ class Worksheet { final Row row = rows[i]; if (row != null) { for (final Range cell in row.ranges.innerList) { - if (cell != null && firstCol < cell.index) { - firstCol = cell.index; + if (cell != null && firstCol < cell._index) { + firstCol = cell._index; } } } @@ -599,22 +591,23 @@ class Worksheet { } /// This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. - int getColumnCount() { + // ignore: unused_element + int _getColumnCount() { return getLastColumn() - getFirstColumn(); } /// Clear the worksheet. - void clear() { + void _clear() { if (_rows != null) { - _rows.clear(); + _rows._clear(); } if (_columns != null) { - _columns.clear(); + _columns._clear(); } if (_pictures != null) { - _pictures.clear(); + _pictures._clear(); } } } diff --git a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet_collection.dart b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet_collection.dart index edff8cab..e422d5bc 100644 --- a/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet_collection.dart +++ b/packages/syncfusion_flutter_xlsio/lib/src/xlsio/worksheet/worksheet_collection.dart @@ -31,7 +31,7 @@ class WorksheetCollection { // ignore: prefer_final_locals for (int i = 0, len = innerList.length; i < len; i++) { final Worksheet sheet = innerList[i]; - if (equalsIgnoreCase(sheet.name, index)) { + if (_equalsIgnoreCase(sheet.name, index)) { return sheet; } } @@ -42,11 +42,19 @@ class WorksheetCollection { } /// Check Whether the strings are equal. - bool equalsIgnoreCase(String string1, String string2) { + bool _equalsIgnoreCase(String string1, String string2) { return string1.toLowerCase() == string2.toLowerCase(); } /// Add worksheet to the collection. + /// + /// /// ```dart + /// final Workbook workbook = Workbook(); + /// final Worksheet sheet = workbook.worksheets[0]; + /// workbook.worksheets.create(2); + /// workbook.save('AddWorksheet.xlsx'); + /// workbook.dispose(); + /// ``` void create(int count) { while (count > 0) { add(); @@ -55,13 +63,21 @@ class WorksheetCollection { } /// Add a worksheet to the workbook. + /// + /// /// ```dart + /// final Workbook workbook = Workbook(); + /// final Worksheet sheet = workbook.worksheets[0]; + /// final Worksheet sheet2 = workbook.worksheets.add(); + /// workbook.save('AddWorksheet.xlsx'); + /// workbook.dispose(); + /// ``` Worksheet add() { final Worksheet worksheet = Worksheet(_book); addWithSheet(worksheet); return worksheet; } - /// Add worksheet to the collection. + /// Add worksheet with name to the collection . /// /// ```dart /// Workbook workbook = new Workbook(); @@ -92,10 +108,10 @@ class WorksheetCollection { } /// Clear the worksheet. - void clear() { + void _clear() { if (_worksheets != null) { for (final Worksheet sheet in _worksheets) { - sheet.clear(); + sheet._clear(); } _worksheets.clear(); } diff --git a/packages/syncfusion_flutter_xlsio/lib/xlsio.dart b/packages/syncfusion_flutter_xlsio/lib/xlsio.dart index fb85ddee..2844d916 100644 --- a/packages/syncfusion_flutter_xlsio/lib/xlsio.dart +++ b/packages/syncfusion_flutter_xlsio/lib/xlsio.dart @@ -12,7 +12,6 @@ import 'package:archive/archive.dart'; import 'package:xml/xml.dart'; import 'package:image/image.dart' as img; import 'package:syncfusion_officecore/officecore.dart'; - import 'package:intl/intl.dart'; import 'package:intl/number_symbols_data.dart'; import 'package:intl/number_symbols.dart'; @@ -53,7 +52,6 @@ part 'src/xlsio/formats/format_tokens/hour_24_token.dart'; part 'src/xlsio/formats/format_tokens/hour_token.dart'; part 'src/xlsio/formats/format_tokens/milli_second_token.dart'; part 'src/xlsio/formats/format_tokens/minute_token.dart'; -part 'src/xlsio/formats/format_tokens/minute_total_token.dart'; part 'src/xlsio/formats/format_tokens/month_token.dart'; part 'src/xlsio/formats/format_tokens/second_token.dart'; part 'src/xlsio/formats/format_tokens/significant_digit_token.dart'; diff --git a/packages/syncfusion_flutter_xlsio/pubspec.yaml b/packages/syncfusion_flutter_xlsio/pubspec.yaml index c71b3aac..fb086ea6 100644 --- a/packages/syncfusion_flutter_xlsio/pubspec.yaml +++ b/packages/syncfusion_flutter_xlsio/pubspec.yaml @@ -1,6 +1,6 @@ name: syncfusion_flutter_xlsio description: Syncfusion Flutter XlsIO is a library written natively in Dart for creating Excel documents from scratch. -version: 18.3.35-beta +version: 18.3.35-beta.1 homepage: https://github.com/syncfusion/flutter-widgets/tree/master/packages/syncfusion_flutter_xlsio environment: diff --git a/packages/syncfusion_localizations/CHANGELOG.md b/packages/syncfusion_localizations/CHANGELOG.md index 3207c337..3b923a84 100644 --- a/packages/syncfusion_localizations/CHANGELOG.md +++ b/packages/syncfusion_localizations/CHANGELOG.md @@ -1,4 +1,4 @@ -## [18.3.35-beta] - 10/01/2020 +## [18.3.35] - 10/01/2020 No changes. diff --git a/packages/syncfusion_officechart/CHANGELOG.md b/packages/syncfusion_officechart/CHANGELOG.md index 6b04a725..ad105526 100644 --- a/packages/syncfusion_officechart/CHANGELOG.md +++ b/packages/syncfusion_officechart/CHANGELOG.md @@ -1,3 +1,8 @@ +## [18.3.35-beta.1] - 10/02/2020 + +**Features** +* Updated the code with respect to coding standards. + ## [18.3.35-beta] - 10/01/2020 Initial release diff --git a/packages/syncfusion_officechart/lib/officechart.dart b/packages/syncfusion_officechart/lib/officechart.dart index 9cf234c7..9b65fa6f 100644 --- a/packages/syncfusion_officechart/lib/officechart.dart +++ b/packages/syncfusion_officechart/lib/officechart.dart @@ -9,7 +9,6 @@ import 'package:syncfusion_flutter_xlsio/xlsio.dart'; import 'package:archive/archive.dart'; import 'package:xml/xml.dart'; - //Src part 'src/chart/chart_impl.dart'; part 'src/chart/chart_plotarea.dart'; diff --git a/packages/syncfusion_officechart/lib/src/chart/chart_serialization.dart b/packages/syncfusion_officechart/lib/src/chart/chart_serialization.dart index 7c9b852e..00404737 100644 --- a/packages/syncfusion_officechart/lib/src/chart/chart_serialization.dart +++ b/packages/syncfusion_officechart/lib/src/chart/chart_serialization.dart @@ -74,7 +74,9 @@ class ChartSerialization { ? 'l' : legendPostion == ExcelLegendPosition.right ? 'r' - : legendPostion == ExcelLegendPosition.top ? 't' : 'r'; + : legendPostion == ExcelLegendPosition.top + ? 't' + : 'r'; builder.attribute('val', positionStr); }); if (chartLegend._hasTextArea) { diff --git a/packages/syncfusion_officechart/pubspec.yaml b/packages/syncfusion_officechart/pubspec.yaml index 7610b289..3b226c6f 100644 --- a/packages/syncfusion_officechart/pubspec.yaml +++ b/packages/syncfusion_officechart/pubspec.yaml @@ -1,6 +1,6 @@ name: syncfusion_officechart description: Syncfusion Flutter Office Chart is a library written natively in Dart for creating Office charts from scratch. -version: 18.3.35-beta +version: 18.3.35-beta.1 homepage: https://github.com/syncfusion/flutter-widgets/tree/master/packages/syncfusion_officechart environment: diff --git a/packages/syncfusion_officecore/README.md b/packages/syncfusion_officecore/README.md index e49498a1..436c5653 100644 --- a/packages/syncfusion_officecore/README.md +++ b/packages/syncfusion_officecore/README.md @@ -2,8 +2,8 @@ Syncfusion Flutter OfficeCore is a dependent package for the following Syncfusion Flutter packages. -* [syncfusion_flutter_xlsio]() -* [syncfusion_flutter_officechart]() +* [syncfusion_flutter_xlsio](https://pub.dev/packages/syncfusion_flutter_xlsio) +* [syncfusion_flutter_officechart](https://pub.dev/packages/syncfusion_flutter_officechart) **Disclaimer:** This is a commercial package. To use this package, you need to have either Syncfusion Commercial License or Syncfusion Community license. For more details, please check the [LICENSE](https://github.com/syncfusion/flutter-examples/blob/master/LICENSE) file. diff --git a/packages/syncfusion_officecore/example/README.md b/packages/syncfusion_officecore/example/README.md deleted file mode 100644 index cdc9501a..00000000 --- a/packages/syncfusion_officecore/example/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# officecore_example - -Demo for creating a Excel file using syncfusion_flutter_xlsio and syncfusion_officecore packages. diff --git a/packages/syncfusion_officecore/example/analysis_options.yaml b/packages/syncfusion_officecore/example/analysis_options.yaml deleted file mode 100644 index 2a22b53a..00000000 --- a/packages/syncfusion_officecore/example/analysis_options.yaml +++ /dev/null @@ -1,6 +0,0 @@ -include: package:syncfusion_flutter_core/analysis_options.yaml - -analyzer: - errors: - include_file_not_found: ignore - lines_longer_than_80_chars: ignore diff --git a/packages/syncfusion_officecore/example/android/.gitignore b/packages/syncfusion_officecore/example/android/.gitignore deleted file mode 100644 index bc2100d8..00000000 --- a/packages/syncfusion_officecore/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/packages/syncfusion_officecore/example/android/app/build.gradle b/packages/syncfusion_officecore/example/android/app/build.gradle deleted file mode 100644 index ccd7de9b..00000000 --- a/packages/syncfusion_officecore/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.xlsio_example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/syncfusion_officecore/example/android/app/src/debug/AndroidManifest.xml b/packages/syncfusion_officecore/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index df91c765..00000000 --- a/packages/syncfusion_officecore/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/syncfusion_officecore/example/android/app/src/main/AndroidManifest.xml b/packages/syncfusion_officecore/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 3ab96c3b..00000000 --- a/packages/syncfusion_officecore/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/packages/syncfusion_officecore/example/android/app/src/main/kotlin/com/example/officecore_example/MainActivity.kt b/packages/syncfusion_officecore/example/android/app/src/main/kotlin/com/example/officecore_example/MainActivity.kt deleted file mode 100644 index e4d0b502..00000000 --- a/packages/syncfusion_officecore/example/android/app/src/main/kotlin/com/example/officecore_example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.officecore_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/syncfusion_officecore/example/android/app/src/main/res/drawable/launch_background.xml b/packages/syncfusion_officecore/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/packages/syncfusion_officecore/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/packages/syncfusion_officecore/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/android/app/src/main/res/values/styles.xml b/packages/syncfusion_officecore/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33f..00000000 --- a/packages/syncfusion_officecore/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/syncfusion_officecore/example/android/app/src/profile/AndroidManifest.xml b/packages/syncfusion_officecore/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index df91c765..00000000 --- a/packages/syncfusion_officecore/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/packages/syncfusion_officecore/example/android/build.gradle b/packages/syncfusion_officecore/example/android/build.gradle deleted file mode 100644 index 3100ad2d..00000000 --- a/packages/syncfusion_officecore/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/syncfusion_officecore/example/android/gradle.properties b/packages/syncfusion_officecore/example/android/gradle.properties deleted file mode 100644 index 38c8d454..00000000 --- a/packages/syncfusion_officecore/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.enableR8=true -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/syncfusion_officecore/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/syncfusion_officecore/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b..00000000 --- a/packages/syncfusion_officecore/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/packages/syncfusion_officecore/example/android/officecore_example_android.iml b/packages/syncfusion_officecore/example/android/officecore_example_android.iml deleted file mode 100644 index 1029d721..00000000 --- a/packages/syncfusion_officecore/example/android/officecore_example_android.iml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/syncfusion_officecore/example/android/settings.gradle b/packages/syncfusion_officecore/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb..00000000 --- a/packages/syncfusion_officecore/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/packages/syncfusion_officecore/example/ios/.gitignore b/packages/syncfusion_officecore/example/ios/.gitignore deleted file mode 100644 index e96ef602..00000000 --- a/packages/syncfusion_officecore/example/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/syncfusion_officecore/example/ios/Flutter/AppFrameworkInfo.plist b/packages/syncfusion_officecore/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78..00000000 --- a/packages/syncfusion_officecore/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/packages/syncfusion_officecore/example/ios/Flutter/Debug.xcconfig b/packages/syncfusion_officecore/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/packages/syncfusion_officecore/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/syncfusion_officecore/example/ios/Flutter/Release.xcconfig b/packages/syncfusion_officecore/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/packages/syncfusion_officecore/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.pbxproj b/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 6b50bd56..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,506 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.xlsioExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.xlsioExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.xlsioExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cf..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner/AppDelegate.swift b/packages/syncfusion_officecore/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/syncfusion_officecore/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/syncfusion_officecore/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner/Base.lproj/Main.storyboard b/packages/syncfusion_officecore/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner/Info.plist b/packages/syncfusion_officecore/example/ios/Runner/Info.plist deleted file mode 100644 index 44da86d8..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - xlsio_example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/packages/syncfusion_officecore/example/ios/Runner/Runner-Bridging-Header.h b/packages/syncfusion_officecore/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/packages/syncfusion_officecore/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/syncfusion_officecore/example/lib/main.dart b/packages/syncfusion_officecore/example/main.dart similarity index 100% rename from packages/syncfusion_officecore/example/lib/main.dart rename to packages/syncfusion_officecore/example/main.dart diff --git a/packages/syncfusion_officecore/example/officecore_example.iml b/packages/syncfusion_officecore/example/officecore_example.iml deleted file mode 100644 index e5c83719..00000000 --- a/packages/syncfusion_officecore/example/officecore_example.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/syncfusion_officecore/example/pubspec.yaml b/packages/syncfusion_officecore/example/pubspec.yaml deleted file mode 100644 index 9722cfed..00000000 --- a/packages/syncfusion_officecore/example/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: officecore_example -description: Demo for creating a Excel file using syncfusion_flutter_officecore package. - -dependencies: - flutter: - sdk: flutter - path_provider: ^1.6.7 - open_file: ^3.0.1 - syncfusion_flutter_xlsio: - path: ../../syncfusion_flutter_xlsio - - - -# The following section is specific to Flutter. -flutter: - uses-material-design: true