adaptivex 0.0.1+6 copy "adaptivex: ^0.0.1+6" to clipboard
adaptivex: ^0.0.1+6 copied to clipboard

This package allow you to build the widget based on width (screen) size or platform

example/lib/main.dart

import 'package:adaptivex/adaptivex.dart';
import 'package:example/my_cupertino_app.dart';
import 'package:example/my_fusion_app.dart';
import 'package:example/my_linux_app.dart';
import 'package:example/my_macos_app.dart';
import 'package:example/my_material_app.dart';
import 'package:example/my_web_app.dart';
import 'package:example/my_window_app.dart';

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

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  /// change this line to any target platform you want to see, except web version
  debugDefaultTargetPlatformOverride = TargetPlatform.linux;

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return const AdaptivePlatformWidget(
      child: MyFusionApp(),
      android: MyMaterialApp(),
      ios: MyCupertinoApp(),
      macos: MyMacosApp(),
      web: MyWebApp(),
      window: MyWindowApp(),
      linux: MyLinuxApp(),
    );
  }
}
12
likes
140
pub points
79%
popularity

Publisher

verified publishermylekha.app

This package allow you to build the widget based on width (screen) size or platform

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, printx

More

Packages that depend on adaptivex