fastyle_exchanges 1.0.0 fastyle_exchanges: ^1.0.0 copied to clipboard
A set of widgets with defined style.
import 'package:fastyle_dart/fastyle_dart.dart';
import 'package:fastyle_exchanges/fastyle_exchanges.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
FastExchangeAppBarGraphtype _graphType = FastExchangeAppBarGraphtype.line;
@override
Widget build(BuildContext context) {
return FastApp(
lightTheme: FastTheme.light.indigo,
darkTheme: FastTheme.dark.indigo,
home: FastExchangeHomePage(
titleText: 'Welcome!',
subtitleText: 'Have a wonderful day!',
contentPadding: kFastEdgeInsets16,
children: [
FastRaisedButton(
text: 'Line Graph',
onTap: () {
setState(() {
_graphType = FastExchangeAppBarGraphtype.line;
});
},
),
FastRaisedButton(
text: 'Pie Graph',
onTap: () {
setState(() {
_graphType = FastExchangeAppBarGraphtype.pie;
});
},
),
FastRaisedButton(
text: 'Bar Graph',
onTap: () {
setState(() {
_graphType = FastExchangeAppBarGraphtype.bar;
});
},
),
],
leading: IconButton(
onPressed: () {},
icon: Icon(Icons.settings),
),
actions: [
IconButton(
onPressed: () {},
icon: Icon(Icons.search),
),
],
floatingActionButton: Icon(Icons.settings),
appBarExpandedHeight: 250,
graphType: _graphType,
),
);
}
}