mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
18 lines
387 B
Dart
18 lines
387 B
Dart
part of widgets;
|
|
|
|
abstract class StyleComponent extends Component {
|
|
Node content;
|
|
|
|
// Subclasses should implement this getter to provide their style information.
|
|
Style get style => null;
|
|
|
|
StyleComponent({ Object key, this.content }) : super(key: key);
|
|
|
|
Node render() {
|
|
return new Container(
|
|
style: style,
|
|
children: content == null ? [] : [content]
|
|
);
|
|
}
|
|
}
|