dotup_device_simulator 1.0.3 copy "dotup_device_simulator: ^1.0.3" to clipboard
dotup_device_simulator: ^1.0.3 copied to clipboard

unlistedoutdated

DeviceSimulator allows you to easily test your Flutter app for different screen resolutions and platforms. Quick n dirty null safety

example/lib/main.dart

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

// It's good practice to define a constant for enabling the device simulator
// so you can easily turn it on or off
const bool debugEnableDeviceSimulator = true;

void main() => runApp(MyApp());

// Insert Device simulator at the top of your widget, as a child of your
// App widget. Build the rest of your widget tree as you would normally do.
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'DeviceSimulator demo',
      home: DeviceSimulator(
        initialDeviceIndex: 3,
        initialPlatform: TargetPlatform.android,
        orientation: Orientation.portrait,
        brightness: Brightness.dark,
        enable: debugEnableDeviceSimulator,
        child: Scaffold(
          appBar: AppBar(
            title: Text('DeviceSimulator Demo'),
          ),
          body: Center(
            child: Text('Hello multiple resolutions!'),
          ),
        ),
      ),
    );
  }
}
0
likes
0
points
65
downloads

Publisher

verified publisherdotup.de

Weekly Downloads

DeviceSimulator allows you to easily test your Flutter app for different screen resolutions and platforms. Quick n dirty null safety

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on dotup_device_simulator