multi_platform_widget 1.0.1
multi_platform_widget: ^1.0.1 copied to clipboard

A package which allows creating different widgets for each platform supported by Flutter.

multi_platform_widget #

A widget which you can use when you want to provide different widget for each platform. It merges widgets for every platform into single class.

Usage #

Fully working example in example/lib/main.dart

class MyWidget extends MultiPlatformWidget {
  // It is not necessary to specify a widget for every platform.
  // If widgets for some platforms are not specified, then default widget
  // will be built on those platforms.

  @override
  Widget get defaultWidget => DefaultWidget();

  @override
  Widget? get androidWidget => AndroidWidget();

  @override
  Widget? get fuchsiaWidget => FuchsiaWidget();

  @override
  Widget? get iOSWidget => IOSWidget();

  @override
  Widget? get linuxWidget => LinuxWidget();

  @override
  Widget? get macOSWidget => MacOSWidget();

  @override
  Widget? get windowsWidget => WindowsWidget();

  @override
  Widget? get webWidget => WebWidget();
}
3
likes
130
pub points
0%
popularity

Publisher

morabus.pl

A package which allows creating different widgets for each platform supported by Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on multi_platform_widget