dotup_flutter_adaptive 1.0.1 copy "dotup_flutter_adaptive: ^1.0.1" to clipboard
dotup_flutter_adaptive: ^1.0.1 copied to clipboard

Adaptive and responive UIs based on device, platform or screen size

flutter License: GPL v3 forks stars

dotup_flutter_adaptive #

Small package to develop adaptive and responive UIs based on device, platform or screen size.

https://docs.flutter.dev/ui/layout/responsive/adaptive-responsive

Easy usage #

// Powered by https://dotup.de
// Copyright (c) 2021, dotup IT solutions - Peter Ullrich


main(List<String> args) {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: PlatformQuery(
            child: PlatformWidget(
              fallback: const FallbackWidget(),
              windows: DeviceQuery(
                context: context,
                child: const DeviceWidget(
                  desktop: DesktopWidget(),
                  fallback: FallbackWidget(),
                ),
              ),
              web: const Text('web'),
            ),
          ),
        ),
      ),
    );
  }
}

class WindwosWidget extends StatelessWidget {
  const WindwosWidget({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const Text('Windows');
  }
}

class FallbackWidget extends StatelessWidget {
  const FallbackWidget({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const Text('Fallback');
  }
}

class DesktopWidget extends StatelessWidget {
  const DesktopWidget({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const Text('DesktopWidget');
  }
}


Install #

flutter pub add dotup_flutter_adaptive

dotup_flutter_adaptive on pub.dev #

Other widgets on pub.dev #

Other open source flutter projects on Github #

Other open source dart projects on Github #

Flutter simulator | DFFP3 #

Go to https://flutter-apps.ml and check out the awesome flutter simulator !

Flutter simulator

dotup IT solutions #

0
likes
130
pub points
15%
popularity

Publisher

unverified uploader

Adaptive and responive UIs based on device, platform or screen size

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on dotup_flutter_adaptive