Skip to content

Commit

Permalink
Merge pull request syncfusion#740 from LokeshPalani/master
Browse files Browse the repository at this point in the history
FLUT-7280- [Others] Moved the source file to master
  • Loading branch information
LavanyaGowtham2021 authored Feb 10, 2023
2 parents 7a5f210 + 7465a23 commit d56ed9b
Show file tree
Hide file tree
Showing 44 changed files with 145 additions and 153 deletions.
5 changes: 0 additions & 5 deletions lib/model/sample_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,6 @@ class DirectionalitySampleViewState<T extends DirectionalitySampleView>
TextDirection.rtl,
];

@override
void initState() {
super.initState();
}

/// Must call super.
@override
void dispose() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ class _EventsState extends SampleViewState {
},
onMarkerRender: (MarkerRenderArgs args) {
if (!isCardView) {
actionsList.insert(
0, 'Marker (${args.pointIndex.toString()}) was rendered');
actionsList.insert(0, 'Marker (${args.pointIndex}) was rendered');
if (args.pointIndex == 5) {
SchedulerBinding.instance.addPostFrameCallback((_) {
(consoleKey.currentState)?.setState(() {});
Expand Down Expand Up @@ -268,8 +267,7 @@ class _EventsState extends SampleViewState {
ColumnSeries<ChartSampleData, String>(
onPointTap: (ChartPointDetails args) {
if (!isCardView) {
actionsList.insert(
0, 'Point (${args.pointIndex.toString()}) was tapped');
actionsList.insert(0, 'Point (${args.pointIndex}) was tapped');
(consoleKey.currentState)?.setState(() {});
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class _TrackballTemplateState extends SampleViewState {
for (int i = 0; i < seriesIndices.length; i++) {
columnChildWidgets.children.add(
Text(
'${trackballDetails.groupingModeInfo!.visibleSeriesList[i].name.toString()} : \$${trackballDetails.groupingModeInfo!.points[i].y.toString()}',
'${trackballDetails.groupingModeInfo!.visibleSeriesList[i].name} : \$${trackballDetails.groupingModeInfo!.points[i].y}',
textAlign: TextAlign.left,
style: _getTrackballTextStyle()),
);
Expand All @@ -294,8 +294,7 @@ class _TrackballTemplateState extends SampleViewState {
} else {
columnWidgets.children.add(Text(trackballDetails.point!.x.toString(),
style: _getTrackballTextStyle()));
columnWidgets.children.add(Text(
'\$${trackballDetails.point!.y.toString()}',
columnWidgets.children.add(Text('\$${trackballDetails.point!.y}',
style: TextStyle(
fontWeight: FontWeight.bold,
color: model.themeData.colorScheme.brightness == Brightness.dark
Expand Down
2 changes: 1 addition & 1 deletion lib/samples/datagrid/columns/datagrid_custom_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class _CustomHeaderDataGridState extends SampleViewState {
void buildShowMenu(BuildContext context, DataGridCellTapDetails details) {
const double rowHeight = 56.0;
final RenderBox renderBox =
Overlay.of(context)!.context.findRenderObject()! as RenderBox;
Overlay.of(context).context.findRenderObject()! as RenderBox;
final Offset newPosition = renderBox.globalToLocal(details.globalPosition);
final double dx = newPosition.dx - details.localPosition.dx;
final double dy = newPosition.dy - details.localPosition.dy + rowHeight;
Expand Down
2 changes: 1 addition & 1 deletion lib/samples/date_picker/date_picker_getting_started.dart
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ class _DateRangePickerOptionState extends State<_DateRangePickerOption> {
child: Text(DateFormat('MM-dd-yyyy').format(_date),
style: TextStyle(
fontSize: 15,
color: theme.textTheme.subtitle2?.color,
color: theme.textTheme.titleSmall?.color,
fontWeight: FontWeight.w600)),
));
}
Expand Down
2 changes: 1 addition & 1 deletion lib/samples/date_picker/hijri_calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ class _DateRangePickerOptionState extends State<_DateRangePickerOption> {
_date.year.toString(),
style: TextStyle(
fontSize: 15,
color: theme.textTheme.subtitle2?.color,
color: theme.textTheme.titleSmall?.color,
fontWeight: FontWeight.w600))));
}
}
Expand Down
5 changes: 3 additions & 2 deletions lib/samples/maps/directionality.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class _MapsWithDirectionalityState extends DirectionalitySampleViewState {
child: Align(
child: Text(_title,
textDirection: TextDirection.rtl,
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand Down Expand Up @@ -224,7 +224,8 @@ class _MapsWithDirectionalityState extends DirectionalitySampleViewState {
text: model.locale == const Locale('ar', 'AE')
? _stateWiseGRPDetails[index].stateLocale
: _stateWiseGRPDetails[index].state,
style: _themeData.textTheme.caption!.copyWith(
style:
_themeData.textTheme.bodySmall!.copyWith(
height: 1.5,
color: _isLightTheme
? const Color.fromRGBO(255, 255, 255, 1)
Expand Down
6 changes: 3 additions & 3 deletions lib/samples/maps/localization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class _MapsWithLocalizationState extends LocalizationSampleViewState {
child: Align(
child: Text(_title,
textDirection: TextDirection.rtl,
style: _themeData.textTheme.subtitle1))),
style: _themeData.textTheme.titleMedium))),
Expanded(
child: SfMapsTheme(
data: SfMapsThemeData(
Expand Down Expand Up @@ -169,7 +169,7 @@ class _MapsWithLocalizationState extends LocalizationSampleViewState {
Text(
_stateDataLabelsLocale[index],
textDirection: TextDirection.ltr,
style: _themeData.textTheme.caption!
style: _themeData.textTheme.bodySmall!
.copyWith(color: textColor),
),
const SizedBox(height: 5.0),
Expand All @@ -179,7 +179,7 @@ class _MapsWithLocalizationState extends LocalizationSampleViewState {
.toString() +
'M sq. km',
textDirection: TextDirection.ltr,
style: _themeData.textTheme.caption!
style: _themeData.textTheme.bodySmall!
.copyWith(color: textColor),
),
],
Expand Down
4 changes: 2 additions & 2 deletions lib/samples/maps/shape_layer/bubble/bubble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class _MapBubblePageState extends SampleViewState
padding: const EdgeInsets.only(top: 15, bottom: 30),
child: Align(
child: Text('Social Media Users Statistics',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand All @@ -376,7 +376,7 @@ class _MapBubblePageState extends SampleViewState
child: Text(_getCustomizedString(index),
style: Theme.of(context)
.textTheme
.caption!
.bodySmall!
.copyWith(color: _tooltipTextColor)),
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class _MapEqualColorMappingPageState extends SampleViewState {
padding: const EdgeInsets.only(top: 15, bottom: 30),
child: Align(
child: Text('European Time Zones',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand All @@ -214,7 +214,7 @@ class _MapEqualColorMappingPageState extends SampleViewState {
_timeZones[index].countryName +
' : ' +
_timeZones[index].gmtTime,
style: themeData.textTheme.caption!.copyWith(
style: themeData.textTheme.bodySmall!.copyWith(
color: isLightTheme
? const Color.fromRGBO(255, 255, 255, 1)
: const Color.fromRGBO(10, 10, 10, 1),
Expand Down
6 changes: 3 additions & 3 deletions lib/samples/maps/shape_layer/legend/legend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class _MapLegendPageState extends SampleViewState {
bottom: (_enableGradient && !model.isMobile) ? 18 : 30),
child: Align(
child: Text('Average Internet Prices in Africa',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapShapeLayer>[
Expand Down Expand Up @@ -426,7 +426,7 @@ class _MapLegendPageState extends SampleViewState {
.toString(),
style: Theme.of(context)
.textTheme
.caption!
.bodySmall!
.copyWith(
color: isLightTheme
? const Color.fromRGBO(255, 255, 255, 1)
Expand All @@ -452,7 +452,7 @@ class _MapLegendPageState extends SampleViewState {
.toString(),
style: Theme.of(context)
.textTheme
.caption!
.bodySmall!
.copyWith(
color: isLightTheme
? const Color.fromRGBO(255, 255, 255, 1)
Expand Down
6 changes: 3 additions & 3 deletions lib/samples/maps/shape_layer/marker/marker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class _MapMarkerPageState extends SampleViewState {
padding: const EdgeInsets.only(top: 15, bottom: 30),
child: Align(
child: Text('World Clock',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand Down Expand Up @@ -209,14 +209,14 @@ class _ClockWidgetState extends State<_ClockWidget> {
widget.countryName,
style: Theme.of(context)
.textTheme
.bodyText2!
.bodyMedium!
.copyWith(fontWeight: FontWeight.bold),
),
Center(
child: Text(_currentTime,
style: Theme.of(context)
.textTheme
.overline!
.labelSmall!
.copyWith(letterSpacing: 0.5, fontWeight: FontWeight.w500)),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class _MapRangeColorMappingPageState extends SampleViewState {
padding: const EdgeInsets.only(top: 15, bottom: 30),
child: Align(
child: Text('World Population Density (per sq. km.)',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand All @@ -432,8 +432,12 @@ class _MapRangeColorMappingPageState extends SampleViewState {
_numberFormat.format(
_worldPopulationDensity[index].density) +
' per sq. km.',
style: Theme.of(context).textTheme.caption!.copyWith(
color: Theme.of(context).colorScheme.surface)),
style: Theme.of(context)
.textTheme
.bodySmall!
.copyWith(
color:
Theme.of(context).colorScheme.surface)),
);
},
strokeColor: Colors.white30,
Expand Down
12 changes: 6 additions & 6 deletions lib/samples/maps/shape_layer/selection/selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ class _MapSelectionPageState extends SampleViewState {
padding: const EdgeInsets.only(top: 15, bottom: 30),
child: Align(
child: Text('2016 US Election Results',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand Down Expand Up @@ -651,7 +651,7 @@ class _MapSelectionPageState extends SampleViewState {
Text(_stateWiseElectionResult[index].state!,
style: Theme.of(context)
.textTheme
.headline6!
.titleLarge!
.copyWith(
color: Colors.white,
fontWeight: FontWeight.bold)),
Expand All @@ -675,7 +675,7 @@ class _MapSelectionPageState extends SampleViewState {
Text('Won candidate : ',
style: Theme.of(context)
.textTheme
.bodyText2!
.bodyMedium!
.copyWith(
fontWeight: FontWeight.bold,
color: Colors.white)),
Expand All @@ -686,7 +686,7 @@ class _MapSelectionPageState extends SampleViewState {
: 'Hillary Clinton',
style: Theme.of(context)
.textTheme
.bodyText2!
.bodyMedium!
.copyWith(
fontStyle: FontStyle.italic,
color: Colors.white))
Expand All @@ -698,7 +698,7 @@ class _MapSelectionPageState extends SampleViewState {
Text('Percentage : ',
style: Theme.of(context)
.textTheme
.bodyText2!
.bodyMedium!
.copyWith(
fontWeight: FontWeight.bold,
color: Colors.white)),
Expand All @@ -709,7 +709,7 @@ class _MapSelectionPageState extends SampleViewState {
'%',
style: Theme.of(context)
.textTheme
.bodyText2!
.bodyMedium!
.copyWith(
fontStyle: FontStyle.italic,
color: Colors.white))
Expand Down
7 changes: 4 additions & 3 deletions lib/samples/maps/shape_layer/sublayer/sublayer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class _MapSublayerPageState extends SampleViewState {
child: Align(
alignment: Alignment.topCenter,
child: Text('Rivers in Australia',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand Down Expand Up @@ -200,7 +200,7 @@ class _MapSublayerPageState extends SampleViewState {
),
showDataLabels: true,
dataLabelSettings: MapDataLabelSettings(
textStyle: _themeData.textTheme.caption!.copyWith(
textStyle: _themeData.textTheme.bodySmall!.copyWith(
color: const Color.fromRGBO(0, 0, 0, 1),
),
),
Expand All @@ -225,7 +225,8 @@ class _MapSublayerPageState extends SampleViewState {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Text(tooltipText,
style: model.themeData.textTheme.caption!
style: model
.themeData.textTheme.bodySmall!
.copyWith(
color: isLightTheme
? const Color.fromRGBO(
Expand Down
6 changes: 3 additions & 3 deletions lib/samples/maps/shape_layer/tooltip/tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ class _MapTooltipPageState extends SampleViewState {
Text(
model.state,
textAlign: TextAlign.center,
style: themeData.textTheme.bodyText2!.copyWith(
style: themeData.textTheme.bodyMedium!.copyWith(
color: isLightTheme
? const Color.fromRGBO(0, 0, 0, 0.87)
: const Color.fromRGBO(255, 255, 255, 0.87),
fontWeight: FontWeight.bold),
),
const SizedBox(height: 10),
Text(_getTooltipText(model),
style: themeData.textTheme.caption!.copyWith(
style: themeData.textTheme.bodySmall!.copyWith(
color: isLightTheme
? const Color.fromRGBO(0, 0, 0, 0.87)
: const Color.fromRGBO(255, 255, 255, 0.87),
Expand Down Expand Up @@ -358,7 +358,7 @@ class _MapTooltipPageState extends SampleViewState {
padding: const EdgeInsets.only(top: 15, bottom: 30),
child: Align(
child: Text(_title,
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand Down
4 changes: 2 additions & 2 deletions lib/samples/maps/shape_layer/zooming/zooming.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class _MapZoomingPageState extends SampleViewState {
padding: const EdgeInsets.only(top: 15, bottom: 30),
child: Align(
child: Text('Tourist Places in South America',
style: Theme.of(context).textTheme.subtitle1))),
style: Theme.of(context).textTheme.titleMedium))),
Expanded(
child: SfMaps(
layers: <MapLayer>[
Expand Down Expand Up @@ -191,7 +191,7 @@ class _MapZoomingPageState extends SampleViewState {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Text(_touristPlaces[index].place,
style: themeData.textTheme.caption!.copyWith(
style: themeData.textTheme.bodySmall!.copyWith(
color: isLightTheme
? const Color.fromRGBO(255, 255, 255, 1)
: const Color.fromRGBO(10, 10, 10, 1))),
Expand Down
1 change: 0 additions & 1 deletion lib/samples/maps/tile_layer/bing_map/bing_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ class _BingMapState extends SampleViewState {
/// Changing the Bing Maps type on clicking the chip.
void _setBingMapView(int index) {
switch (index) {

/// Road view
case 0:
_bingURL =
Expand Down
2 changes: 1 addition & 1 deletion lib/samples/maps/tile_layer/crosshair/crosshair.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class _MapCrosshairPageState extends SampleViewState {
enabled: false,
style: Theme.of(context)
.textTheme
.caption
.bodySmall
?.apply(color: Colors.black),
decoration: const InputDecoration(
border: InputBorder.none,
Expand Down
Loading

0 comments on commit d56ed9b

Please sign in to comment.