device_preview_minus 1.0.6 device_preview_minus: ^1.0.6 copied to clipboard
A temporary alternative to device_preview. (https://pub.dev/packages/device_preview)
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: () {},
),
),
),
);
}
}