[rename fixit] *Component* -> *Widget*

This patch renames StatelessComponent to StatelessWidget and
StatefulComponent to StatefulWidget.

Fixes #2308
This commit is contained in:
Adam Barth
2016-03-12 12:13:16 -08:00
parent 892063ac69
commit 95fc5ae070
152 changed files with 410 additions and 410 deletions

View File

@@ -16,7 +16,7 @@ class CardModel {
Key get key => new ObjectKey(this);
}
class CardCollection extends StatefulComponent {
class CardCollection extends StatefulWidget {
CardCollectionState createState() => new CardCollectionState();
}

View File

@@ -6,7 +6,7 @@ import 'dart:math' as math;
import 'package:flutter/material.dart';
class ExampleDragTarget extends StatefulComponent {
class ExampleDragTarget extends StatefulWidget {
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);
final Color color;
final double size;
@@ -66,7 +66,7 @@ class DotState extends State<Dot> {
}
}
class ExampleDragSource extends StatelessComponent {
class ExampleDragSource extends StatelessWidget {
ExampleDragSource({
Key key,
this.color,
@@ -162,7 +162,7 @@ class DashOutlineCirclePainter extends CustomPainter {
bool shouldRepaint(DashOutlineCirclePainter oldPainter) => false;
}
class MovableBall extends StatelessComponent {
class MovableBall extends StatelessWidget {
MovableBall(this.position, this.ballPosition, this.callback);
final int position;
@@ -212,7 +212,7 @@ class MovableBall extends StatelessComponent {
}
}
class DragAndDropApp extends StatefulComponent {
class DragAndDropApp extends StatefulWidget {
DragAndDropAppState createState() => new DragAndDropAppState();
}

View File

@@ -32,7 +32,7 @@ enum WindowSide {
bottomRight,
}
class WindowDecoration extends StatelessComponent {
class WindowDecoration extends StatelessWidget {
WindowDecoration({
Key key,
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);
final ChildViewConnection child;
@@ -155,7 +155,7 @@ class _WindowState extends State<Window> {
}
}
class LauncherItem extends StatelessComponent {
class LauncherItem extends StatelessWidget {
LauncherItem({
Key key,
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);
final List<Widget> items;
@@ -188,7 +188,7 @@ class Launcher extends StatelessComponent {
}
}
class WindowManager extends StatefulComponent {
class WindowManager extends StatefulWidget {
_WindowManagerState createState() => new _WindowManagerState();
}

View File

@@ -52,7 +52,7 @@ class _MarkerPainter extends CustomPainter {
}
}
class Marker extends StatelessComponent {
class Marker extends StatelessWidget {
Marker({
this.type: MarkerType.touch,
this.position,
@@ -82,7 +82,7 @@ class Marker extends StatelessComponent {
}
}
class OverlayGeometryApp extends StatefulComponent {
class OverlayGeometryApp extends StatefulWidget {
OverlayGeometryAppState createState() => new OverlayGeometryAppState();
}

View File

@@ -13,7 +13,7 @@ class CardModel {
Key get key => new ObjectKey(this);
}
class PageableListApp extends StatefulComponent {
class PageableListApp extends StatefulWidget {
PageableListAppState createState() => new PageableListAppState();
}

View File

@@ -30,7 +30,7 @@ void main() {
);
}
class RawKeyboardDemo extends StatefulComponent {
class RawKeyboardDemo extends StatefulWidget {
RawKeyboardDemo({ GlobalKey key }) : super(key: key);
_HardwareKeyDemoState createState() => new _HardwareKeyDemoState();