autoshot 1.0.0 copy "autoshot: ^1.0.0" to clipboard
autoshot: ^1.0.0 copied to clipboard

A device_preview plugin that automates generating App Store / Play Store screenshots across multiple devices, locales, and screens. Runs entirely in Flutter Web and outputs a downloadable ZIP archive.

example/lib/main.dart

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

void main() {
  runApp(
    Autoshot(
      config: AutoshotConfig(
        screens: [
          ScreenEntry(name: 'home', builder: (_) => const HomeScreen()),
          ScreenEntry(name: 'detail', builder: (_) => const DetailScreen()),
        ],
        locales: const [Locale('en', 'US')],
        devices: [Devices.ios.iPhone13ProMax],
        theme: ThemeData(colorSchemeSeed: Colors.indigo, useMaterial3: true),
        darkTheme: ThemeData(
          colorSchemeSeed: Colors.indigo,
          brightness: Brightness.dark,
          useMaterial3: true,
        ),
      ),
      builder: (context) => const MyApp(),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // ignore: deprecated_member_use
      useInheritedMediaQuery: true,
      locale: DevicePreview.locale(context),
      builder: DevicePreview.appBuilder,
      theme: ThemeData(colorSchemeSeed: Colors.indigo, useMaterial3: true),
      darkTheme: ThemeData(
        colorSchemeSeed: Colors.indigo,
        brightness: Brightness.dark,
        useMaterial3: true,
      ),
      debugShowCheckedModeBanner: false,
      home: const HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Home')),
      body: ListView.builder(
        itemCount: 20,
        itemBuilder: (context, index) => ListTile(
          leading: CircleAvatar(child: Text('${index + 1}')),
          title: Text('Item ${index + 1}'),
          subtitle: const Text('Tap to see details'),
          onTap: () {},
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {},
        child: const Icon(Icons.add),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Detail')),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            Icon(
              Icons.photo_library_rounded,
              size: 80,
              color: Theme.of(context).colorScheme.primary,
            ),
            const SizedBox(height: 24),
            Text(
              'Beautiful Detail View',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
            const SizedBox(height: 8),
            Text(
              'This screen is captured for every device and locale.',
              style: Theme.of(context).textTheme.bodyMedium,
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
0
points
152
downloads

Publisher

verified publisherandronasef.dev

Weekly Downloads

A device_preview plugin that automates generating App Store / Play Store screenshots across multiple devices, locales, and screens. Runs entirely in Flutter Web and outputs a downloadable ZIP archive.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, device_preview, flutter, provider

More

Packages that depend on autoshot