From c01f8ddbb078bef6586fdebb2e8b8c2f731b5806 Mon Sep 17 00:00:00 2001 From: Christian Findlay <16697547+MelbourneDeveloper@users.noreply.github.com> Date: Sun, 22 Sep 2024 11:08:48 +1000 Subject: [PATCH] revert some stuff --- .../example/lib/bar_chart/bar_gallery.dart | 24 +++++++++---------- charts_flutter/example/lib/gallery_app.dart | 6 +++-- charts_flutter/example/lib/picker/data.dart | 12 +++++----- .../example_widget_tests/example_test.dart | 12 +++++----- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/charts_flutter/example/lib/bar_chart/bar_gallery.dart b/charts_flutter/example/lib/bar_chart/bar_gallery.dart index 77d078593..f1cde8e84 100644 --- a/charts_flutter/example/lib/bar_chart/bar_gallery.dart +++ b/charts_flutter/example/lib/bar_chart/bar_gallery.dart @@ -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'; @@ -158,7 +158,7 @@ List buildGallery() => [ ), GalleryScaffold( listTileIcon: const Icon(Icons.insert_chart), - title: stackedBarTargetLineChartTitle, + title: stackedBarTargetLineChart, subtitle: stackedBarTargetLineChartSubtitle, childBuilder: () => appState.value.useRandomData ? StackedBarTargetLineChart.withRandomData() @@ -169,7 +169,7 @@ List buildGallery() => [ angle: 1.5708, child: const Icon(Icons.insert_chart), ), - title: horizontalBarChartTitle, + title: horizontalBarChart, subtitle: horizontalBarChartSubtitle, childBuilder: () => appState.value.useRandomData ? HorizontalBarChart.withRandomData() @@ -180,7 +180,7 @@ List buildGallery() => [ angle: 1.5708, child: const Icon(Icons.insert_chart), ), - title: stackedHorizontalBarChartTitle, + title: stackedHorizontalBarChart, subtitle: stackedHorizontalBarChartSubtitle, childBuilder: () => appState.value.useRandomData ? StackedHorizontalBarChart.withRandomData() @@ -191,7 +191,7 @@ List buildGallery() => [ angle: 1.5708, child: const Icon(Icons.insert_chart), ), - title: horizontalBarLabelChartTitle, + title: horizontalBarLabelChart, subtitle: horizontalBarLabelChartSubtitle, childBuilder: () => appState.value.useRandomData ? HorizontalBarLabelChart.withRandomData() @@ -202,7 +202,7 @@ List buildGallery() => [ angle: 1.5708, child: const Icon(Icons.insert_chart), ), - title: horizontalBarLabelCustomChartTitle, + title: horizontalBarLabelCustomChart, subtitle: horizontalBarLabelCustomChartSubtitle, childBuilder: () => appState.value.useRandomData ? HorizontalBarLabelCustomChart.withRandomData() @@ -213,7 +213,7 @@ List buildGallery() => [ angle: 1.5708, child: const Icon(Icons.insert_chart), ), - title: verticalBarLabelChartTitle, + title: verticalBarLabelChart, subtitle: verticalBarLabelChartSubtitle, childBuilder: () => appState.value.useRandomData ? VerticalBarLabelChart.withRandomData() diff --git a/charts_flutter/example/lib/gallery_app.dart b/charts_flutter/example/lib/gallery_app.dart index f9faaf475..2092576a2 100644 --- a/charts_flutter/example/lib/gallery_app.dart +++ b/charts_flutter/example/lib/gallery_app.dart @@ -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( diff --git a/charts_flutter/example/lib/picker/data.dart b/charts_flutter/example/lib/picker/data.dart index c18edeb77..ffea3cb51 100644 --- a/charts_flutter/example/lib/picker/data.dart +++ b/charts_flutter/example/lib/picker/data.dart @@ -227,7 +227,7 @@ List chartSampleDefinitions = [ ], icon: Icons.bar_chart, build: (context, item) => StackedBarTargetLineChart.withRandomData(), - title: stackedBarTargetLineChartTitle, + title: stackedBarTargetLineChart, subtitle: stackedBarTargetLineChartSubtitle, ), ChartSampleDefinition( @@ -238,7 +238,7 @@ List chartSampleDefinitions = [ ], icon: Icons.bar_chart, build: (context, item) => HorizontalBarChart.withRandomData(), - title: horizontalBarChartTitle, + title: horizontalBarChart, subtitle: horizontalBarChartSubtitle, ), ChartSampleDefinition( @@ -249,7 +249,7 @@ List chartSampleDefinitions = [ ], icon: Icons.bar_chart, build: (context, item) => StackedHorizontalBarChart.withRandomData(), - title: stackedHorizontalBarChartTitle, + title: stackedHorizontalBarChart, subtitle: stackedHorizontalBarChartSubtitle, ), ChartSampleDefinition( @@ -260,7 +260,7 @@ List chartSampleDefinitions = [ ], icon: Icons.bar_chart, build: (context, item) => HorizontalBarLabelChart.withRandomData(), - title: horizontalBarLabelChartTitle, + title: horizontalBarLabelChart, subtitle: horizontalBarLabelChartSubtitle, ), ChartSampleDefinition( @@ -272,7 +272,7 @@ List chartSampleDefinitions = [ ], icon: Icons.bar_chart, build: (context, item) => HorizontalBarLabelCustomChart.withRandomData(), - title: horizontalBarLabelCustomChartTitle, + title: horizontalBarLabelCustomChart, subtitle: horizontalBarLabelCustomChartSubtitle, ), ChartSampleDefinition( @@ -283,7 +283,7 @@ List chartSampleDefinitions = [ ], icon: Icons.bar_chart, build: (context, item) => VerticalBarLabelChart.withRandomData(), - title: verticalBarLabelChartTitle, + title: verticalBarLabelChart, subtitle: verticalBarLabelChartSubtitle, ), ChartSampleDefinition( diff --git a/charts_flutter/test/example_widget_tests/example_test.dart b/charts_flutter/test/example_widget_tests/example_test.dart index 951b02410..5309c3a92 100644 --- a/charts_flutter/test/example_widget_tests/example_test.dart +++ b/charts_flutter/test/example_widget_tests/example_test.dart @@ -89,7 +89,7 @@ void main() { testWidgets( 'Navigates to Stacked Bar Target Line Chart and Renders', (tester) async => tester.navigateToChartAndGolden( - stackedBarTargetLineChartTitle, + stackedBarTargetLineChart, scrollDelta: 200, ), ); @@ -97,7 +97,7 @@ void main() { testWidgets( 'Navigates to Horizontal Bar Chart and Renders', (tester) async => tester.navigateToChartAndGolden( - horizontalBarChartTitle, + horizontalBarChart, scrollDelta: 200, ), ); @@ -105,7 +105,7 @@ void main() { testWidgets( 'Navigates to Stacked Horizontal Bar Chart and Renders', (tester) async => tester.navigateToChartAndGolden( - stackedHorizontalBarChartTitle, + stackedHorizontalBarChart, scrollDelta: 200, ), ); @@ -113,7 +113,7 @@ void main() { testWidgets( 'Navigates to Horizontal Bar Chart with Bar Labels and Renders', (tester) async => tester.navigateToChartAndGolden( - horizontalBarLabelChartTitle, + horizontalBarLabelChart, scrollDelta: 200, ), ); @@ -121,7 +121,7 @@ void main() { testWidgets( 'Navigates to Horizontal Bar Chart with Custom Bar Labels and Renders', (tester) async => tester.navigateToChartAndGolden( - horizontalBarLabelCustomChartTitle, + horizontalBarLabelCustomChart, scrollDelta: 300, ), ); @@ -129,7 +129,7 @@ void main() { testWidgets( 'Navigates to Vertical Bar Chart with Bar Labels and Renders', (tester) async => tester.navigateToChartAndGolden( - verticalBarLabelChartTitle, + verticalBarLabelChart, scrollDelta: 300, ), );