save_points_chart 1.4.1 copy "save_points_chart: ^1.4.1" to clipboard
save_points_chart: ^1.4.1 copied to clipboard

Modern Flutter charting library with 12 chart types, Material 3 design, smooth animations, and zero dependencies.

example/main.dart

import 'package:flutter/material.dart';
import 'package:save_points_chart/save_points_chart.dart';
import 'widgets/area_chart_card.dart';
import 'widgets/bar_chart_card.dart';
import 'widgets/donut_chart_card.dart';
import 'widgets/line_chart_card.dart';
import 'widgets/pie_chart_card.dart';
import 'widgets/stacked_area_chart_card.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Save Points Chart Example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      darkTheme: ThemeData.dark(useMaterial3: true),
      home: const ChartExamplePage(),
    );
  }
}

class ChartExamplePage extends StatefulWidget {
  const ChartExamplePage({super.key});

  @override
  State<ChartExamplePage> createState() => _ChartExamplePageState();
}

class _ChartExamplePageState extends State<ChartExamplePage> {
  bool _isDarkMode = false;

  @override
  Widget build(BuildContext context) {
    final theme = _isDarkMode ? ChartTheme.dark() : ChartTheme.light();

    return Scaffold(
      appBar: AppBar(
        title: const Text('Save Points Chart Examples'),
        actions: [_iconChangeTheme()],
      ),
      body: ListView(
        padding: const EdgeInsets.all(16),
        children: [
          LineChartCard(theme: theme),
          const SizedBox(height: 16),
          AreaChartCard(theme: theme),
          const SizedBox(height: 16),
          StackedAreaChartCard(theme: theme),
          const SizedBox(height: 16),
          BarChartCard(theme: theme),
          const SizedBox(height: 16),
          PieChartCard(theme: theme),
          const SizedBox(height: 16),
          DonutChartCard(theme: theme),
        ],
      ),
    );
  }

  IconButton _iconChangeTheme() {
    return IconButton(
      icon: Icon(_isDarkMode ? Icons.light_mode : Icons.dark_mode),
      onPressed: () {
        setState(() {
          _isDarkMode = !_isDarkMode;
        });
      },
    );
  }
}
3
likes
0
points
403
downloads

Publisher

unverified uploader

Weekly Downloads

Modern Flutter charting library with 12 chart types, Material 3 design, smooth animations, and zero dependencies.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on save_points_chart