File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -891,6 +891,58 @@ class SnackBarPage extends StatelessWidget {
891891 }
892892}
893893```
894+ ## Buttons
895+ ``` dart
896+ import 'package:flutter/material.dart';
897+
898+ void main() => runApp(ButtonsDemo());
899+
900+ class ButtonsDemo extends StatelessWidget {
901+ @override
902+ Widget build(BuildContext context) {
903+ return MaterialApp(
904+ title: 'Buttons Demo',
905+ home: Scaffold(
906+ appBar: AppBar(
907+ title: Text('Buttons Demo'),
908+ ),
909+ body: ButtonsDemoPage(),
910+ class ButtonsDemoPage extends StatelessWidget {
911+ @override
912+ Widget build(BuildContext context) {
913+ return Column(
914+ children:[
915+ // Text Button
916+
917+ TextButton(
918+ onPressed: () {
919+ // Respond to button press
920+ },
921+ child: Text("TEXT BUTTON"),
922+ ),
923+
924+ // Outlined Button
925+
926+ OutlinedButton(
927+ onPressed: () {
928+ // Respond to button press
929+ },
930+ child: Text("OUTLINED BUTTON"),
931+ ),
932+
933+ // Elevated Button
934+
935+ ElevatedButton(
936+ onPressed: () {
937+ // Respond to button press
938+ },
939+ child: Text('CONTAINED BUTTON'),
940+ ),
941+ ]
942+ );
943+ }
944+ }
945+ ```
894946## Carousel
895947``` dart
896948import 'package:flutter/material.dart';
@@ -1176,4 +1228,3 @@ class _HomePageState extends State<HomePage> {
11761228 }
11771229}
11781230```
1179-
You can’t perform that action at this time.
0 commit comments