simple_splash_view 0.3.2 copy "simple_splash_view: ^0.3.2" to clipboard
simple_splash_view: ^0.3.2 copied to clipboard

Native splash generator (Android/iOS) with Kotlin/Swift using config from pubspec.yaml.

example/lib/main.dart

import 'package:flutter/material.dart';

void main() {
  runApp(const SplashExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange),
        useMaterial3: true,
      ),
      home: const DemoHome(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    final styles = const [
      ('circular', Icons.sync),
      ('linear', Icons.horizontal_rule),
      ('dots', Icons.more_horiz),
      ('pulse', Icons.circle),
      ('lottie', Icons.auto_awesome),
    ];

    return Scaffold(
      appBar: AppBar(title: const Text('Simple Splash View')),
      body: ListView(
        padding: const EdgeInsets.all(20),
        children: [
          const Text(
            'Native splash generator for Android and iOS.',
            style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
          ),
          const SizedBox(height: 12),
          const Text(
            'Edit simple_splash_view in pubspec.yaml, then run:',
          ),
          const SizedBox(height: 12),
          const _Command('dart run simple_splash_view --preview'),
          const _Command('dart run simple_splash_view --doctor'),
          const _Command('dart run simple_splash_view --platform all'),
          const SizedBox(height: 24),
          const Text(
            'Loader styles',
            style: TextStyle(fontSize: 18, fontWeight: FontWeight.w700),
          ),
          const SizedBox(height: 12),
          Wrap(
            spacing: 12,
            runSpacing: 12,
            children: [
              for (final item in styles)
                Chip(
                  avatar: Icon(item.$2, size: 18),
                  label: Text(item.$1),
                ),
            ],
          ),
          const SizedBox(height: 24),
          const Text(
            'Placement controls',
            style: TextStyle(fontSize: 18, fontWeight: FontWeight.w700),
          ),
          const SizedBox(height: 8),
          const Text(
            'Use top, center, bottom, below_visual, above_text, and *_offset_y values for precise native layout control.',
          ),
        ],
      ),
    );
  }
}

class _Command extends StatelessWidget {
  const _Command(this.value);

  final String value;

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.only(bottom: 8),
      padding: const EdgeInsets.all(12),
      decoration: BoxDecoration(
        color: Theme.of(context).colorScheme.surfaceContainerHighest,
        borderRadius: BorderRadius.circular(12),
      ),
      child: Text(value, style: const TextStyle(fontFamily: 'monospace')),
    );
  }
}
6
likes
150
points
694
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Native splash generator (Android/iOS) with Kotlin/Swift using config from pubspec.yaml.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

collection, path, xml, yaml

More

Packages that depend on simple_splash_view