mdcharts 4.0.0-dev.11
mdcharts: ^4.0.0-dev.11 copied to clipboard
march.dev charts library. Provides highly customizable and configurable charts.
example/lib/main.dart
// Copyright (c) 2022, the MarchDev Toolkit project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'src/bar_chart.dart';
import 'src/gauge_chart.dart';
import 'src/line_chart.dart';
import 'src/scaffolds/example_scaffold.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'MDCharts Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomePage(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return const ExampleScaffold(
tabs: {
'Line Chart': LineChartExample(),
'Bar Chart': BarChartExample(),
'Gauge Chart': GaugeChartExample(),
},
);
}
}