0 purchases
dotup flutter adaptive
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');
}
}
copied to clipboard
Install #
flutter pub add dotup_flutter_adaptive
Links #
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 !
dotup IT solutions #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.