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,3 +891,61 @@ 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+ ),
911+ );
912+ }
913+ }
914+
915+ class ButtonsDemoPage extends StatelessWidget {
916+ @override
917+ Widget build(BuildContext context) {
918+ return Column(
919+ children:[
920+ // Text Button
921+
922+ TextButton(
923+ onPressed: () {
924+ // Respond to button press
925+ },
926+ child: Text("TEXT BUTTON"),
927+ ),
928+
929+ // Outlined Button
930+
931+ OutlinedButton(
932+ onPressed: () {
933+ // Respond to button press
934+ },
935+ child: Text("OUTLINED BUTTON"),
936+ ),
937+
938+ // Elevated Button
939+
940+ ElevatedButton(
941+ onPressed: () {
942+ // Respond to button press
943+ },
944+ child: Text('CONTAINED BUTTON'),
945+ ),
946+ ]
947+ );
948+ }
949+ }
950+ ```
951+
You can’t perform that action at this time.
0 commit comments