Skip to content

Commit 286116c

Browse files
authored
Add MaterialButton
- Add `MaterialButton` element with the properties and example values
1 parent 4224d56 commit 286116c

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,26 @@ new Icon(Icons.flight_takeoff, color: Colors.blueAccent, size: 96.0),
541541

542542
## Button
543543

544+
### Material Button
545+
546+
<a href="https://imgur.com/x30XGUf"><img src="https://i.imgur.com/x30XGUf.png" title="source: imgur.com" /></a>
547+
548+
```dart
549+
MaterialButton(
550+
onPressed: () {
551+
debugPrint('I am a material button');
552+
},
553+
shape: const StadiumBorder(),
554+
textColor: Colors.black,
555+
color: Colors.blue[300],
556+
splashColor: Colors.blue[900],
557+
disabledColor: Colors.grey,
558+
disabledTextColor: Colors.white,
559+
highlightColor: Colors.orangeAccent,
560+
child: Text('Flat Button'),
561+
),
562+
```
563+
544564
### Flat Button
545565

546566
<a href="https://imgur.com/x30XGUf"><img src="https://i.imgur.com/x30XGUf.png" title="source: imgur.com" /></a>
@@ -605,7 +625,7 @@ IconButton(
605625

606626

607627
```dart
608-
return Scaffold(
628+
Scaffold(
609629
floatingActionButton: new FloatingActionButton(
610630
mini: true,
611631
child: new Icon(Icons.add),

0 commit comments

Comments
 (0)