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

example/main.dart

import 'package:dotup_flutter_adaptive/dotup_flutter_adaptive.dart';
import 'package:flutter/material.dart';

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');
  }
}
1
likes
150
points
48
downloads

Publisher

unverified uploader

Weekly Downloads

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