simple_line_chart 1.1.1 simple_line_chart: ^1.1.1 copied to clipboard
Provides a simple line chart. An opinionated library that focuses on API simplicity.
import 'package:flutter/material.dart';
import 'line_chart_content.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData.light(),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
MyHomePage();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Line Chart Example"),
),
body: SafeArea(
child: Padding(
padding: EdgeInsets.only(left: 16, right: 16),
child: LayoutBuilder(builder:
(BuildContext context, BoxConstraints viewportConstraints) {
return SingleChildScrollView(
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: viewportConstraints.maxHeight,
),
child: LineChartContent()));
}))),
);
}
}