Revised Floating Action Button examples (#128058)
Of the original 4 examples, the first 3 mostly covered the same API features and occupied quite a bit of real-estate at the top of https://api.flutter.dev/flutter/material/FloatingActionButton-class.html. Additionally the illustrations and the code samples didn't match in some cases. Replaced examples 0,1,2 with one example that changes attributes of the FAB when it's pushed. Fixes https://github.com/flutter/flutter/issues/128048
This commit is contained in:
@@ -52,39 +52,21 @@ enum _FloatingActionButtonType {
|
||||
/// action button.
|
||||
///
|
||||
/// {@tool dartpad}
|
||||
/// This example shows how to display a [FloatingActionButton] in a
|
||||
/// [Scaffold], with a pink [backgroundColor] and a thumbs up [Icon].
|
||||
///
|
||||
/// 
|
||||
/// This example shows a [FloatingActionButton] in its usual position within a
|
||||
/// [Scaffold]. Pressing the button cycles it through a few variations in its
|
||||
/// [foregroundColor], [backgroundColor], and [shape]. The button automatically
|
||||
/// animates its segue from one set of visual parameters to another.
|
||||
///
|
||||
/// ** See code in examples/api/lib/material/floating_action_button/floating_action_button.0.dart **
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// {@tool dartpad}
|
||||
/// This example shows how to make an extended [FloatingActionButton] in a
|
||||
/// [Scaffold], with a pink [backgroundColor], a thumbs up [Icon] and a
|
||||
/// [Text] label that reads "Approve".
|
||||
///
|
||||
/// 
|
||||
/// This sample shows all the variants of [FloatingActionButton] widget as
|
||||
/// described in: https://m3.material.io/components/floating-action-button/overview.
|
||||
///
|
||||
/// ** See code in examples/api/lib/material/floating_action_button/floating_action_button.1.dart **
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// Material Design 3 introduced new types of floating action buttons.
|
||||
/// {@tool dartpad}
|
||||
/// This sample shows the creation of [FloatingActionButton] widget in the typical location in a Scaffold,
|
||||
/// as described in: https://m3.material.io/components/floating-action-button/overview
|
||||
///
|
||||
/// ** See code in examples/api/lib/material/floating_action_button/floating_action_button.2.dart **
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// {@tool dartpad}
|
||||
/// This sample shows the creation of all the variants of [FloatingActionButton] widget as
|
||||
/// described in: https://m3.material.io/components/floating-action-button/overview
|
||||
///
|
||||
/// ** See code in examples/api/lib/material/floating_action_button/floating_action_button.3.dart **
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [Scaffold], in which floating action buttons typically live.
|
||||
|
||||
Reference in New Issue
Block a user