Skip to content

Commit d1ec1c2

Browse files
author
Ashwin
committed
Sample browser samples modified and merged
1 parent 1f579ff commit d1ec1c2

File tree

159 files changed

+1291
-925
lines changed

Some content is hidden

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

159 files changed

+1291
-925
lines changed

assets/fonts/Montserrat-Bold.ttf

100644100755
File mode changed.

assets/fonts/Montserrat-Medium.ttf

100644100755
File mode changed.

images/airplane.png

100644100755
File mode changed.

images/athletics.png

100644100755
File mode changed.

images/axis_feature.png

100644100755
File mode changed.

images/axis_types.png

100644100755
File mode changed.

images/axis_types.svg

100644100755
File mode changed.

images/back.png

100644100755
File mode changed.

images/bike.png

100644100755
File mode changed.

images/bike_legend.png

100644100755
File mode changed.

images/book.png

100644100755
File mode changed.

images/car.png

100644100755
File mode changed.

images/car_legend.png

100644100755
File mode changed.

images/cartesian.svg

100644100755
File mode changed.

images/cartesian_types.png

100644100755
File mode changed.

images/circle_series.png

100644100755
File mode changed.

images/circle_series.svg

100644100755
File mode changed.

images/close.png

100644100755
File mode changed.

images/code.png

100644100755
File mode changed.

images/code.svg

100644100755
File mode changed.

images/cycle_legend.png

100644100755
File mode changed.

images/dashline.png

100644100755
File mode changed.

images/documentation.png

100644100755
File mode changed.

images/external.png

100644100755
File mode changed.

images/fullscreen.png

100644100755
File mode changed.

images/golfball.png

100644100755
File mode changed.

images/golfball2.png

100644100755
File mode changed.

images/golfball3.png

100644100755
File mode changed.

images/home.png

100644100755
File mode changed.

images/image_nav_banner.png

100644100755
File mode changed.

images/image_nav_banner_white.png

100644100755
File mode changed.

images/img_JS.png

100644100755
File mode changed.

images/img_xamarin.png

100644100755
File mode changed.

images/info.png

100644100755
File mode changed.

images/information.svg

100644100755
File mode changed.

images/legend.png

100644100755
File mode changed.

images/legend.svg

100644100755
File mode changed.

images/live_update.png

100644100755
File mode changed.

images/live_update.svg

100644100755
File mode changed.

images/man1.png

100644100755
File mode changed.

images/man2.png

100644100755
File mode changed.

images/man3.png

100644100755
File mode changed.

images/menu.png

100644100755
File mode changed.

images/other_features.png

100644100755
File mode changed.

images/other_features.svg

100644100755
File mode changed.

images/person.png

100644100755
File mode changed.

images/personal_loan.png

100644100755
File mode changed.

images/product.png

100644100755
File mode changed.

images/settings.png

100644100755
File mode changed.

images/settings.svg

100644100755
File mode changed.

images/syncfusion.png

100644100755
File mode changed.

images/truck.png

100644100755
File mode changed.

images/truck_legend.png

100644100755
File mode changed.

images/user_interaction.png

100644100755
File mode changed.

images/user_interaction.svg

100644100755
File mode changed.

images/whatsnew.png

100644100755
File mode changed.

lib/main.dart

100644100755
File mode changed.

lib/model/helper.dart

100644100755
+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:flutter_examples/samples/chart/axis_types/date_time_types/date_t
1010
import 'package:flutter_examples/samples/chart/axis_types/date_time_types/default_date_time_axis.dart';
1111
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/default_numeric_axis.dart';
1212
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/inversed_numeric_axis.dart';
13-
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/numeric_axis_witn_label_format.dart';
13+
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/numeric_axis_with_label_format.dart';
1414
import 'package:flutter_examples/samples/chart/cartesian_charts/area_series/area_with_emptypoints.dart';
1515
import 'package:flutter_examples/samples/chart/cartesian_charts/area_series/area_with_gradient.dart';
1616
import 'package:flutter_examples/samples/chart/cartesian_charts/area_series/default_area_chart.dart';
@@ -26,8 +26,8 @@ import 'package:flutter_examples/samples/chart/cartesian_charts/bubble_series/bu
2626
import 'package:flutter_examples/samples/chart/cartesian_charts/bubble_series/default_bubble_chart.dart';
2727
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/back_to_back_column.dart';
2828
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_width_and_spacing.dart';
29-
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_rounded_corners..dart';
30-
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_track..dart';
29+
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_rounded_corners.dart';
30+
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_track.dart';
3131
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/customized_column_chart.dart';
3232
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/default_column_chart.dart';
3333
import 'package:flutter_examples/samples/chart/cartesian_charts/line_series/customized_line_chart.dart';

lib/model/model.dart

100644100755
+32-53
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:flutter_examples/samples/chart/axis_types/date_time_types/date_t
1010
import 'package:flutter_examples/samples/chart/axis_types/date_time_types/default_date_time_axis.dart';
1111
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/default_numeric_axis.dart';
1212
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/inversed_numeric_axis.dart';
13-
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/numeric_axis_witn_label_format.dart';
13+
import 'package:flutter_examples/samples/chart/axis_types/numeric_types/numeric_axis_with_label_format.dart';
1414
import 'package:flutter_examples/samples/chart/cartesian_charts/area_series/area_with_emptypoints.dart';
1515
import 'package:flutter_examples/samples/chart/cartesian_charts/area_series/area_with_gradient.dart';
1616
import 'package:flutter_examples/samples/chart/cartesian_charts/area_series/default_area_chart.dart';
@@ -26,8 +26,8 @@ import 'package:flutter_examples/samples/chart/cartesian_charts/bubble_series/bu
2626
import 'package:flutter_examples/samples/chart/cartesian_charts/bubble_series/default_bubble_chart.dart';
2727
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/back_to_back_column.dart';
2828
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_width_and_spacing.dart';
29-
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_rounded_corners..dart';
30-
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_track..dart';
29+
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_rounded_corners.dart';
30+
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/column_with_track.dart';
3131
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/customized_column_chart.dart';
3232
import 'package:flutter_examples/samples/chart/cartesian_charts/column_series/default_column_chart.dart';
3333
import 'package:flutter_examples/samples/chart/cartesian_charts/line_series/customized_line_chart.dart';
@@ -109,12 +109,12 @@ class SampleListModel extends Model {
109109
List<SubItemList> searchSampleListItems; // To handle search
110110

111111
int selectedIndex = 0;
112-
Color backgroundColor = Color.fromRGBO(0,116,228,1);
112+
Color backgroundColor = Color.fromRGBO(0, 116, 228, 1);
113113
Color slidingPanelColor = Color.fromRGBO(250, 250, 250, 1);
114114
Color paletteColor;
115115
ThemeData themeData = ThemeData.light();
116116
Color searchBoxColor = Colors.white;
117-
Color listIconColor = Color.fromRGBO(0,116,228,1);
117+
Color listIconColor = Color.fromRGBO(0, 116, 228, 1);
118118
Color listDescriptionTextColor = Colors.grey;
119119
Color textColor = Color.fromRGBO(51, 51, 51, 1);
120120
String codeViewerIcon = 'images/code.png';
@@ -195,48 +195,28 @@ class SampleListModel extends Model {
195195
axisSubItemList = <List<SubItemList>>[];
196196
axesFeaturesSubItemList = <List<SubItemList>>[];
197197

198-
numericAxisSubItemList.add(SubItemList(
199-
'Numeric',
200-
'Default numeric axis',
201-
'',
202-
'images/axes.png',
203-
getDefaultNumericAxisChart(isTileView)));
198+
numericAxisSubItemList.add(SubItemList('Numeric', 'Default numeric axis',
199+
'', 'images/axes.png', getDefaultNumericAxisChart(isTileView)));
204200
numericAxisSubItemList.add(SubItemList(
205201
'Numeric',
206202
'Numeric axis with label format',
207203
'',
208204
'images/axes.png',
209205
getLabelNumericAxisChart(isTileView)));
210-
numericAxisSubItemList.add(SubItemList(
211-
'Numeric',
212-
'Inversed numeric axis',
213-
'',
214-
'images/axes.png',
215-
getInversedNumericAxisChart(isTileView)));
216-
categoryAxisSubItemList.add(SubItemList(
217-
'Category',
218-
'Default category axis',
219-
'',
220-
'images/axes.png',
221-
getDefaultCategoryAxisChart(isTileView)));
206+
numericAxisSubItemList.add(SubItemList('Numeric', 'Inversed numeric axis',
207+
'', 'images/axes.png', getInversedNumericAxisChart(isTileView)));
208+
categoryAxisSubItemList.add(SubItemList('Category', 'Default category axis',
209+
'', 'images/axes.png', getDefaultCategoryAxisChart(isTileView)));
222210
categoryAxisSubItemList.add(SubItemList(
223211
'Category',
224212
'Arranged by index',
225213
'By default, category data points will be arranged based on the x values. In this sample, you can arrange the data points based on the index value.',
226214
'images/axes.png',
227215
getIndexedCategoryAxisChart(isTileView)));
228-
categoryAxisSubItemList.add(SubItemList(
229-
'Category',
230-
'Label placement',
231-
'',
232-
'images/axes.png',
233-
getTicksCategoryAxisChart(isTileView)));
234-
axisFeaturesSubItemList.add(SubItemList(
235-
'Axis Features',
236-
'Opposed axes',
237-
'',
238-
'images/axes.png',
239-
getOpposedNumericAxisChart(isTileView)));
216+
categoryAxisSubItemList.add(SubItemList('Category', 'Label placement', '',
217+
'images/axes.png', getTicksCategoryAxisChart(isTileView)));
218+
axisFeaturesSubItemList.add(SubItemList('Axis Features', 'Opposed axes', '',
219+
'images/axes.png', getOpposedNumericAxisChart(isTileView)));
240220
axisFeaturesSubItemList.add(SubItemList(
241221
'Axis Features',
242222
'Handling labels collision',
@@ -434,7 +414,7 @@ class SampleListModel extends Model {
434414
'images/circular.png',
435415
getCustomizedLineChart(isTileView),
436416
));
437-
417+
438418
// dynamic updates
439419
liveUpdateSubItemList.add(SubItemList(
440420
'Live Update',
@@ -861,9 +841,9 @@ class SampleListModel extends Model {
861841
'images/other_features.png',
862842
otherFeaturesSubItemList));
863843
controlList.add(SampleList(
864-
'Legend',
844+
'Legend',
865845
'Various legend features useful in displaying additional information about the series',
866-
'images/legend.png',
846+
'images/legend.png',
867847
legendFeaturesSubItemList));
868848
controlList.add(SampleList(
869849
'User Interactions',
@@ -881,11 +861,11 @@ class SampleListModel extends Model {
881861
searchControlListItems.addAll(controlList);
882862
for (int index = 0; index < controlList.length; index++) {
883863
for (int categoryIndex = 0;
884-
categoryIndex < controlList[index].subItemList.length;
885-
categoryIndex++) {
864+
categoryIndex < controlList[index].subItemList.length;
865+
categoryIndex++) {
886866
for (int sampleIndex = 0;
887-
sampleIndex < controlList[index].subItemList[categoryIndex].length;
888-
sampleIndex++) {
867+
sampleIndex < controlList[index].subItemList[categoryIndex].length;
868+
sampleIndex++) {
889869
searchSampleListItems
890870
.add(controlList[index].subItemList[categoryIndex][sampleIndex]);
891871
}
@@ -904,8 +884,8 @@ class SampleListModel extends Model {
904884
drawerIconColor = Colors.black;
905885
drawerBackgroundColor = Colors.white;
906886
bottomSheetBackgroundColor = Colors.white;
907-
backgroundColor = paletteColor ?? Color.fromRGBO(0,116,228,1);
908-
listIconColor = paletteColor ?? Color.fromRGBO(0,116,228,1);
887+
backgroundColor = paletteColor ?? Color.fromRGBO(0, 116, 228, 1);
888+
listIconColor = paletteColor ?? Color.fromRGBO(0, 116, 228, 1);
909889
searchBoxColor = Colors.white;
910890
listDescriptionTextColor = Colors.grey;
911891
textColor = Color.fromRGBO(51, 51, 51, 1);
@@ -917,14 +897,14 @@ class SampleListModel extends Model {
917897
{
918898
drawerTextIconColor = Colors.white;
919899
drawerIconColor = Colors.white;
920-
slidingPanelColor = Color.fromRGBO(32,33,37,1);
921-
drawerBackgroundColor = Color.fromRGBO(32,33,37,1);
922-
bottomSheetBackgroundColor = Color.fromRGBO(64,64,64,1);
923-
backgroundColor = paletteColor ?? Color.fromRGBO(0,116,228,1);
900+
slidingPanelColor = Color.fromRGBO(32, 33, 37, 1);
901+
drawerBackgroundColor = Color.fromRGBO(32, 33, 37, 1);
902+
bottomSheetBackgroundColor = Color.fromRGBO(64, 64, 64, 1);
903+
backgroundColor = paletteColor ?? Color.fromRGBO(0, 116, 228, 1);
924904
listIconColor = paletteColor ?? Colors.white;
925905
searchBoxColor = Colors.white;
926906
listDescriptionTextColor = Colors.white;
927-
textColor = Colors.white;
907+
textColor = Colors.white;
928908
theme = Brightness.dark;
929909
cardThemeColor = Colors.black.withOpacity(0.7);
930910
break;
@@ -936,7 +916,7 @@ class SampleListModel extends Model {
936916
bottomSheetBackgroundColor = Colors.white;
937917
drawerIconColor = Colors.white;
938918
slidingPanelColor = Colors.white;
939-
backgroundColor = Color.fromRGBO(0,116,228,1);
919+
backgroundColor = Color.fromRGBO(0, 116, 228, 1);
940920
searchBoxColor = Colors.white;
941921
listIconColor = Color.fromRGBO(0, 116, 228, 1);
942922
listDescriptionTextColor = Colors.white;
@@ -975,10 +955,9 @@ class BubbleColors {
975955
final Color pointColorMapper;
976956
}
977957

978-
979958
class ChartDataCollection {
980-
ChartDataCollection(this.year, this.category, this.numeric, this.sales1, this.sales2,
981-
this.sales3, this.sales4);
959+
ChartDataCollection(this.year, this.category, this.numeric, this.sales1,
960+
this.sales2, this.sales3, this.sales4);
982961
final DateTime year;
983962
final String category;
984963
final num numeric;

lib/sample_browser.dart

100644100755
+3-3
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ class _HomePageState extends State<HomePage> {
948948
const EdgeInsets.fromLTRB(10, 0, 0, 0),
949949
child: InkWell(
950950
onTap: () => launch(
951-
'https://www.syncfusion.com/xamarin-ui-controls'),
951+
'https://www.syncfusion.com/xamarin-ui-controls?utm_source=play_store&utm_medium=flutter_widgets'),
952952
child: Image.asset('images/external.png',
953953
fit: BoxFit.contain,
954954
color: Colors.blue,
@@ -1009,7 +1009,7 @@ class _HomePageState extends State<HomePage> {
10091009
const EdgeInsets.fromLTRB(10, 0, 0, 0),
10101010
child: InkWell(
10111011
onTap: () => launch(
1012-
'https://www.syncfusion.com/javascript-ui-controls'),
1012+
'https://www.syncfusion.com/javascript-ui-controls?utm_source=play_store&utm_medium=flutter_widgets'),
10131013
child: Image.asset('images/external.png',
10141014
fit: BoxFit.contain,
10151015
color: Colors.blue,
@@ -1070,7 +1070,7 @@ class _HomePageState extends State<HomePage> {
10701070
)),
10711071
Align(
10721072
alignment: Alignment.bottomCenter,
1073-
child: Text('Version 1.0.0 Beta',
1073+
child: Text('Version 1.0.0-beta',
10741074
style: TextStyle(
10751075
color: _model.drawerTextIconColor,
10761076
fontSize: 12,

lib/samples/chart/axis_features/edge_label_placement/edgelabel_placement.dart

100644100755
+13-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:chart/SfChart.dart';
1+
import 'package:syncfusion_flutter_charts/charts.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_examples/model/model.dart';
44
import 'package:flutter_examples/widgets/bottom_sheet.dart';
@@ -63,11 +63,13 @@ class _EdgeLabelState extends State<EdgeLabel> {
6363
child: IconButton(
6464
icon: Image.asset(model.codeViewerIcon,
6565
color: Colors.white),
66-
onPressed: () {},
66+
onPressed: () {
67+
launch(
68+
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/axis_features/edge_label_placement/edgelabel_placement.dart');
69+
},
6770
),
6871
),
6972
),
70-
7173
],
7274
appBarTitle: AnimatedSwitcher(
7375
duration: Duration(milliseconds: 1000),
@@ -135,8 +137,7 @@ class _FrontPanelState extends State<FrontPanel> {
135137
fontSize: 16, color: model.textColor)),
136138
Text('www.mycarhelpline.com',
137139
style: TextStyle(
138-
fontSize: 14,
139-
color: Colors.blue)),
140+
fontSize: 14, color: Colors.blue)),
140141
],
141142
),
142143
),
@@ -250,8 +251,8 @@ class _FrontPanelState extends State<FrontPanel> {
250251
child: Theme(
251252
data: Theme.of(context)
252253
.copyWith(
253-
canvasColor:
254-
model.bottomSheetBackgroundColor),
254+
canvasColor: model
255+
.bottomSheetBackgroundColor),
255256
child: DropDown(
256257
value: _selectedType,
257258
item: _edgeList.map(
@@ -263,7 +264,10 @@ class _FrontPanelState extends State<FrontPanel> {
263264
? value
264265
: 'hide',
265266
child: Text(
266-
'$value', style: TextStyle(color: model.textColor)));
267+
'$value',
268+
style: TextStyle(
269+
color: model
270+
.textColor)));
267271
}).toList(),
268272
valueChanged:
269273
(dynamic value) {
@@ -386,8 +390,7 @@ SfCartesianChart getEdgeLabelPlacementChart(bool isTileView,
386390
title: AxisTitle(text: isTileView ? '' : 'Rupees per litre'),
387391
),
388392
series: getLineSeries(isTileView),
389-
tooltipBehavior: TooltipBehavior(
390-
enable: true, format: 'point.x : point.y'),
393+
tooltipBehavior: TooltipBehavior(enable: true, format: 'point.x : point.y'),
391394
);
392395
}
393396

lib/samples/chart/axis_features/handling_label_collision/handling_label_collision.dart

100644100755
+12-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:chart/SfChart.dart';
1+
import 'package:syncfusion_flutter_charts/charts.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_examples/model/model.dart';
44
import 'package:flutter_examples/widgets/bottom_sheet.dart';
@@ -61,7 +61,10 @@ class _LabelActionState extends State<LabelAction> {
6161
child: IconButton(
6262
icon: Image.asset(model.codeViewerIcon,
6363
color: Colors.white),
64-
onPressed: () {},
64+
onPressed: () {
65+
launch(
66+
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/handling_label_collision/handling_label_collision.dart');
67+
},
6568
),
6669
),
6770
),
@@ -157,8 +160,7 @@ class _FrontPanelState extends State<FrontPanel> {
157160
fontSize: 16, color: model.textColor)),
158161
Text('en.wikipedia.org',
159162
style: TextStyle(
160-
fontSize: 14,
161-
color: Colors.blue)),
163+
fontSize: 14, color: Colors.blue)),
162164
],
163165
),
164166
),
@@ -277,8 +279,8 @@ class _FrontPanelState extends State<FrontPanel> {
277279
child: Theme(
278280
data: Theme.of(context)
279281
.copyWith(
280-
canvasColor:
281-
model.bottomSheetBackgroundColor),
282+
canvasColor: model
283+
.bottomSheetBackgroundColor),
282284
child: DropDown(
283285
value: _selectedType,
284286
item: _labelList.map(
@@ -290,7 +292,10 @@ class _FrontPanelState extends State<FrontPanel> {
290292
? value
291293
: 'hide',
292294
child: Text(
293-
'$value', style: TextStyle(color: model.textColor)));
295+
'$value',
296+
style: TextStyle(
297+
color: model
298+
.textColor)));
294299
}).toList(),
295300
valueChanged:
296301
(dynamic value) {

0 commit comments

Comments
 (0)