From add5f2ea768c60910f589a57400e625a85b8b583 Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Tue, 2 Apr 2019 09:28:13 -0700 Subject: [PATCH] Updating sample code for raised button to match forthcoming diagram. (#30348) --- .../lib/src/material/raised_button.dart | 61 +++++++++++-------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/packages/flutter/lib/src/material/raised_button.dart b/packages/flutter/lib/src/material/raised_button.dart index 6209bfd945..054798631d 100644 --- a/packages/flutter/lib/src/material/raised_button.dart +++ b/packages/flutter/lib/src/material/raised_button.dart @@ -38,35 +38,48 @@ import 'theme_data.dart'; /// /// ```dart /// Widget build(BuildContext context) { -/// return Scaffold( -/// body: Center( -/// child: Column( -/// mainAxisSize: MainAxisSize.min, -/// children: [ -/// RaisedButton( -/// onPressed: null, -/// child: const Text('Disabled Button'), +/// return Center( +/// child: Column( +/// mainAxisSize: MainAxisSize.min, +/// children: [ +/// const RaisedButton( +/// onPressed: null, +/// child: Text( +/// 'Disabled Button', +/// style: TextStyle(fontSize: 20) /// ), -/// RaisedButton( -/// onPressed: () {}, -/// child: const Text('Enabled Button'), +/// ), +/// const SizedBox(height: 30), +/// RaisedButton( +/// onPressed: () {}, +/// child: const Text( +/// 'Enabled Button', +/// style: TextStyle(fontSize: 20) /// ), -/// RaisedButton( -/// onPressed: () {}, -/// textColor: Colors.white, -/// padding: const EdgeInsets.all(0.0), -/// child: Container( -/// decoration: const BoxDecoration( -/// gradient: LinearGradient( -/// colors: [Colors.red, Colors.green, Colors.blue], -/// ), +/// ), +/// const SizedBox(height: 30), +/// RaisedButton( +/// onPressed: () {}, +/// textColor: Colors.white, +/// padding: const EdgeInsets.all(0.0), +/// child: Container( +/// decoration: const BoxDecoration( +/// gradient: LinearGradient( +/// colors: [ +/// Color(0xFF0D47A1), +/// Color(0xFF1976D2), +/// Color(0xFF42A5F5), +/// ], /// ), -/// padding: const EdgeInsets.all(10.0), -/// child: Text('Gradient Button'), +/// ), +/// padding: const EdgeInsets.all(10.0), +/// child: const Text( +/// 'Gradient Button', +/// style: TextStyle(fontSize: 20) /// ), /// ), -/// ], -/// ), +/// ), +/// ], /// ), /// ); /// }