Created
May 28, 2021 11:04
-
-
Save imaNNeo/f74d7b952b990702403ec5e64b136065 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:fl_chart/fl_chart.dart'; | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'FlChart Demo', | |
| showPerformanceOverlay: false, | |
| theme: ThemeData( | |
| primaryColor: const Color(0xff262545), | |
| primaryColorDark: const Color(0xff201f39), | |
| brightness: Brightness.dark, | |
| ), | |
| home: Scaffold( | |
| body: Center( | |
| child: AspectRatio( | |
| aspectRatio: 1.0, | |
| child: BarChart( | |
| BarChartData( | |
| barGroups: [ | |
| BarChartGroupData(x: 0, barRods: [BarChartRodData(y: 10)]), | |
| BarChartGroupData(x: 1, barRods: [BarChartRodData(y: 20)]), | |
| BarChartGroupData(x: 2, barRods: [BarChartRodData(y: 15)]), | |
| ], | |
| gridData: FlGridData( | |
| show: true, | |
| drawHorizontalLine: true, | |
| drawVerticalLine: true, | |
| ) | |
| ) | |
| ), | |
| ), | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment