mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[rename fixit] *Component* -> *Widget*
This patch renames StatelessComponent to StatelessWidget and StatefulComponent to StatefulWidget. Fixes #2308
This commit is contained in:
parent
892063ac69
commit
95fc5ae070
@ -16,7 +16,7 @@ class CardModel {
|
|||||||
Key get key => new ObjectKey(this);
|
Key get key => new ObjectKey(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
class CardCollection extends StatefulComponent {
|
class CardCollection extends StatefulWidget {
|
||||||
CardCollectionState createState() => new CardCollectionState();
|
CardCollectionState createState() => new CardCollectionState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import 'dart:math' as math;
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ExampleDragTarget extends StatefulComponent {
|
class ExampleDragTarget extends StatefulWidget {
|
||||||
ExampleDragTargetState createState() => new ExampleDragTargetState();
|
ExampleDragTargetState createState() => new ExampleDragTargetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Dot extends StatefulComponent {
|
class Dot extends StatefulWidget {
|
||||||
Dot({ Key key, this.color, this.size, this.child, this.tappable: false }) : super(key: key);
|
Dot({ Key key, this.color, this.size, this.child, this.tappable: false }) : super(key: key);
|
||||||
final Color color;
|
final Color color;
|
||||||
final double size;
|
final double size;
|
||||||
@ -66,7 +66,7 @@ class DotState extends State<Dot> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ExampleDragSource extends StatelessComponent {
|
class ExampleDragSource extends StatelessWidget {
|
||||||
ExampleDragSource({
|
ExampleDragSource({
|
||||||
Key key,
|
Key key,
|
||||||
this.color,
|
this.color,
|
||||||
@ -162,7 +162,7 @@ class DashOutlineCirclePainter extends CustomPainter {
|
|||||||
bool shouldRepaint(DashOutlineCirclePainter oldPainter) => false;
|
bool shouldRepaint(DashOutlineCirclePainter oldPainter) => false;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MovableBall extends StatelessComponent {
|
class MovableBall extends StatelessWidget {
|
||||||
MovableBall(this.position, this.ballPosition, this.callback);
|
MovableBall(this.position, this.ballPosition, this.callback);
|
||||||
|
|
||||||
final int position;
|
final int position;
|
||||||
@ -212,7 +212,7 @@ class MovableBall extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DragAndDropApp extends StatefulComponent {
|
class DragAndDropApp extends StatefulWidget {
|
||||||
DragAndDropAppState createState() => new DragAndDropAppState();
|
DragAndDropAppState createState() => new DragAndDropAppState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ enum WindowSide {
|
|||||||
bottomRight,
|
bottomRight,
|
||||||
}
|
}
|
||||||
|
|
||||||
class WindowDecoration extends StatelessComponent {
|
class WindowDecoration extends StatelessWidget {
|
||||||
WindowDecoration({
|
WindowDecoration({
|
||||||
Key key,
|
Key key,
|
||||||
this.side,
|
this.side,
|
||||||
@ -87,7 +87,7 @@ class WindowDecoration extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Window extends StatefulComponent {
|
class Window extends StatefulWidget {
|
||||||
Window({ Key key, this.child, this.onClose }) : super(key: key);
|
Window({ Key key, this.child, this.onClose }) : super(key: key);
|
||||||
|
|
||||||
final ChildViewConnection child;
|
final ChildViewConnection child;
|
||||||
@ -155,7 +155,7 @@ class _WindowState extends State<Window> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LauncherItem extends StatelessComponent {
|
class LauncherItem extends StatelessWidget {
|
||||||
LauncherItem({
|
LauncherItem({
|
||||||
Key key,
|
Key key,
|
||||||
this.url,
|
this.url,
|
||||||
@ -175,7 +175,7 @@ class LauncherItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Launcher extends StatelessComponent {
|
class Launcher extends StatelessWidget {
|
||||||
Launcher({ Key key, this.items }) : super(key: key);
|
Launcher({ Key key, this.items }) : super(key: key);
|
||||||
|
|
||||||
final List<Widget> items;
|
final List<Widget> items;
|
||||||
@ -188,7 +188,7 @@ class Launcher extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class WindowManager extends StatefulComponent {
|
class WindowManager extends StatefulWidget {
|
||||||
_WindowManagerState createState() => new _WindowManagerState();
|
_WindowManagerState createState() => new _WindowManagerState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class _MarkerPainter extends CustomPainter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Marker extends StatelessComponent {
|
class Marker extends StatelessWidget {
|
||||||
Marker({
|
Marker({
|
||||||
this.type: MarkerType.touch,
|
this.type: MarkerType.touch,
|
||||||
this.position,
|
this.position,
|
||||||
@ -82,7 +82,7 @@ class Marker extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class OverlayGeometryApp extends StatefulComponent {
|
class OverlayGeometryApp extends StatefulWidget {
|
||||||
OverlayGeometryAppState createState() => new OverlayGeometryAppState();
|
OverlayGeometryAppState createState() => new OverlayGeometryAppState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class CardModel {
|
|||||||
Key get key => new ObjectKey(this);
|
Key get key => new ObjectKey(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
class PageableListApp extends StatefulComponent {
|
class PageableListApp extends StatefulWidget {
|
||||||
PageableListAppState createState() => new PageableListAppState();
|
PageableListAppState createState() => new PageableListAppState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class RawKeyboardDemo extends StatefulComponent {
|
class RawKeyboardDemo extends StatefulWidget {
|
||||||
RawKeyboardDemo({ GlobalKey key }) : super(key: key);
|
RawKeyboardDemo({ GlobalKey key }) : super(key: key);
|
||||||
|
|
||||||
_HardwareKeyDemoState createState() => new _HardwareKeyDemoState();
|
_HardwareKeyDemoState createState() => new _HardwareKeyDemoState();
|
||||||
|
@ -51,7 +51,7 @@ class PianoKey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PianoApp extends StatelessComponent {
|
class PianoApp extends StatelessWidget {
|
||||||
final List<PianoKey> keys = <PianoKey>[
|
final List<PianoKey> keys = <PianoKey>[
|
||||||
new PianoKey(Colors.red[500], chimes),
|
new PianoKey(Colors.red[500], chimes),
|
||||||
new PianoKey(Colors.orange[500], chainsaw),
|
new PianoKey(Colors.orange[500], chainsaw),
|
||||||
|
@ -46,7 +46,7 @@ class _MyAutoLayoutDelegate extends AutoLayoutDelegate {
|
|||||||
bool shouldUpdateConstraints(_MyAutoLayoutDelegate oldDelegate) => true;
|
bool shouldUpdateConstraints(_MyAutoLayoutDelegate oldDelegate) => true;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ColoredBoxes extends StatefulComponent {
|
class ColoredBoxes extends StatefulWidget {
|
||||||
_ColoredBoxesState createState() => new _ColoredBoxesState();
|
_ColoredBoxesState createState() => new _ColoredBoxesState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class _GesturePainter extends CustomPainter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GestureDemo extends StatefulComponent {
|
class GestureDemo extends StatefulWidget {
|
||||||
_GestureDemoState createState() => new _GestureDemoState();
|
_GestureDemoState createState() => new _GestureDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AdaptedListItem extends StatelessComponent {
|
class AdaptedListItem extends StatelessWidget {
|
||||||
AdaptedListItem({ Key key, this.name }) : super(key: key);
|
AdaptedListItem({ Key key, this.name }) : super(key: key);
|
||||||
|
|
||||||
final String name;
|
final String name;
|
||||||
@ -26,7 +26,7 @@ class AdaptedListItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AdaptedGridItem extends StatelessComponent {
|
class AdaptedGridItem extends StatelessWidget {
|
||||||
AdaptedGridItem({ Key key, this.name }) : super(key: key);
|
AdaptedGridItem({ Key key, this.name }) : super(key: key);
|
||||||
|
|
||||||
final String name;
|
final String name;
|
||||||
@ -65,7 +65,7 @@ const double _kListItemExtent = 50.0;
|
|||||||
const double _kMaxTileWidth = 150.0;
|
const double _kMaxTileWidth = 150.0;
|
||||||
const double _kGridViewBreakpoint = 450.0;
|
const double _kGridViewBreakpoint = 450.0;
|
||||||
|
|
||||||
class AdaptiveContainer extends StatelessComponent {
|
class AdaptiveContainer extends StatelessWidget {
|
||||||
AdaptiveContainer({ Key key, this.names }) : super(key: key);
|
AdaptiveContainer({ Key key, this.names }) : super(key: key);
|
||||||
|
|
||||||
final List<String> names;
|
final List<String> names;
|
||||||
|
@ -16,7 +16,7 @@ RenderBox initCircle() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SectorApp extends StatefulComponent {
|
class SectorApp extends StatefulWidget {
|
||||||
SectorAppState createState() => new SectorAppState();
|
SectorAppState createState() => new SectorAppState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ void addFlexChildSolidColor(RenderFlex parent, Color backgroundColor, { int flex
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Solid colour, Widget version
|
// Solid colour, Widget version
|
||||||
class Rectangle extends StatelessComponent {
|
class Rectangle extends StatelessWidget {
|
||||||
Rectangle(this.color, { Key key }) : super(key: key);
|
Rectangle(this.color, { Key key }) : super(key: key);
|
||||||
final Color color;
|
final Color color;
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
class SpinningSquare extends StatefulComponent {
|
class SpinningSquare extends StatefulWidget {
|
||||||
_SpinningSquareState createState() => new _SpinningSquareState();
|
_SpinningSquareState createState() => new _SpinningSquareState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ Widget toStyledText(String name, String text) {
|
|||||||
|
|
||||||
Widget toPlainText(String name, String text) => new Text(name + ":" + text);
|
Widget toPlainText(String name, String text) => new Text(name + ":" + text);
|
||||||
|
|
||||||
class SpeakerSeparator extends StatelessComponent {
|
class SpeakerSeparator extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new Container(
|
return new Container(
|
||||||
constraints: const BoxConstraints.expand(height: 0.0),
|
constraints: const BoxConstraints.expand(height: 0.0),
|
||||||
@ -71,7 +71,7 @@ class SpeakerSeparator extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StyledTextDemo extends StatefulComponent {
|
class StyledTextDemo extends StatefulWidget {
|
||||||
_StyledTextDemoState createState() => new _StyledTextDemoState();
|
_StyledTextDemoState createState() => new _StyledTextDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class _ButtonDemo {
|
|||||||
int get hashCode => hashValues(title.hashCode, text.hashCode);
|
int get hashCode => hashValues(title.hashCode, text.hashCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ButtonsDemo extends StatefulComponent {
|
class ButtonsDemo extends StatefulWidget {
|
||||||
_ButtonsDemoState createState() => new _ButtonsDemoState();
|
_ButtonsDemoState createState() => new _ButtonsDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ final List<TravelDestination> destinations = <TravelDestination>[
|
|||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
class TravelDestinationItem extends StatelessComponent {
|
class TravelDestinationItem extends StatelessWidget {
|
||||||
TravelDestinationItem({ Key key, this.destination }) : super(key: key) {
|
TravelDestinationItem({ Key key, this.destination }) : super(key: key) {
|
||||||
assert(destination != null && destination.isValid);
|
assert(destination != null && destination.isValid);
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ class TravelDestinationItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CardsDemo extends StatelessComponent {
|
class CardsDemo extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new Scaffold(
|
return new Scaffold(
|
||||||
toolBar: new ToolBar(
|
toolBar: new ToolBar(
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ChipDemo extends StatefulComponent {
|
class ChipDemo extends StatefulWidget {
|
||||||
_ChipDemoState createState() => new _ChipDemoState();
|
_ChipDemoState createState() => new _ChipDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ const List<ColorSwatch> colorSwatches = const <ColorSwatch>[
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
class ColorItem extends StatelessComponent {
|
class ColorItem extends StatelessWidget {
|
||||||
ColorItem({ Key key, this.index, this.color, this.prefix: '' }) : super(key: key) {
|
ColorItem({ Key key, this.index, this.color, this.prefix: '' }) : super(key: key) {
|
||||||
assert(index != null);
|
assert(index != null);
|
||||||
assert(color != null);
|
assert(color != null);
|
||||||
@ -71,7 +71,7 @@ class ColorItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ColorSwatchTabView extends StatelessComponent {
|
class ColorSwatchTabView extends StatelessWidget {
|
||||||
ColorSwatchTabView({ Key key, this.swatch }) : super(key: key) {
|
ColorSwatchTabView({ Key key, this.swatch }) : super(key: key) {
|
||||||
assert(swatch != null && swatch.isValid);
|
assert(swatch != null && swatch.isValid);
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ class ColorSwatchTabView extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ColorsDemo extends StatelessComponent {
|
class ColorsDemo extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new TabBarSelection<ColorSwatch>(
|
return new TabBarSelection<ColorSwatch>(
|
||||||
values: colorSwatches,
|
values: colorSwatches,
|
||||||
|
@ -7,7 +7,7 @@ import 'dart:async';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
class DatePickerDemo extends StatefulComponent {
|
class DatePickerDemo extends StatefulWidget {
|
||||||
_DatePickerDemoState createState() => new _DatePickerDemoState();
|
_DatePickerDemoState createState() => new _DatePickerDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ const String _alertWithTitleText =
|
|||||||
"Let Google help apps determine location. This means sending anyonmous location "
|
"Let Google help apps determine location. This means sending anyonmous location "
|
||||||
"data to Google, even when no apps are running.";
|
"data to Google, even when no apps are running.";
|
||||||
|
|
||||||
class DialogDemoItem extends StatelessComponent {
|
class DialogDemoItem extends StatelessWidget {
|
||||||
DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key);
|
DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key);
|
||||||
|
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
@ -53,7 +53,7 @@ class DialogDemoItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DialogDemo extends StatefulComponent {
|
class DialogDemo extends StatefulWidget {
|
||||||
DialogDemoState createState() => new DialogDemoState();
|
DialogDemoState createState() => new DialogDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DropDownDemo extends StatefulComponent {
|
class DropDownDemo extends StatefulWidget {
|
||||||
_DropDownDemoState createState() => new _DropDownDemoState();
|
_DropDownDemoState createState() => new _DropDownDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import 'package:vector_math/vector_math_64.dart' as vec;
|
|||||||
ImageMap _images;
|
ImageMap _images;
|
||||||
SpriteSheet _sprites;
|
SpriteSheet _sprites;
|
||||||
|
|
||||||
class FitnessDemo extends StatelessComponent {
|
class FitnessDemo extends StatelessWidget {
|
||||||
FitnessDemo({ Key key }) : super(key: key);
|
FitnessDemo({ Key key }) : super(key: key);
|
||||||
|
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -26,7 +26,7 @@ class FitnessDemo extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FitnessDemoContents extends StatefulComponent {
|
class _FitnessDemoContents extends StatefulWidget {
|
||||||
_FitnessDemoContents({ Key key }) : super(key: key);
|
_FitnessDemoContents({ Key key }) : super(key: key);
|
||||||
_FitnessDemoContentsState createState() => new _FitnessDemoContentsState();
|
_FitnessDemoContentsState createState() => new _FitnessDemoContentsState();
|
||||||
}
|
}
|
||||||
@ -510,7 +510,7 @@ class _JumpingJackPart extends Sprite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Fireworks extends StatefulComponent {
|
class _Fireworks extends StatefulWidget {
|
||||||
_Fireworks({ Key key }) : super(key: key);
|
_Fireworks({ Key key }) : super(key: key);
|
||||||
|
|
||||||
_FireworksState createState() => new _FireworksState();
|
_FireworksState createState() => new _FireworksState();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
class _ContactCategory extends StatelessComponent {
|
class _ContactCategory extends StatelessWidget {
|
||||||
_ContactCategory({ Key key, this.icon, this.children }) : super(key: key);
|
_ContactCategory({ Key key, this.icon, this.children }) : super(key: key);
|
||||||
|
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
@ -33,7 +33,7 @@ class _ContactCategory extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ContactItem extends StatelessComponent {
|
class _ContactItem extends StatelessWidget {
|
||||||
_ContactItem({ Key key, this.icon, this.lines }) : super(key: key) {
|
_ContactItem({ Key key, this.icon, this.lines }) : super(key: key) {
|
||||||
assert(lines.length > 1);
|
assert(lines.length > 1);
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ class _ContactItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FlexibleSpaceDemo extends StatefulComponent {
|
class FlexibleSpaceDemo extends StatefulWidget {
|
||||||
FlexibleSpaceDemoState createState() => new FlexibleSpaceDemoState();
|
FlexibleSpaceDemoState createState() => new FlexibleSpaceDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ enum DismissDialogAction {
|
|||||||
save,
|
save,
|
||||||
}
|
}
|
||||||
|
|
||||||
class DateTimeItem extends StatelessComponent {
|
class DateTimeItem extends StatelessWidget {
|
||||||
DateTimeItem({ Key key, DateTime dateTime, this.onChanged })
|
DateTimeItem({ Key key, DateTime dateTime, this.onChanged })
|
||||||
: date = new DateTime(dateTime.year, dateTime.month, dateTime.day),
|
: date = new DateTime(dateTime.year, dateTime.month, dateTime.day),
|
||||||
time = new TimeOfDay(hour: dateTime.hour, minute: dateTime.minute),
|
time = new TimeOfDay(hour: dateTime.hour, minute: dateTime.minute),
|
||||||
@ -92,7 +92,7 @@ class DateTimeItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FullScreenDialogDemo extends StatefulComponent {
|
class FullScreenDialogDemo extends StatefulWidget {
|
||||||
FullScreenDialogDemoState createState() => new FullScreenDialogDemoState();
|
FullScreenDialogDemoState createState() => new FullScreenDialogDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ final List<Photo> photos = new List<Photo>.generate(16, (int index) {
|
|||||||
return const Photo(assetName: 'packages/flutter_gallery_assets/kangaroo_valley_safari.png');
|
return const Photo(assetName: 'packages/flutter_gallery_assets/kangaroo_valley_safari.png');
|
||||||
});
|
});
|
||||||
|
|
||||||
class GridDemoPhotoItem extends StatelessComponent {
|
class GridDemoPhotoItem extends StatelessWidget {
|
||||||
GridDemoPhotoItem({ Key key, this.photo, this.tileStyle }) : super(key: key) {
|
GridDemoPhotoItem({ Key key, this.photo, this.tileStyle }) : super(key: key) {
|
||||||
assert(photo != null && photo.isValid);
|
assert(photo != null && photo.isValid);
|
||||||
assert(tileStyle != null);
|
assert(tileStyle != null);
|
||||||
@ -128,7 +128,7 @@ class GridListDemoGridDelegate extends FixedColumnCountGridDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GridListDemo extends StatefulComponent {
|
class GridListDemo extends StatefulWidget {
|
||||||
GridListDemo({ Key key }) : super(key: key);
|
GridListDemo({ Key key }) : super(key: key);
|
||||||
|
|
||||||
GridListDemoState createState() => new GridListDemoState();
|
GridListDemoState createState() => new GridListDemoState();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class IconsDemo extends StatefulComponent {
|
class IconsDemo extends StatefulWidget {
|
||||||
IconsDemoState createState() => new IconsDemoState();
|
IconsDemoState createState() => new IconsDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class LeaveBehindItem {
|
|||||||
final String body;
|
final String body;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LeaveBehindDemo extends StatefulComponent {
|
class LeaveBehindDemo extends StatefulWidget {
|
||||||
LeaveBehindDemo({ Key key }) : super(key: key);
|
LeaveBehindDemo({ Key key }) : super(key: key);
|
||||||
|
|
||||||
LeaveBehindDemoState createState() => new LeaveBehindDemoState();
|
LeaveBehindDemoState createState() => new LeaveBehindDemoState();
|
||||||
|
@ -10,7 +10,7 @@ enum ListDemoItemSize {
|
|||||||
threeLine
|
threeLine
|
||||||
}
|
}
|
||||||
|
|
||||||
class ListDemo extends StatefulComponent {
|
class ListDemo extends StatefulWidget {
|
||||||
ListDemo({ Key key }) : super(key: key);
|
ListDemo({ Key key }) : super(key: key);
|
||||||
|
|
||||||
ListDemoState createState() => new ListDemoState();
|
ListDemoState createState() => new ListDemoState();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MenuDemo extends StatefulComponent {
|
class MenuDemo extends StatefulWidget {
|
||||||
MenuDemo({ Key key }) : super(key: key);
|
MenuDemo({ Key key }) : super(key: key);
|
||||||
|
|
||||||
MenuDemoState createState() => new MenuDemoState();
|
MenuDemoState createState() => new MenuDemoState();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ModalBottomSheetDemo extends StatelessComponent {
|
class ModalBottomSheetDemo extends StatelessWidget {
|
||||||
final TextStyle textStyle = new TextStyle(
|
final TextStyle textStyle = new TextStyle(
|
||||||
color: Colors.indigo[400],
|
color: Colors.indigo[400],
|
||||||
fontSize: 24.0,
|
fontSize: 24.0,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PageSelectorDemo extends StatelessComponent {
|
class PageSelectorDemo extends StatelessWidget {
|
||||||
|
|
||||||
void _handleArrowButtonPress(BuildContext context, int delta) {
|
void _handleArrowButtonPress(BuildContext context, int delta) {
|
||||||
final TabBarSelectionState<IconData> selection = TabBarSelection.of/*<IconData>*/(context);
|
final TabBarSelectionState<IconData> selection = TabBarSelection.of/*<IconData>*/(context);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PersistentBottomSheetDemo extends StatelessComponent {
|
class PersistentBottomSheetDemo extends StatelessWidget {
|
||||||
|
|
||||||
final TextStyle textStyle = new TextStyle(
|
final TextStyle textStyle = new TextStyle(
|
||||||
color: Colors.indigo[400],
|
color: Colors.indigo[400],
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ProgressIndicatorDemo extends StatefulComponent {
|
class ProgressIndicatorDemo extends StatefulWidget {
|
||||||
_ProgressIndicatorDemoState createState() => new _ProgressIndicatorDemoState();
|
_ProgressIndicatorDemoState createState() => new _ProgressIndicatorDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
import 'flexible_space_demo.dart';
|
import 'flexible_space_demo.dart';
|
||||||
|
|
||||||
class _BarGraphic extends StatelessComponent {
|
class _BarGraphic extends StatelessWidget {
|
||||||
_BarGraphic({ Key key, this.height, this.color, this.leftText, this.rightText: '' })
|
_BarGraphic({ Key key, this.height, this.color, this.leftText, this.rightText: '' })
|
||||||
: super(key: key) {
|
: super(key: key) {
|
||||||
assert(height != null);
|
assert(height != null);
|
||||||
@ -74,7 +74,7 @@ class _FlexibleSpaceGraphic extends _BarGraphic {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TechniqueItem extends StatelessComponent {
|
class _TechniqueItem extends StatelessWidget {
|
||||||
_TechniqueItem({ this.titleText, this.barGraphics, this.builder });
|
_TechniqueItem({ this.titleText, this.barGraphics, this.builder });
|
||||||
|
|
||||||
final String titleText;
|
final String titleText;
|
||||||
@ -110,7 +110,7 @@ const String _introText =
|
|||||||
"it appears behind the device's status bar. When a flexible space Widget is "
|
"it appears behind the device's status bar. When a flexible space Widget is "
|
||||||
"specified it is stacked on top of the ToolBar.";
|
"specified it is stacked on top of the ToolBar.";
|
||||||
|
|
||||||
class ScrollingTechniquesDemo extends StatelessComponent {
|
class ScrollingTechniquesDemo extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new Scaffold(
|
return new Scaffold(
|
||||||
toolBar: new ToolBar(center: new Text('Scrolling Techniques')),
|
toolBar: new ToolBar(center: new Text('Scrolling Techniques')),
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SliderDemo extends StatefulComponent {
|
class SliderDemo extends StatefulWidget {
|
||||||
_SliderDemoState createState() => new _SliderDemoState();
|
_SliderDemoState createState() => new _SliderDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ const String _text2 =
|
|||||||
const String _text3 =
|
const String _text3 =
|
||||||
"By default snackbars automatically disappear after a few seconds ";
|
"By default snackbars automatically disappear after a few seconds ";
|
||||||
|
|
||||||
class SnackBarDemo extends StatelessComponent {
|
class SnackBarDemo extends StatelessWidget {
|
||||||
SnackBarDemo({ Key key }) : super(key: key);
|
SnackBarDemo({ Key key }) : super(key: key);
|
||||||
|
|
||||||
Widget buildBody(BuildContext context) {
|
Widget buildBody(BuildContext context) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TabsDemo extends StatelessComponent {
|
class TabsDemo extends StatelessWidget {
|
||||||
final List<IconData> icons = <IconData>[
|
final List<IconData> icons = <IconData>[
|
||||||
Icons.event,
|
Icons.event,
|
||||||
Icons.home,
|
Icons.home,
|
||||||
|
@ -25,7 +25,7 @@ const String _explanatoryText =
|
|||||||
"with a FloatingActionButton that the Scaffold distinguishes from the others "
|
"with a FloatingActionButton that the Scaffold distinguishes from the others "
|
||||||
"by its key.";
|
"by its key.";
|
||||||
|
|
||||||
class TabsFabDemo extends StatefulComponent {
|
class TabsFabDemo extends StatefulWidget {
|
||||||
_TabsFabDemoState createState() => new _TabsFabDemoState();
|
_TabsFabDemoState createState() => new _TabsFabDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TextFieldDemo extends StatefulComponent {
|
class TextFieldDemo extends StatefulWidget {
|
||||||
TextFieldDemo({ Key key }) : super(key: key);
|
TextFieldDemo({ Key key }) : super(key: key);
|
||||||
|
|
||||||
TextFieldDemoState createState() => new TextFieldDemoState();
|
TextFieldDemoState createState() => new TextFieldDemoState();
|
||||||
|
@ -6,7 +6,7 @@ import 'dart:async';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TimePickerDemo extends StatefulComponent {
|
class TimePickerDemo extends StatefulWidget {
|
||||||
_TimePickerDemoState createState() => new _TimePickerDemoState();
|
_TimePickerDemoState createState() => new _TimePickerDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ToggleControlsDemo extends StatefulComponent {
|
class ToggleControlsDemo extends StatefulWidget {
|
||||||
_ToggleControlsDemoState createState() => new _ToggleControlsDemoState();
|
_ToggleControlsDemoState createState() => new _ToggleControlsDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ const String _introText =
|
|||||||
"a long press. Tooltip messages are also used by services that make Flutter "
|
"a long press. Tooltip messages are also used by services that make Flutter "
|
||||||
"apps accessible, like screen readers.";
|
"apps accessible, like screen readers.";
|
||||||
|
|
||||||
class TooltipDemo extends StatelessComponent {
|
class TooltipDemo extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final ThemeData theme = Theme.of(context);
|
final ThemeData theme = Theme.of(context);
|
||||||
return new Scaffold(
|
return new Scaffold(
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TwoLevelListDemo extends StatelessComponent {
|
class TwoLevelListDemo extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new Scaffold(
|
return new Scaffold(
|
||||||
toolBar: new ToolBar(center: new Text('Expand/Collapse List Control')),
|
toolBar: new ToolBar(center: new Text('Expand/Collapse List Control')),
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
class TextStyleItem extends StatelessComponent {
|
class TextStyleItem extends StatelessWidget {
|
||||||
TextStyleItem({ Key key, this.name, this.style, this.text }) : super(key: key) {
|
TextStyleItem({ Key key, this.name, this.style, this.text }) : super(key: key) {
|
||||||
assert(name != null);
|
assert(name != null);
|
||||||
assert(style != null);
|
assert(style != null);
|
||||||
@ -37,7 +37,7 @@ class TextStyleItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TypographyDemo extends StatelessComponent {
|
class TypographyDemo extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final TextTheme textTheme = Theme.of(context).textTheme;
|
final TextTheme textTheme = Theme.of(context).textTheme;
|
||||||
final List<Widget> styleItems = <Widget>[
|
final List<Widget> styleItems = <Widget>[
|
||||||
|
@ -17,7 +17,7 @@ enum WeatherType {
|
|||||||
snow
|
snow
|
||||||
}
|
}
|
||||||
|
|
||||||
class WeatherDemo extends StatefulComponent {
|
class WeatherDemo extends StatefulWidget {
|
||||||
WeatherDemo({ Key key }) : super(key: key);
|
WeatherDemo({ Key key }) : super(key: key);
|
||||||
_WeatherDemoState createState() => new _WeatherDemoState();
|
_WeatherDemoState createState() => new _WeatherDemoState();
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ class _WeatherDemoState extends State<WeatherDemo> {
|
|||||||
const double _kWeatherButtonSize = 56.0;
|
const double _kWeatherButtonSize = 56.0;
|
||||||
const double _kWeatherIconSize = 36.0;
|
const double _kWeatherIconSize = 36.0;
|
||||||
|
|
||||||
class WeatherButton extends StatelessComponent {
|
class WeatherButton extends StatelessWidget {
|
||||||
WeatherButton({ this.icon, this.selected, this.onPressed, Key key }) : super(key: key);
|
WeatherButton({ this.icon, this.selected, this.onPressed, Key key }) : super(key: key);
|
||||||
|
|
||||||
final String icon;
|
final String icon;
|
||||||
|
@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
import 'home.dart';
|
import 'home.dart';
|
||||||
|
|
||||||
class GalleryApp extends StatefulComponent {
|
class GalleryApp extends StatefulWidget {
|
||||||
GalleryApp({ Key key }) : super(key: key);
|
GalleryApp({ Key key }) : super(key: key);
|
||||||
|
|
||||||
static GalleryAppState of(BuildContext context) => context.ancestorStateOfType(const TypeMatcher<GalleryAppState>());
|
static GalleryAppState of(BuildContext context) => context.ancestorStateOfType(const TypeMatcher<GalleryAppState>());
|
||||||
|
@ -8,7 +8,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
|
|
||||||
import 'app.dart';
|
import 'app.dart';
|
||||||
|
|
||||||
class GalleryDrawer extends StatelessComponent {
|
class GalleryDrawer extends StatelessWidget {
|
||||||
GalleryDrawer({ Key key }) : super(key: key);
|
GalleryDrawer({ Key key }) : super(key: key);
|
||||||
|
|
||||||
void _changeTheme(BuildContext context, bool value) {
|
void _changeTheme(BuildContext context, bool value) {
|
||||||
|
@ -39,7 +39,7 @@ import '../demo/two_level_list_demo.dart';
|
|||||||
import '../demo/typography_demo.dart';
|
import '../demo/typography_demo.dart';
|
||||||
import '../demo/weather_demo.dart';
|
import '../demo/weather_demo.dart';
|
||||||
|
|
||||||
class GalleryHome extends StatefulComponent {
|
class GalleryHome extends StatefulWidget {
|
||||||
GalleryHome({ Key key }) : super(key: key);
|
GalleryHome({ Key key }) : super(key: key);
|
||||||
|
|
||||||
GalleryHomeState createState() => new GalleryHomeState();
|
GalleryHomeState createState() => new GalleryHomeState();
|
||||||
|
@ -7,7 +7,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
|
|
||||||
import 'demo.dart';
|
import 'demo.dart';
|
||||||
|
|
||||||
class GallerySection extends StatelessComponent {
|
class GallerySection extends StatelessWidget {
|
||||||
GallerySection({ this.title, this.image, this.colors, this.demos });
|
GallerySection({ this.title, this.image, this.colors, this.demos });
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
|
@ -23,7 +23,7 @@ import 'stock_strings.dart';
|
|||||||
import 'stock_symbol_viewer.dart';
|
import 'stock_symbol_viewer.dart';
|
||||||
import 'stock_types.dart';
|
import 'stock_types.dart';
|
||||||
|
|
||||||
class StocksApp extends StatefulComponent {
|
class StocksApp extends StatefulWidget {
|
||||||
StocksAppState createState() => new StocksAppState();
|
StocksAppState createState() => new StocksAppState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class StockArrowPainter extends CustomPainter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StockArrow extends StatelessComponent {
|
class StockArrow extends StatelessWidget {
|
||||||
StockArrow({ Key key, this.percentChange }) : super(key: key);
|
StockArrow({ Key key, this.percentChange }) : super(key: key);
|
||||||
|
|
||||||
final double percentChange;
|
final double percentChange;
|
||||||
|
@ -18,7 +18,7 @@ typedef void ModeUpdater(StockMode mode);
|
|||||||
enum _StockMenuItem { autorefresh, refresh, speedUp, speedDown }
|
enum _StockMenuItem { autorefresh, refresh, speedUp, speedDown }
|
||||||
enum StockHomeTab { market, portfolio }
|
enum StockHomeTab { market, portfolio }
|
||||||
|
|
||||||
class _NotImplementedDialog extends StatelessComponent {
|
class _NotImplementedDialog extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return new Dialog(
|
return new Dialog(
|
||||||
title: new Text('Not Implemented'),
|
title: new Text('Not Implemented'),
|
||||||
@ -50,7 +50,7 @@ class _NotImplementedDialog extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StockHome extends StatefulComponent {
|
class StockHome extends StatefulWidget {
|
||||||
const StockHome(this.stocks, this.symbols, this.configuration, this.updater);
|
const StockHome(this.stocks, this.symbols, this.configuration, this.updater);
|
||||||
|
|
||||||
final Map<String, Stock> stocks;
|
final Map<String, Stock> stocks;
|
||||||
@ -355,7 +355,7 @@ class StockHomeState extends State<StockHome> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _CreateCompanySheet extends StatefulComponent {
|
class _CreateCompanySheet extends StatefulWidget {
|
||||||
_CreateCompanySheetState createState() => new _CreateCompanySheetState();
|
_CreateCompanySheetState createState() => new _CreateCompanySheetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'stock_data.dart';
|
import 'stock_data.dart';
|
||||||
import 'stock_row.dart';
|
import 'stock_row.dart';
|
||||||
|
|
||||||
class StockList extends StatelessComponent {
|
class StockList extends StatelessWidget {
|
||||||
StockList({ Key key, this.keySalt, this.stocks, this.onOpen, this.onShow, this.onAction }) : super(key: key);
|
StockList({ Key key, this.keySalt, this.stocks, this.onOpen, this.onShow, this.onAction }) : super(key: key);
|
||||||
|
|
||||||
final Object keySalt;
|
final Object keySalt;
|
||||||
|
@ -30,7 +30,7 @@ class StockRowPartKey extends Key {
|
|||||||
|
|
||||||
typedef void StockRowActionCallback(Stock stock, Key arrowKey);
|
typedef void StockRowActionCallback(Stock stock, Key arrowKey);
|
||||||
|
|
||||||
class StockRow extends StatelessComponent {
|
class StockRow extends StatelessWidget {
|
||||||
StockRow({
|
StockRow({
|
||||||
Stock stock,
|
Stock stock,
|
||||||
Object keySalt,
|
Object keySalt,
|
||||||
|
@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
import 'stock_types.dart';
|
import 'stock_types.dart';
|
||||||
|
|
||||||
class StockSettings extends StatefulComponent {
|
class StockSettings extends StatefulWidget {
|
||||||
const StockSettings(this.configuration, this.updater);
|
const StockSettings(this.configuration, this.updater);
|
||||||
|
|
||||||
final StockConfiguration configuration;
|
final StockConfiguration configuration;
|
||||||
|
@ -8,7 +8,7 @@ import 'stock_data.dart';
|
|||||||
import 'stock_arrow.dart';
|
import 'stock_arrow.dart';
|
||||||
import 'stock_row.dart';
|
import 'stock_row.dart';
|
||||||
|
|
||||||
class StockSymbolView extends StatelessComponent {
|
class StockSymbolView extends StatelessWidget {
|
||||||
StockSymbolView({ this.stock });
|
StockSymbolView({ this.stock });
|
||||||
|
|
||||||
final Stock stock;
|
final Stock stock;
|
||||||
@ -66,7 +66,7 @@ class StockSymbolView extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StockSymbolPage extends StatelessComponent {
|
class StockSymbolPage extends StatelessWidget {
|
||||||
StockSymbolPage({ this.stock });
|
StockSymbolPage({ this.stock });
|
||||||
|
|
||||||
final Stock stock;
|
final Stock stock;
|
||||||
@ -88,7 +88,7 @@ class StockSymbolPage extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StockSymbolBottomSheet extends StatelessComponent {
|
class StockSymbolBottomSheet extends StatelessWidget {
|
||||||
StockSymbolBottomSheet({ this.stock });
|
StockSymbolBottomSheet({ this.stock });
|
||||||
|
|
||||||
final Stock stock;
|
final Stock stock;
|
||||||
|
@ -15,7 +15,7 @@ const double _kCloseProgressThreshold = 0.5;
|
|||||||
const Color _kTransparent = const Color(0x00000000);
|
const Color _kTransparent = const Color(0x00000000);
|
||||||
const Color _kBarrierColor = Colors.black54;
|
const Color _kBarrierColor = Colors.black54;
|
||||||
|
|
||||||
class BottomSheet extends StatefulComponent {
|
class BottomSheet extends StatefulWidget {
|
||||||
BottomSheet({
|
BottomSheet({
|
||||||
Key key,
|
Key key,
|
||||||
this.animationController,
|
this.animationController,
|
||||||
@ -117,7 +117,7 @@ class _ModalBottomSheetLayout extends SingleChildLayoutDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ModalBottomSheet<T> extends StatefulComponent {
|
class _ModalBottomSheet<T> extends StatefulWidget {
|
||||||
_ModalBottomSheet({ Key key, this.route }) : super(key: key);
|
_ModalBottomSheet({ Key key, this.route }) : super(key: key);
|
||||||
|
|
||||||
final _ModalBottomSheetRoute<T> route;
|
final _ModalBottomSheetRoute<T> route;
|
||||||
|
@ -39,7 +39,7 @@ class ButtonTheme extends InheritedWidget {
|
|||||||
///
|
///
|
||||||
/// MaterialButtons whose [onPressed] handler is null will be disabled. To have
|
/// MaterialButtons whose [onPressed] handler is null will be disabled. To have
|
||||||
/// an enabled button, make sure to pass a non-null value for onPressed.
|
/// an enabled button, make sure to pass a non-null value for onPressed.
|
||||||
abstract class MaterialButton extends StatefulComponent {
|
abstract class MaterialButton extends StatefulWidget {
|
||||||
MaterialButton({
|
MaterialButton({
|
||||||
Key key,
|
Key key,
|
||||||
this.child,
|
this.child,
|
||||||
|
@ -11,7 +11,7 @@ const EdgeInsets _kCardMargins = const EdgeInsets.all(4.0);
|
|||||||
/// A material design card
|
/// A material design card
|
||||||
///
|
///
|
||||||
/// <https://www.google.com/design/spec/components/cards.html>
|
/// <https://www.google.com/design/spec/components/cards.html>
|
||||||
class Card extends StatelessComponent {
|
class Card extends StatelessWidget {
|
||||||
const Card({ Key key, this.child, this.color }) : super(key: key);
|
const Card({ Key key, this.child, this.color }) : super(key: key);
|
||||||
|
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
@ -21,7 +21,7 @@ import 'toggleable.dart';
|
|||||||
/// the checkbox.
|
/// the checkbox.
|
||||||
///
|
///
|
||||||
/// <https://www.google.com/design/spec/components/lists-controls.html#lists-controls-types-of-list-controls>
|
/// <https://www.google.com/design/spec/components/lists-controls.html#lists-controls-types-of-list-controls>
|
||||||
class Checkbox extends StatelessComponent {
|
class Checkbox extends StatelessWidget {
|
||||||
/// Constructs a checkbox
|
/// Constructs a checkbox
|
||||||
///
|
///
|
||||||
/// * `value` determines whether the checkbox is checked.
|
/// * `value` determines whether the checkbox is checked.
|
||||||
|
@ -21,7 +21,7 @@ const TextStyle _kLabelStyle = const TextStyle(
|
|||||||
textBaseline: TextBaseline.alphabetic
|
textBaseline: TextBaseline.alphabetic
|
||||||
);
|
);
|
||||||
|
|
||||||
class Chip extends StatelessComponent {
|
class Chip extends StatelessWidget {
|
||||||
const Chip({
|
const Chip({
|
||||||
Key key,
|
Key key,
|
||||||
this.avatar,
|
this.avatar,
|
||||||
|
@ -7,7 +7,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
import 'constants.dart';
|
import 'constants.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
|
|
||||||
class CircleAvatar extends StatelessComponent {
|
class CircleAvatar extends StatelessWidget {
|
||||||
CircleAvatar({
|
CircleAvatar({
|
||||||
Key key,
|
Key key,
|
||||||
this.child,
|
this.child,
|
||||||
|
@ -17,7 +17,7 @@ import 'typography.dart';
|
|||||||
|
|
||||||
enum _DatePickerMode { day, year }
|
enum _DatePickerMode { day, year }
|
||||||
|
|
||||||
class DatePicker extends StatefulComponent {
|
class DatePicker extends StatefulWidget {
|
||||||
DatePicker({
|
DatePicker({
|
||||||
this.selectedDate,
|
this.selectedDate,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
@ -105,7 +105,7 @@ class _DatePickerState extends State<DatePicker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Shows the selected date in large font and toggles between year and day mode
|
// Shows the selected date in large font and toggles between year and day mode
|
||||||
class _DatePickerHeader extends StatelessComponent {
|
class _DatePickerHeader extends StatelessWidget {
|
||||||
_DatePickerHeader({ this.selectedDate, this.mode, this.onModeChanged }) {
|
_DatePickerHeader({ this.selectedDate, this.mode, this.onModeChanged }) {
|
||||||
assert(selectedDate != null);
|
assert(selectedDate != null);
|
||||||
assert(mode != null);
|
assert(mode != null);
|
||||||
@ -163,7 +163,7 @@ class _DatePickerHeader extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fixed height component shows a single month and allows choosing a day
|
// Fixed height component shows a single month and allows choosing a day
|
||||||
class DayPicker extends StatelessComponent {
|
class DayPicker extends StatelessWidget {
|
||||||
DayPicker({
|
DayPicker({
|
||||||
this.selectedDate,
|
this.selectedDate,
|
||||||
this.currentDate,
|
this.currentDate,
|
||||||
@ -269,7 +269,7 @@ class DayPicker extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MonthPicker extends StatefulComponent {
|
class MonthPicker extends StatefulWidget {
|
||||||
MonthPicker({
|
MonthPicker({
|
||||||
Key key,
|
Key key,
|
||||||
this.selectedDate,
|
this.selectedDate,
|
||||||
@ -351,7 +351,7 @@ class _MonthPickerState extends State<MonthPicker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Scrollable list of years to allow picking a year
|
// Scrollable list of years to allow picking a year
|
||||||
class YearPicker extends StatefulComponent {
|
class YearPicker extends StatefulWidget {
|
||||||
YearPicker({
|
YearPicker({
|
||||||
Key key,
|
Key key,
|
||||||
this.selectedDate,
|
this.selectedDate,
|
||||||
|
@ -10,7 +10,7 @@ import 'dialog.dart';
|
|||||||
import 'date_picker.dart';
|
import 'date_picker.dart';
|
||||||
import 'flat_button.dart';
|
import 'flat_button.dart';
|
||||||
|
|
||||||
class _DatePickerDialog extends StatefulComponent {
|
class _DatePickerDialog extends StatefulWidget {
|
||||||
_DatePickerDialog({
|
_DatePickerDialog({
|
||||||
Key key,
|
Key key,
|
||||||
this.initialDate,
|
this.initialDate,
|
||||||
|
@ -16,7 +16,7 @@ typedef Widget DialogBuilder(NavigatorState navigator);
|
|||||||
/// A material design dialog
|
/// A material design dialog
|
||||||
///
|
///
|
||||||
/// <https://www.google.com/design/spec/components/dialogs.html>
|
/// <https://www.google.com/design/spec/components/dialogs.html>
|
||||||
class Dialog extends StatelessComponent {
|
class Dialog extends StatelessWidget {
|
||||||
Dialog({
|
Dialog({
|
||||||
Key key,
|
Key key,
|
||||||
this.title,
|
this.title,
|
||||||
|
@ -6,7 +6,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
|
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
|
|
||||||
class Divider extends StatelessComponent {
|
class Divider extends StatelessWidget {
|
||||||
Divider({ Key key, this.height: 16.0, this.indent: 0.0, this.color }) : super(key: key) {
|
Divider({ Key key, this.height: 16.0, this.indent: 0.0, this.color }) : super(key: key) {
|
||||||
assert(height >= 1.0);
|
assert(height >= 1.0);
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ const double _kEdgeDragWidth = 20.0;
|
|||||||
const double _kMinFlingVelocity = 365.0;
|
const double _kMinFlingVelocity = 365.0;
|
||||||
const Duration _kBaseSettleDuration = const Duration(milliseconds: 246);
|
const Duration _kBaseSettleDuration = const Duration(milliseconds: 246);
|
||||||
|
|
||||||
class Drawer extends StatelessComponent {
|
class Drawer extends StatelessWidget {
|
||||||
Drawer({
|
Drawer({
|
||||||
Key key,
|
Key key,
|
||||||
this.elevation: 16,
|
this.elevation: 16,
|
||||||
@ -47,7 +47,7 @@ class Drawer extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DrawerController extends StatefulComponent {
|
class DrawerController extends StatefulWidget {
|
||||||
DrawerController({
|
DrawerController({
|
||||||
GlobalKey key,
|
GlobalKey key,
|
||||||
this.child
|
this.child
|
||||||
|
@ -11,7 +11,7 @@ import 'theme.dart';
|
|||||||
// TODO(jackson): This class should usually render the user's
|
// TODO(jackson): This class should usually render the user's
|
||||||
// preferred banner image rather than a solid background
|
// preferred banner image rather than a solid background
|
||||||
|
|
||||||
class DrawerHeader extends StatelessComponent {
|
class DrawerHeader extends StatelessWidget {
|
||||||
const DrawerHeader({ Key key, this.child }) : super(key: key);
|
const DrawerHeader({ Key key, this.child }) : super(key: key);
|
||||||
|
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
@ -11,7 +11,7 @@ import 'icons.dart';
|
|||||||
import 'ink_well.dart';
|
import 'ink_well.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
|
|
||||||
class DrawerItem extends StatelessComponent {
|
class DrawerItem extends StatelessWidget {
|
||||||
const DrawerItem({
|
const DrawerItem({
|
||||||
Key key,
|
Key key,
|
||||||
this.icon,
|
this.icon,
|
||||||
|
@ -56,7 +56,7 @@ class _DropDownMenuPainter extends CustomPainter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _DropDownMenu<T> extends StatusTransitionComponent {
|
class _DropDownMenu<T> extends StatusTransitionWidget {
|
||||||
_DropDownMenu({
|
_DropDownMenu({
|
||||||
Key key,
|
Key key,
|
||||||
_DropDownRoute<T> route
|
_DropDownRoute<T> route
|
||||||
@ -197,7 +197,7 @@ class _DropDownRoute<T> extends PopupRoute<_DropDownRouteResult<T>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DropDownMenuItem<T> extends StatelessComponent {
|
class DropDownMenuItem<T> extends StatelessWidget {
|
||||||
DropDownMenuItem({
|
DropDownMenuItem({
|
||||||
Key key,
|
Key key,
|
||||||
this.value,
|
this.value,
|
||||||
@ -222,7 +222,7 @@ class DropDownMenuItem<T> extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DropDownButton<T> extends StatefulComponent {
|
class DropDownButton<T> extends StatefulWidget {
|
||||||
DropDownButton({
|
DropDownButton({
|
||||||
Key key,
|
Key key,
|
||||||
this.items,
|
this.items,
|
||||||
|
@ -11,7 +11,7 @@ import 'constants.dart';
|
|||||||
import 'scaffold.dart';
|
import 'scaffold.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
|
|
||||||
class FlexibleSpaceBar extends StatefulComponent {
|
class FlexibleSpaceBar extends StatefulWidget {
|
||||||
FlexibleSpaceBar({ Key key, this.title, this.image }) : super(key: key);
|
FlexibleSpaceBar({ Key key, this.title, this.image }) : super(key: key);
|
||||||
|
|
||||||
final Widget title;
|
final Widget title;
|
||||||
|
@ -33,7 +33,7 @@ const Interval _kChildSegueInterval = const Interval(0.65, 1.0);
|
|||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
/// * https://www.google.com/design/spec/components/buttons-floating-action-button.html
|
/// * https://www.google.com/design/spec/components/buttons-floating-action-button.html
|
||||||
class FloatingActionButton extends StatefulComponent {
|
class FloatingActionButton extends StatefulWidget {
|
||||||
const FloatingActionButton({
|
const FloatingActionButton({
|
||||||
Key key,
|
Key key,
|
||||||
this.child,
|
this.child,
|
||||||
|
@ -6,7 +6,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
|
|
||||||
/// Creates a [Stack] with the header anchored across the top or a footer across the
|
/// Creates a [Stack] with the header anchored across the top or a footer across the
|
||||||
/// bottom. The [GridTileBar] class can be used to create grid tile headers and footers.
|
/// bottom. The [GridTileBar] class can be used to create grid tile headers and footers.
|
||||||
class GridTile extends StatelessComponent {
|
class GridTile extends StatelessWidget {
|
||||||
GridTile({ Key key, this.header, this.footer, this.child }) : super(key: key) {
|
GridTile({ Key key, this.header, this.footer, this.child }) : super(key: key) {
|
||||||
assert(child != null);
|
assert(child != null);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import 'typography.dart';
|
|||||||
/// https://www.google.com/design/spec/components/grid-lists.html#grid-lists-specs
|
/// https://www.google.com/design/spec/components/grid-lists.html#grid-lists-specs
|
||||||
/// For a one-line header specify title and to add a second line specify caption.
|
/// For a one-line header specify title and to add a second line specify caption.
|
||||||
/// Use left or right to add an icon.
|
/// Use left or right to add an icon.
|
||||||
class GridTileBar extends StatelessComponent {
|
class GridTileBar extends StatelessWidget {
|
||||||
GridTileBar({ Key key, this.backgroundColor, this.left, this.right, this.title, this.caption }) : super(key: key);
|
GridTileBar({ Key key, this.backgroundColor, this.left, this.right, this.title, this.caption }) : super(key: key);
|
||||||
|
|
||||||
final Color backgroundColor;
|
final Color backgroundColor;
|
||||||
|
@ -22,7 +22,7 @@ import 'theme.dart';
|
|||||||
/// in your project's `flutter.yaml` file. This ensures that the
|
/// in your project's `flutter.yaml` file. This ensures that the
|
||||||
/// MaterialIcons font is included in your application. This font is
|
/// MaterialIcons font is included in your application. This font is
|
||||||
/// used to display the icons.
|
/// used to display the icons.
|
||||||
class Icon extends StatelessComponent {
|
class Icon extends StatelessWidget {
|
||||||
Icon({
|
Icon({
|
||||||
Key key,
|
Key key,
|
||||||
this.icon,
|
this.icon,
|
||||||
|
@ -20,7 +20,7 @@ import 'tooltip.dart';
|
|||||||
///
|
///
|
||||||
/// If the [onPressed] callback is not specified or null, then the button will
|
/// If the [onPressed] callback is not specified or null, then the button will
|
||||||
/// be disabled, will not react to touch.
|
/// be disabled, will not react to touch.
|
||||||
class IconButton extends StatelessComponent {
|
class IconButton extends StatelessWidget {
|
||||||
const IconButton({
|
const IconButton({
|
||||||
Key key,
|
Key key,
|
||||||
this.size: 24.0,
|
this.size: 24.0,
|
||||||
|
@ -24,7 +24,7 @@ import 'theme.dart';
|
|||||||
/// at the top of its [build] function to call [debugCheckHasMaterial]:
|
/// at the top of its [build] function to call [debugCheckHasMaterial]:
|
||||||
///
|
///
|
||||||
/// assert(debugCheckHasMaterial(context));
|
/// assert(debugCheckHasMaterial(context));
|
||||||
class InkResponse extends StatefulComponent {
|
class InkResponse extends StatefulWidget {
|
||||||
InkResponse({
|
InkResponse({
|
||||||
Key key,
|
Key key,
|
||||||
this.child,
|
this.child,
|
||||||
|
@ -14,7 +14,7 @@ import 'theme.dart';
|
|||||||
export 'package:sky_services/editing/editing.mojom.dart' show KeyboardType;
|
export 'package:sky_services/editing/editing.mojom.dart' show KeyboardType;
|
||||||
|
|
||||||
/// A material design text input field.
|
/// A material design text input field.
|
||||||
class Input extends StatefulComponent {
|
class Input extends StatefulWidget {
|
||||||
Input({
|
Input({
|
||||||
Key key,
|
Key key,
|
||||||
this.value: InputValue.empty,
|
this.value: InputValue.empty,
|
||||||
|
@ -21,7 +21,7 @@ Map<MaterialListType, double> kListItemExtent = const <MaterialListType, double>
|
|||||||
MaterialListType.threeLine: kThreeLineListItemHeight,
|
MaterialListType.threeLine: kThreeLineListItemHeight,
|
||||||
};
|
};
|
||||||
|
|
||||||
class MaterialList extends StatefulComponent {
|
class MaterialList extends StatefulWidget {
|
||||||
MaterialList({
|
MaterialList({
|
||||||
Key key,
|
Key key,
|
||||||
this.initialScrollOffset,
|
this.initialScrollOffset,
|
||||||
|
@ -15,7 +15,7 @@ import 'theme.dart';
|
|||||||
/// isThreeLine: true is specified. If dense: true is specified then the overall
|
/// isThreeLine: true is specified. If dense: true is specified then the overall
|
||||||
/// height of this list item and the size of the DefaultTextStyles that wrap
|
/// height of this list item and the size of the DefaultTextStyles that wrap
|
||||||
/// the [primary] and [secondary] widget are reduced.
|
/// the [primary] and [secondary] widget are reduced.
|
||||||
class ListItem extends StatelessComponent {
|
class ListItem extends StatelessWidget {
|
||||||
ListItem({
|
ListItem({
|
||||||
Key key,
|
Key key,
|
||||||
this.left,
|
this.left,
|
||||||
|
@ -73,7 +73,7 @@ abstract class MaterialInkController {
|
|||||||
/// list on the paper, and it's been scrolled), a LayoutChangedNotification must
|
/// list on the paper, and it's been scrolled), a LayoutChangedNotification must
|
||||||
/// be dispatched at the relevant subtree. (This in particular means that
|
/// be dispatched at the relevant subtree. (This in particular means that
|
||||||
/// Transitions should not be placed inside Material.)
|
/// Transitions should not be placed inside Material.)
|
||||||
class Material extends StatefulComponent {
|
class Material extends StatefulWidget {
|
||||||
Material({
|
Material({
|
||||||
Key key,
|
Key key,
|
||||||
this.child,
|
this.child,
|
||||||
|
@ -6,7 +6,7 @@ import 'dart:async';
|
|||||||
|
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
class _MaterialPageTransition extends AnimatedComponent {
|
class _MaterialPageTransition extends AnimatedWidget {
|
||||||
_MaterialPageTransition({
|
_MaterialPageTransition({
|
||||||
Key key,
|
Key key,
|
||||||
Animation<double> animation,
|
Animation<double> animation,
|
||||||
|
@ -28,7 +28,7 @@ const double _kMenuVerticalPadding = 8.0;
|
|||||||
const double _kMenuWidthStep = 56.0;
|
const double _kMenuWidthStep = 56.0;
|
||||||
const double _kMenuScreenPadding = 8.0;
|
const double _kMenuScreenPadding = 8.0;
|
||||||
|
|
||||||
abstract class PopupMenuEntry<T> extends StatefulComponent {
|
abstract class PopupMenuEntry<T> extends StatefulWidget {
|
||||||
PopupMenuEntry({ Key key }) : super(key: key);
|
PopupMenuEntry({ Key key }) : super(key: key);
|
||||||
|
|
||||||
double get height;
|
double get height;
|
||||||
@ -159,7 +159,7 @@ class _CheckedPopupMenuItemState<T> extends _PopupMenuItemState<CheckedPopupMenu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PopupMenu<T> extends StatelessComponent {
|
class _PopupMenu<T> extends StatelessWidget {
|
||||||
_PopupMenu({
|
_PopupMenu({
|
||||||
Key key,
|
Key key,
|
||||||
this.route
|
this.route
|
||||||
@ -357,7 +357,7 @@ typedef void PopupMenuItemSelected<T>(T value);
|
|||||||
/// because an item was selected. The value passed to [onSelected] is the value of
|
/// because an item was selected. The value passed to [onSelected] is the value of
|
||||||
/// the selected menu item. If child is null then a standard 'navigation/more_vert'
|
/// the selected menu item. If child is null then a standard 'navigation/more_vert'
|
||||||
/// icon is created.
|
/// icon is created.
|
||||||
class PopupMenuButton<T> extends StatefulComponent {
|
class PopupMenuButton<T> extends StatefulWidget {
|
||||||
PopupMenuButton({
|
PopupMenuButton({
|
||||||
Key key,
|
Key key,
|
||||||
this.items,
|
this.items,
|
||||||
|
@ -14,7 +14,7 @@ const double _kCircularProgressIndicatorStrokeWidth = 4.0;
|
|||||||
|
|
||||||
// TODO(hansmuller): implement the support for buffer indicator
|
// TODO(hansmuller): implement the support for buffer indicator
|
||||||
|
|
||||||
abstract class ProgressIndicator extends StatefulComponent {
|
abstract class ProgressIndicator extends StatefulWidget {
|
||||||
ProgressIndicator({
|
ProgressIndicator({
|
||||||
Key key,
|
Key key,
|
||||||
this.value
|
this.value
|
||||||
|
@ -14,7 +14,7 @@ const double _kDiameter = 16.0;
|
|||||||
const double _kOuterRadius = _kDiameter / 2.0;
|
const double _kOuterRadius = _kDiameter / 2.0;
|
||||||
const double _kInnerRadius = 5.0;
|
const double _kInnerRadius = 5.0;
|
||||||
|
|
||||||
class Radio<T> extends StatelessComponent {
|
class Radio<T> extends StatelessWidget {
|
||||||
Radio({
|
Radio({
|
||||||
Key key,
|
Key key,
|
||||||
this.value,
|
this.value,
|
||||||
|
@ -107,7 +107,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FloatingActionButtonTransition extends StatefulComponent {
|
class _FloatingActionButtonTransition extends StatefulWidget {
|
||||||
_FloatingActionButtonTransition({
|
_FloatingActionButtonTransition({
|
||||||
Key key,
|
Key key,
|
||||||
this.child
|
this.child
|
||||||
@ -180,7 +180,7 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr
|
|||||||
/// This class provides APIs for showing drawers, snackbars, and bottom sheets.
|
/// This class provides APIs for showing drawers, snackbars, and bottom sheets.
|
||||||
///
|
///
|
||||||
/// See: <https://www.google.com/design/spec/layout/structure.html>
|
/// See: <https://www.google.com/design/spec/layout/structure.html>
|
||||||
class Scaffold extends StatefulComponent {
|
class Scaffold extends StatefulWidget {
|
||||||
Scaffold({
|
Scaffold({
|
||||||
Key key,
|
Key key,
|
||||||
this.toolBar,
|
this.toolBar,
|
||||||
@ -572,7 +572,7 @@ class ScaffoldFeatureController<T extends Widget, U> {
|
|||||||
final StateSetter setState;
|
final StateSetter setState;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PersistentBottomSheet extends StatefulComponent {
|
class _PersistentBottomSheet extends StatefulWidget {
|
||||||
_PersistentBottomSheet({
|
_PersistentBottomSheet({
|
||||||
Key key,
|
Key key,
|
||||||
this.animationController,
|
this.animationController,
|
||||||
|
@ -7,7 +7,7 @@ import 'dart:ui' show Color, Offset;
|
|||||||
import 'package:flutter/painting.dart';
|
import 'package:flutter/painting.dart';
|
||||||
|
|
||||||
// Based on http://www.google.com/design/spec/what-is-material/elevation-shadows.html
|
// Based on http://www.google.com/design/spec/what-is-material/elevation-shadows.html
|
||||||
// Currently, only the elevation values that are bound to one or more components are
|
// Currently, only the elevation values that are bound to one or more widgets are
|
||||||
// defined here.
|
// defined here.
|
||||||
|
|
||||||
/// Map of elevation offsets used by material design to [BoxShadow] definitions.
|
/// Map of elevation offsets used by material design to [BoxShadow] definitions.
|
||||||
|
@ -11,7 +11,7 @@ import 'constants.dart';
|
|||||||
import 'debug.dart';
|
import 'debug.dart';
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
|
|
||||||
class Slider extends StatelessComponent {
|
class Slider extends StatelessWidget {
|
||||||
Slider({
|
Slider({
|
||||||
Key key,
|
Key key,
|
||||||
this.value,
|
this.value,
|
||||||
|
@ -37,7 +37,7 @@ const Curve _snackBarFadeCurve = const Interval(0.72, 1.0, curve: Curves.fastOut
|
|||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
/// * https://www.google.com/design/spec/components/snackbars-toasts.html
|
/// * https://www.google.com/design/spec/components/snackbars-toasts.html
|
||||||
class SnackBarAction extends StatelessComponent {
|
class SnackBarAction extends StatelessWidget {
|
||||||
SnackBarAction({Key key, this.label, this.onPressed }) : super(key: key) {
|
SnackBarAction({Key key, this.label, this.onPressed }) : super(key: key) {
|
||||||
assert(label != null);
|
assert(label != null);
|
||||||
assert(onPressed != null);
|
assert(onPressed != null);
|
||||||
@ -70,7 +70,7 @@ class SnackBarAction extends StatelessComponent {
|
|||||||
/// * [Scaffold.of] and [ScaffoldState.showSnackBar]
|
/// * [Scaffold.of] and [ScaffoldState.showSnackBar]
|
||||||
/// * [SnackBarAction]
|
/// * [SnackBarAction]
|
||||||
/// * https://www.google.com/design/spec/components/snackbars-toasts.html
|
/// * https://www.google.com/design/spec/components/snackbars-toasts.html
|
||||||
class SnackBar extends StatelessComponent {
|
class SnackBar extends StatelessWidget {
|
||||||
SnackBar({
|
SnackBar({
|
||||||
Key key,
|
Key key,
|
||||||
this.content,
|
this.content,
|
||||||
|
@ -13,7 +13,7 @@ import 'shadows.dart';
|
|||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'toggleable.dart';
|
import 'toggleable.dart';
|
||||||
|
|
||||||
class Switch extends StatelessComponent {
|
class Switch extends StatelessWidget {
|
||||||
Switch({ Key key, this.value, this.activeColor, this.onChanged })
|
Switch({ Key key, this.value, this.activeColor, this.onChanged })
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ class TabLabel {
|
|||||||
final TabLabelIconBuilder iconBuilder;
|
final TabLabelIconBuilder iconBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Tab extends StatelessComponent {
|
class _Tab extends StatelessWidget {
|
||||||
_Tab({
|
_Tab({
|
||||||
Key key,
|
Key key,
|
||||||
this.onSelected,
|
this.onSelected,
|
||||||
@ -395,7 +395,7 @@ abstract class TabBarSelectionAnimationListener {
|
|||||||
void handleSelectionDeactivate();
|
void handleSelectionDeactivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
class TabBarSelection<T> extends StatefulComponent {
|
class TabBarSelection<T> extends StatefulWidget {
|
||||||
TabBarSelection({
|
TabBarSelection({
|
||||||
Key key,
|
Key key,
|
||||||
this.value,
|
this.value,
|
||||||
@ -969,7 +969,7 @@ class _TabBarViewState<T> extends PageableListState<TabBarView<T>> implements Ta
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TabPageSelector<T> extends StatelessComponent {
|
class TabPageSelector<T> extends StatelessWidget {
|
||||||
const TabPageSelector({ Key key }) : super(key: key);
|
const TabPageSelector({ Key key }) : super(key: key);
|
||||||
|
|
||||||
Widget _buildTabIndicator(TabBarSelectionState<T> selection, T tab, Animation<double> animation, ColorTween selectedColor, ColorTween previousColor) {
|
Widget _buildTabIndicator(TabBarSelectionState<T> selection, T tab, Animation<double> animation, ColorTween selectedColor, ColorTween previousColor) {
|
||||||
|
@ -89,7 +89,7 @@ class TimeOfDay {
|
|||||||
|
|
||||||
enum _TimePickerMode { hour, minute }
|
enum _TimePickerMode { hour, minute }
|
||||||
|
|
||||||
class TimePicker extends StatefulComponent {
|
class TimePicker extends StatefulWidget {
|
||||||
TimePicker({
|
TimePicker({
|
||||||
this.selectedTime,
|
this.selectedTime,
|
||||||
this.onChanged
|
this.onChanged
|
||||||
@ -141,7 +141,7 @@ class _TimePickerState extends State<TimePicker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(ianh): Localize!
|
// TODO(ianh): Localize!
|
||||||
class _TimePickerHeader extends StatelessComponent {
|
class _TimePickerHeader extends StatelessWidget {
|
||||||
_TimePickerHeader({
|
_TimePickerHeader({
|
||||||
this.selectedTime,
|
this.selectedTime,
|
||||||
this.mode,
|
this.mode,
|
||||||
@ -312,7 +312,7 @@ class _DialPainter extends CustomPainter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Dial extends StatefulComponent {
|
class _Dial extends StatefulWidget {
|
||||||
_Dial({
|
_Dial({
|
||||||
this.selectedTime,
|
this.selectedTime,
|
||||||
this.mode,
|
this.mode,
|
||||||
|
@ -10,7 +10,7 @@ import 'dialog.dart';
|
|||||||
import 'time_picker.dart';
|
import 'time_picker.dart';
|
||||||
import 'flat_button.dart';
|
import 'flat_button.dart';
|
||||||
|
|
||||||
class _TimePickerDialog extends StatefulComponent {
|
class _TimePickerDialog extends StatefulWidget {
|
||||||
_TimePickerDialog({
|
_TimePickerDialog({
|
||||||
Key key,
|
Key key,
|
||||||
this.initialTime
|
this.initialTime
|
||||||
|
@ -11,7 +11,7 @@ import 'material.dart';
|
|||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
import 'typography.dart';
|
import 'typography.dart';
|
||||||
|
|
||||||
class ToolBar extends StatelessComponent {
|
class ToolBar extends StatelessWidget {
|
||||||
ToolBar({
|
ToolBar({
|
||||||
Key key,
|
Key key,
|
||||||
this.left,
|
this.left,
|
||||||
|
@ -18,7 +18,7 @@ const EdgeInsets _kDefaultTooltipScreenEdgeMargin = const EdgeInsets.all(10.0);
|
|||||||
const Duration _kDefaultTooltipFadeDuration = const Duration(milliseconds: 200);
|
const Duration _kDefaultTooltipFadeDuration = const Duration(milliseconds: 200);
|
||||||
const Duration _kDefaultTooltipShowDuration = const Duration(seconds: 2);
|
const Duration _kDefaultTooltipShowDuration = const Duration(seconds: 2);
|
||||||
|
|
||||||
class Tooltip extends StatefulComponent {
|
class Tooltip extends StatefulWidget {
|
||||||
Tooltip({
|
Tooltip({
|
||||||
Key key,
|
Key key,
|
||||||
this.message,
|
this.message,
|
||||||
@ -234,7 +234,7 @@ class _TooltipPositionDelegate extends SingleChildLayoutDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TooltipOverlay extends StatelessComponent {
|
class _TooltipOverlay extends StatelessWidget {
|
||||||
_TooltipOverlay({
|
_TooltipOverlay({
|
||||||
Key key,
|
Key key,
|
||||||
this.message,
|
this.message,
|
||||||
|
@ -14,7 +14,7 @@ import 'theme_data.dart';
|
|||||||
|
|
||||||
const Duration _kExpand = const Duration(milliseconds: 200);
|
const Duration _kExpand = const Duration(milliseconds: 200);
|
||||||
|
|
||||||
class TwoLevelListItem extends StatelessComponent {
|
class TwoLevelListItem extends StatelessWidget {
|
||||||
TwoLevelListItem({
|
TwoLevelListItem({
|
||||||
Key key,
|
Key key,
|
||||||
this.left,
|
this.left,
|
||||||
@ -49,7 +49,7 @@ class TwoLevelListItem extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TwoLevelSublist extends StatefulComponent {
|
class TwoLevelSublist extends StatefulWidget {
|
||||||
TwoLevelSublist({ Key key, this.left, this.center, this.children }) : super(key: key);
|
TwoLevelSublist({ Key key, this.left, this.center, this.children }) : super(key: key);
|
||||||
|
|
||||||
final Widget left;
|
final Widget left;
|
||||||
@ -149,7 +149,7 @@ class _TwoLevelSublistState extends State<TwoLevelSublist> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TwoLevelList extends StatelessComponent {
|
class TwoLevelList extends StatelessWidget {
|
||||||
TwoLevelList({ Key key, this.items, this.type: MaterialListType.twoLine }) : super(key: key);
|
TwoLevelList({ Key key, this.items, this.type: MaterialListType.twoLine }) : super(key: key);
|
||||||
|
|
||||||
final List<Widget> items;
|
final List<Widget> items;
|
||||||
|
@ -36,7 +36,7 @@ typedef Widget RouteBuilder(RouteArguments args);
|
|||||||
|
|
||||||
typedef Future<LocaleQueryData> LocaleChangedCallback(Locale locale);
|
typedef Future<LocaleQueryData> LocaleChangedCallback(Locale locale);
|
||||||
|
|
||||||
class WidgetsApp extends StatefulComponent {
|
class WidgetsApp extends StatefulWidget {
|
||||||
WidgetsApp({
|
WidgetsApp({
|
||||||
Key key,
|
Key key,
|
||||||
this.title,
|
this.title,
|
||||||
|
@ -191,7 +191,7 @@ class _ResolutionAwareAssetResolver extends _VariantAssetResolver {
|
|||||||
/// icons/1.5x/heart.png
|
/// icons/1.5x/heart.png
|
||||||
/// icons/2.0x/heart.png
|
/// icons/2.0x/heart.png
|
||||||
/// ```
|
/// ```
|
||||||
class AssetVendor extends StatefulComponent {
|
class AssetVendor extends StatefulWidget {
|
||||||
AssetVendor({
|
AssetVendor({
|
||||||
Key key,
|
Key key,
|
||||||
this.bundle,
|
this.bundle,
|
||||||
|
@ -888,7 +888,7 @@ class Viewport extends SingleChildRenderObjectWidget {
|
|||||||
// CONTAINER
|
// CONTAINER
|
||||||
|
|
||||||
/// A convenience widget that combines common painting, positioning, and sizing widgets.
|
/// A convenience widget that combines common painting, positioning, and sizing widgets.
|
||||||
class Container extends StatelessComponent {
|
class Container extends StatelessWidget {
|
||||||
Container({
|
Container({
|
||||||
Key key,
|
Key key,
|
||||||
this.child,
|
this.child,
|
||||||
@ -1090,8 +1090,8 @@ class IndexedStack extends StackRenderObjectWidgetBase {
|
|||||||
/// Controls where a child of a [Stack] is positioned.
|
/// Controls where a child of a [Stack] is positioned.
|
||||||
///
|
///
|
||||||
/// This widget must be a descendant of a [Stack], and the path from this widget
|
/// This widget must be a descendant of a [Stack], and the path from this widget
|
||||||
/// to its enclosing [Stack] must contain only components (e.g., not other
|
/// to its enclosing [Stack] must contain only [StatelessWidget]s or
|
||||||
/// kinds of widgets, like [RenderObjectWidget]s).
|
/// [StatefulWidget]s (not other kinds of widgets, like [RenderObjectWidget]s).
|
||||||
class Positioned extends ParentDataWidget<StackRenderObjectWidgetBase> {
|
class Positioned extends ParentDataWidget<StackRenderObjectWidgetBase> {
|
||||||
Positioned({
|
Positioned({
|
||||||
Key key,
|
Key key,
|
||||||
@ -1426,8 +1426,8 @@ class Column extends Flex {
|
|||||||
///
|
///
|
||||||
/// This widget must be a descendant of a [Flex], [Row], or [Column], and the
|
/// This widget must be a descendant of a [Flex], [Row], or [Column], and the
|
||||||
/// path from this widget to its enclosing [Flex], [Row], or [Column] must
|
/// path from this widget to its enclosing [Flex], [Row], or [Column] must
|
||||||
/// contain only components (e.g., not other kinds of widgets, like
|
/// contain only [StatelessWidget]s or [StatefulWidget]s (not other kinds of
|
||||||
/// [RenderObjectWidget]s).
|
/// widgets, like [RenderObjectWidget]s).
|
||||||
class Flexible extends ParentDataWidget<Flex> {
|
class Flexible extends ParentDataWidget<Flex> {
|
||||||
Flexible({ Key key, this.flex: 1, Widget child })
|
Flexible({ Key key, this.flex: 1, Widget child })
|
||||||
: super(key: key, child: child);
|
: super(key: key, child: child);
|
||||||
@ -1507,7 +1507,7 @@ class DefaultTextStyle extends InheritedWidget {
|
|||||||
///
|
///
|
||||||
/// By default, the text will be styled using the closest enclosing
|
/// By default, the text will be styled using the closest enclosing
|
||||||
/// [DefaultTextStyle].
|
/// [DefaultTextStyle].
|
||||||
class Text extends StatelessComponent {
|
class Text extends StatelessWidget {
|
||||||
Text(this.data, { Key key, this.style }) : super(key: key) {
|
Text(this.data, { Key key, this.style }) : super(key: key) {
|
||||||
assert(data != null);
|
assert(data != null);
|
||||||
}
|
}
|
||||||
@ -1666,7 +1666,7 @@ class RawImage extends LeafRenderObjectWidget {
|
|||||||
/// This widget is rarely used directly. Instead, consider using [AssetImage] or
|
/// This widget is rarely used directly. Instead, consider using [AssetImage] or
|
||||||
/// [NetworkImage], depending on whather you wish to display an image from the
|
/// [NetworkImage], depending on whather you wish to display an image from the
|
||||||
/// assert bundle or from the network.
|
/// assert bundle or from the network.
|
||||||
class RawImageResource extends StatefulComponent {
|
class RawImageResource extends StatefulWidget {
|
||||||
RawImageResource({
|
RawImageResource({
|
||||||
Key key,
|
Key key,
|
||||||
this.image,
|
this.image,
|
||||||
@ -1785,7 +1785,7 @@ class _RawImageResourceState extends State<RawImageResource> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Displays an image loaded from the network.
|
/// Displays an image loaded from the network.
|
||||||
class NetworkImage extends StatelessComponent {
|
class NetworkImage extends StatelessWidget {
|
||||||
NetworkImage({
|
NetworkImage({
|
||||||
Key key,
|
Key key,
|
||||||
this.src,
|
this.src,
|
||||||
@ -1910,7 +1910,7 @@ class DefaultAssetBundle extends InheritedWidget {
|
|||||||
/// This widget lets you customize how images are loaded by supplying your own
|
/// This widget lets you customize how images are loaded by supplying your own
|
||||||
/// image provider. Internally, [NetworkImage] uses an [ImageProvider] that
|
/// image provider. Internally, [NetworkImage] uses an [ImageProvider] that
|
||||||
/// loads the image from the network.
|
/// loads the image from the network.
|
||||||
class AsyncImage extends StatelessComponent {
|
class AsyncImage extends StatelessWidget {
|
||||||
AsyncImage({
|
AsyncImage({
|
||||||
Key key,
|
Key key,
|
||||||
this.provider,
|
this.provider,
|
||||||
@ -2000,7 +2000,7 @@ class AsyncImage extends StatelessComponent {
|
|||||||
///
|
///
|
||||||
/// By default, asset image will load the image from the closest enclosing
|
/// By default, asset image will load the image from the closest enclosing
|
||||||
/// [DefaultAssetBundle].
|
/// [DefaultAssetBundle].
|
||||||
class AssetImage extends StatelessComponent {
|
class AssetImage extends StatelessWidget {
|
||||||
// Don't add asserts here unless absolutely necessary, since it will
|
// Don't add asserts here unless absolutely necessary, since it will
|
||||||
// require removing the const constructor, which is an API change.
|
// require removing the const constructor, which is an API change.
|
||||||
const AssetImage({
|
const AssetImage({
|
||||||
@ -2293,7 +2293,7 @@ class Semantics extends SingleChildRenderObjectWidget {
|
|||||||
|
|
||||||
/// Causes all the semantics of the subtree rooted at this node to be
|
/// Causes all the semantics of the subtree rooted at this node to be
|
||||||
/// merged into one node in the semantics tree. For example, if you
|
/// merged into one node in the semantics tree. For example, if you
|
||||||
/// have a component with a Text node next to a checkbox widget, this
|
/// have a widget with a Text node next to a checkbox widget, this
|
||||||
/// could be used to merge the label from the Text node with the
|
/// could be used to merge the label from the Text node with the
|
||||||
/// "checked" semantic state of the checkbox into a single node that
|
/// "checked" semantic state of the checkbox into a single node that
|
||||||
/// had both the label and the checked state. Otherwise, the label
|
/// had both the label and the checked state. Otherwise, the label
|
||||||
@ -2353,7 +2353,7 @@ class MetaData extends SingleChildRenderObjectWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class KeyedSubtree extends StatelessComponent {
|
class KeyedSubtree extends StatelessWidget {
|
||||||
KeyedSubtree({ Key key, this.child })
|
KeyedSubtree({ Key key, this.child })
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
@ -2363,7 +2363,7 @@ class KeyedSubtree extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A platonic widget that invokes a closure to obtain its child widget.
|
/// A platonic widget that invokes a closure to obtain its child widget.
|
||||||
class Builder extends StatelessComponent {
|
class Builder extends StatelessWidget {
|
||||||
Builder({ Key key, this.builder }) : super(key: key);
|
Builder({ Key key, this.builder }) : super(key: key);
|
||||||
|
|
||||||
/// Called to obtain the child widget.
|
/// Called to obtain the child widget.
|
||||||
@ -2377,7 +2377,7 @@ class Builder extends StatelessComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
typedef Widget StatefulWidgetBuilder(BuildContext context, StateSetter setState);
|
typedef Widget StatefulWidgetBuilder(BuildContext context, StateSetter setState);
|
||||||
class StatefulBuilder extends StatefulComponent {
|
class StatefulBuilder extends StatefulWidget {
|
||||||
StatefulBuilder({ Key key, this.builder }) : super(key: key);
|
StatefulBuilder({ Key key, this.builder }) : super(key: key);
|
||||||
final StatefulWidgetBuilder builder;
|
final StatefulWidgetBuilder builder;
|
||||||
_StatefulBuilderState createState() => new _StatefulBuilderState();
|
_StatefulBuilderState createState() => new _StatefulBuilderState();
|
||||||
|
@ -50,7 +50,7 @@ class _CheckedModeBannerPainter extends CustomPainter {
|
|||||||
|
|
||||||
/// Displays a banner saying "CHECKED" when running in checked mode.
|
/// Displays a banner saying "CHECKED" when running in checked mode.
|
||||||
/// Does nothing in release mode.
|
/// Does nothing in release mode.
|
||||||
class CheckedModeBanner extends StatelessComponent {
|
class CheckedModeBanner extends StatelessWidget {
|
||||||
CheckedModeBanner({
|
CheckedModeBanner({
|
||||||
Key key,
|
Key key,
|
||||||
this.child
|
this.child
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user