Commit 9ad94220 authored by Devon Carew's avatar Devon Carew

Merge pull request #907 from devoncarew/mini_fab

support mini fabs
parents 5b42f83f a8582228
......@@ -13,6 +13,7 @@ import 'theme.dart';
// TODO(eseidel): This needs to change based on device size?
// http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-keylines-spacing
const double _kSize = 56.0;
const double _kSizeMini = 40.0;
class FloatingActionButton extends StatefulComponent {
const FloatingActionButton({
......@@ -21,7 +22,8 @@ class FloatingActionButton extends StatefulComponent {
this.backgroundColor,
this.elevation: 6,
this.highlightElevation: 12,
this.onPressed
this.onPressed,
this.mini: false
}) : super(key: key);
final Widget child;
......@@ -29,6 +31,7 @@ class FloatingActionButton extends StatefulComponent {
final VoidCallback onPressed;
final int elevation;
final int highlightElevation;
final bool mini;
_FloatingActionButtonState createState() => new _FloatingActionButtonState();
}
......@@ -56,8 +59,8 @@ class _FloatingActionButtonState extends State<FloatingActionButton> {
type: MaterialType.circle,
elevation: _highlight ? config.highlightElevation : config.elevation,
child: new Container(
width: _kSize,
height: _kSize,
width: config.mini ? _kSizeMini : _kSize,
height: config.mini ? _kSizeMini : _kSize,
child: new InkWell(
onTap: config.onPressed,
onHighlightChanged: _handleHighlightChanged,
......
......@@ -1252,7 +1252,7 @@ class RawText extends LeafRenderObjectWidget {
/// A convience widget for paragraphs of text with heterogeneous style.
///
/// The elements paramter is a recusrive list of lists that matches the
/// The elements parameter is a recursive list of lists that matches the
/// following grammar:
///
/// `elements ::= "string" | [<text-style> <elements>*]``
......
......@@ -60,7 +60,7 @@ class StatisticsOverlay extends LeafRenderObjectWidget {
/// The rasterizer threshold is an integer specifying the number of frame
/// intervals that the rasterizer must miss before it decides that the frame
/// is suitable for capturing an SkPicture trace from for further analysis.
/// is suitable for capturing an SkPicture trace for further analysis.
///
/// For example, if you want a trace of all pictures that could not be
/// renderered by the rasterizer within the frame boundary (and hence caused
......
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