device_preview_minus 1.0.6 copy "device_preview_minus: ^1.0.6" to clipboard
device_preview_minus: ^1.0.6 copied to clipboard

A temporary alternative to device_preview. (https://pub.dev/packages/device_preview)

example/main.dart

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

void main() {
  runApp(
    DevicePreview(
      builder: (context) => const MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      locale: DevicePreview.locale(context),
      builder: DevicePreview.appBuilder,
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView(
        children: List.generate(
          100,
          (i) => ListTile(
            title: Text('Tile $i'),
            onTap: () {},
          ),
        ),
      ),
    );
  }
}