rive_splash_screen_plus 0.2.0 copy "rive_splash_screen_plus: ^0.2.0" to clipboard
rive_splash_screen_plus: ^0.2.0 copied to clipboard

Facilitator for having a Splash screen with a Rive animation until some work has been done for the initialization of the app

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: SplashScreen.navigate(
        name: 'intro.riv',
        next: (context) => const MyHomePage(title: 'Flutter Demo Home Page'),
        until: () => Future.delayed(const Duration(seconds: 2)),
        startAnimation: 'Landing',
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.titleMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}
0
likes
140
points
8
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Facilitator for having a Splash screen with a Rive animation until some work has been done for the initialization of the app

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, rive_loading_plus

More

Packages that depend on rive_splash_screen_plus