Skip to content

Commit

Permalink
revert some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MelbourneDeveloper committed Sep 22, 2024
1 parent 37b5466 commit c01f8dd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
24 changes: 12 additions & 12 deletions charts_flutter/example/lib/bar_chart/bar_gallery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,27 @@ const groupedBarSingleTargetLineChartTileTitle =
const groupedBarSingleTargetLineChartTileSubtitle =
'Grouped bar target line chart with multiple series and a single target';

const stackedBarTargetLineChartTitle = 'Stacked Bar Target Line Chart';
const stackedBarTargetLineChart = 'Stacked Bar Target Line Chart';
const stackedBarTargetLineChartSubtitle =
'Stacked bar target line chart with multiple series';

const horizontalBarChartTitle = 'Horizontal Bar Chart';
const horizontalBarChart = 'Horizontal Bar Chart';
const horizontalBarChartSubtitle = 'Horizontal bar chart with a single series';

const stackedHorizontalBarChartTitle = 'Stacked Horizontal Bar Chart';
const stackedHorizontalBarChart = 'Stacked Horizontal Bar Chart';
const stackedHorizontalBarChartSubtitle =
'Stacked horizontal bar chart with multiple series';

const horizontalBarLabelChartTitle = 'Horizontal Bar Chart with Bar Labels';
const horizontalBarLabelChart = 'Horizontal Bar Chart with Bar Labels';
const horizontalBarLabelChartSubtitle =
'Horizontal bar chart with a single series and bar labels';

const horizontalBarLabelCustomChartTitle =
const horizontalBarLabelCustomChart =
'Horizontal Bar Chart with Custom Bar Labels';
const horizontalBarLabelCustomChartSubtitle =
'Bar labels with customized styling';

const verticalBarLabelChartTitle = 'Vertical Bar Chart with Bar Labels';
const verticalBarLabelChart = 'Vertical Bar Chart with Bar Labels';
const verticalBarLabelChartSubtitle =
'Vertical bar chart with a single series and bar labels';

Expand Down Expand Up @@ -158,7 +158,7 @@ List<GalleryScaffold> buildGallery() => [
),
GalleryScaffold(
listTileIcon: const Icon(Icons.insert_chart),
title: stackedBarTargetLineChartTitle,
title: stackedBarTargetLineChart,
subtitle: stackedBarTargetLineChartSubtitle,
childBuilder: () => appState.value.useRandomData
? StackedBarTargetLineChart.withRandomData()
Expand All @@ -169,7 +169,7 @@ List<GalleryScaffold> buildGallery() => [
angle: 1.5708,
child: const Icon(Icons.insert_chart),
),
title: horizontalBarChartTitle,
title: horizontalBarChart,
subtitle: horizontalBarChartSubtitle,
childBuilder: () => appState.value.useRandomData
? HorizontalBarChart.withRandomData()
Expand All @@ -180,7 +180,7 @@ List<GalleryScaffold> buildGallery() => [
angle: 1.5708,
child: const Icon(Icons.insert_chart),
),
title: stackedHorizontalBarChartTitle,
title: stackedHorizontalBarChart,
subtitle: stackedHorizontalBarChartSubtitle,
childBuilder: () => appState.value.useRandomData
? StackedHorizontalBarChart.withRandomData()
Expand All @@ -191,7 +191,7 @@ List<GalleryScaffold> buildGallery() => [
angle: 1.5708,
child: const Icon(Icons.insert_chart),
),
title: horizontalBarLabelChartTitle,
title: horizontalBarLabelChart,
subtitle: horizontalBarLabelChartSubtitle,
childBuilder: () => appState.value.useRandomData
? HorizontalBarLabelChart.withRandomData()
Expand All @@ -202,7 +202,7 @@ List<GalleryScaffold> buildGallery() => [
angle: 1.5708,
child: const Icon(Icons.insert_chart),
),
title: horizontalBarLabelCustomChartTitle,
title: horizontalBarLabelCustomChart,
subtitle: horizontalBarLabelCustomChartSubtitle,
childBuilder: () => appState.value.useRandomData
? HorizontalBarLabelCustomChart.withRandomData()
Expand All @@ -213,7 +213,7 @@ List<GalleryScaffold> buildGallery() => [
angle: 1.5708,
child: const Icon(Icons.insert_chart),
),
title: verticalBarLabelChartTitle,
title: verticalBarLabelChart,
subtitle: verticalBarLabelChartSubtitle,
childBuilder: () => appState.value.useRandomData
? VerticalBarLabelChart.withRandomData()
Expand Down
6 changes: 4 additions & 2 deletions charts_flutter/example/lib/gallery_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ class GalleryApp extends StatelessWidget {
valueListenable: appState,
builder: (_, currentState, __) => MaterialApp(
debugShowCheckedModeBanner: false,
title: 'nimble_charts Gallery',
title: currentState.isOriginal
? 'Charts Gallery'
: 'nimble_charts Gallery',
theme: currentState.isOriginal
? ThemeData.light()
? null
: ThemeData(
colorScheme: currentState.themeMode == ThemeMode.dark
? ColorScheme.fromSeed(
Expand Down
12 changes: 6 additions & 6 deletions charts_flutter/example/lib/picker/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ List<ChartSampleDefinition> chartSampleDefinitions = [
],
icon: Icons.bar_chart,
build: (context, item) => StackedBarTargetLineChart.withRandomData(),
title: stackedBarTargetLineChartTitle,
title: stackedBarTargetLineChart,
subtitle: stackedBarTargetLineChartSubtitle,
),
ChartSampleDefinition(
Expand All @@ -238,7 +238,7 @@ List<ChartSampleDefinition> chartSampleDefinitions = [
],
icon: Icons.bar_chart,
build: (context, item) => HorizontalBarChart.withRandomData(),
title: horizontalBarChartTitle,
title: horizontalBarChart,
subtitle: horizontalBarChartSubtitle,
),
ChartSampleDefinition(
Expand All @@ -249,7 +249,7 @@ List<ChartSampleDefinition> chartSampleDefinitions = [
],
icon: Icons.bar_chart,
build: (context, item) => StackedHorizontalBarChart.withRandomData(),
title: stackedHorizontalBarChartTitle,
title: stackedHorizontalBarChart,
subtitle: stackedHorizontalBarChartSubtitle,
),
ChartSampleDefinition(
Expand All @@ -260,7 +260,7 @@ List<ChartSampleDefinition> chartSampleDefinitions = [
],
icon: Icons.bar_chart,
build: (context, item) => HorizontalBarLabelChart.withRandomData(),
title: horizontalBarLabelChartTitle,
title: horizontalBarLabelChart,
subtitle: horizontalBarLabelChartSubtitle,
),
ChartSampleDefinition(
Expand All @@ -272,7 +272,7 @@ List<ChartSampleDefinition> chartSampleDefinitions = [
],
icon: Icons.bar_chart,
build: (context, item) => HorizontalBarLabelCustomChart.withRandomData(),
title: horizontalBarLabelCustomChartTitle,
title: horizontalBarLabelCustomChart,
subtitle: horizontalBarLabelCustomChartSubtitle,
),
ChartSampleDefinition(
Expand All @@ -283,7 +283,7 @@ List<ChartSampleDefinition> chartSampleDefinitions = [
],
icon: Icons.bar_chart,
build: (context, item) => VerticalBarLabelChart.withRandomData(),
title: verticalBarLabelChartTitle,
title: verticalBarLabelChart,
subtitle: verticalBarLabelChartSubtitle,
),
ChartSampleDefinition(
Expand Down
12 changes: 6 additions & 6 deletions charts_flutter/test/example_widget_tests/example_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,47 +89,47 @@ void main() {
testWidgets(
'Navigates to Stacked Bar Target Line Chart and Renders',
(tester) async => tester.navigateToChartAndGolden<charts.BarChart>(
stackedBarTargetLineChartTitle,
stackedBarTargetLineChart,
scrollDelta: 200,
),
);

testWidgets(
'Navigates to Horizontal Bar Chart and Renders',
(tester) async => tester.navigateToChartAndGolden<charts.BarChart>(
horizontalBarChartTitle,
horizontalBarChart,
scrollDelta: 200,
),
);

testWidgets(
'Navigates to Stacked Horizontal Bar Chart and Renders',
(tester) async => tester.navigateToChartAndGolden<charts.BarChart>(
stackedHorizontalBarChartTitle,
stackedHorizontalBarChart,
scrollDelta: 200,
),
);

testWidgets(
'Navigates to Horizontal Bar Chart with Bar Labels and Renders',
(tester) async => tester.navigateToChartAndGolden<charts.BarChart>(
horizontalBarLabelChartTitle,
horizontalBarLabelChart,
scrollDelta: 200,
),
);

testWidgets(
'Navigates to Horizontal Bar Chart with Custom Bar Labels and Renders',
(tester) async => tester.navigateToChartAndGolden<charts.BarChart>(
horizontalBarLabelCustomChartTitle,
horizontalBarLabelCustomChart,
scrollDelta: 300,
),
);

testWidgets(
'Navigates to Vertical Bar Chart with Bar Labels and Renders',
(tester) async => tester.navigateToChartAndGolden<charts.BarChart>(
verticalBarLabelChartTitle,
verticalBarLabelChart,
scrollDelta: 300,
),
);
Expand Down

0 comments on commit c01f8dd

Please sign in to comment.