0 purchases
widget factory
widget_factory #
Flutter package providing factory abstract class for creating widgets.
Usage #
class CountWidgetFactoryData {
final int count;
CountWidgetFactoryData(this.count);
}
class ConutWidgetFactory implements WidgetFactory<CountWidgetFactoryData> {
@override
Widget createWidget({CountWidgetFactoryData? data}) {
final text = data?.count.toString() ?? '';
return Container(
child: Text('count: $text'),
);
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.