Unverified Commit add5f2ea authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Updating sample code for raised button to match forthcoming diagram. (#30348)

parent 9d2fa953
...@@ -38,19 +38,26 @@ import 'theme_data.dart'; ...@@ -38,19 +38,26 @@ import 'theme_data.dart';
/// ///
/// ```dart /// ```dart
/// Widget build(BuildContext context) { /// Widget build(BuildContext context) {
/// return Scaffold( /// return Center(
/// body: Center(
/// child: Column( /// child: Column(
/// mainAxisSize: MainAxisSize.min, /// mainAxisSize: MainAxisSize.min,
/// children: <Widget>[ /// children: <Widget>[
/// RaisedButton( /// const RaisedButton(
/// onPressed: null, /// onPressed: null,
/// child: const Text('Disabled Button'), /// child: Text(
/// 'Disabled Button',
/// style: TextStyle(fontSize: 20)
/// ),
/// ), /// ),
/// const SizedBox(height: 30),
/// RaisedButton( /// RaisedButton(
/// onPressed: () {}, /// onPressed: () {},
/// child: const Text('Enabled Button'), /// child: const Text(
/// 'Enabled Button',
/// style: TextStyle(fontSize: 20)
/// ),
/// ), /// ),
/// const SizedBox(height: 30),
/// RaisedButton( /// RaisedButton(
/// onPressed: () {}, /// onPressed: () {},
/// textColor: Colors.white, /// textColor: Colors.white,
...@@ -58,15 +65,21 @@ import 'theme_data.dart'; ...@@ -58,15 +65,21 @@ import 'theme_data.dart';
/// child: Container( /// child: Container(
/// decoration: const BoxDecoration( /// decoration: const BoxDecoration(
/// gradient: LinearGradient( /// gradient: LinearGradient(
/// colors: <Color>[Colors.red, Colors.green, Colors.blue], /// colors: <Color>[
/// Color(0xFF0D47A1),
/// Color(0xFF1976D2),
/// Color(0xFF42A5F5),
/// ],
/// ), /// ),
/// ), /// ),
/// padding: const EdgeInsets.all(10.0), /// padding: const EdgeInsets.all(10.0),
/// child: Text('Gradient Button'), /// child: const Text(
/// 'Gradient Button',
/// style: TextStyle(fontSize: 20)
/// ), /// ),
/// ), /// ),
/// ],
/// ), /// ),
/// ],
/// ), /// ),
/// ); /// );
/// } /// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment