flame_splash_screen 0.0.1 copy "flame_splash_screen: ^0.0.1" to clipboard
flame_splash_screen: ^0.0.1 copied to clipboard

outdated

Style your flame/flutter game with a beautiful splash screen. Simple to use but very customizable.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flame_splash_screen/flame_splash_screen.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(MyApp());
  SystemChrome.setEnabledSystemUIOverlays([]);
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: OtherScreen(),
      theme: ThemeData.dark(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class OtherScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: RaisedButton(
          child: const Text("Click on me"),
          onPressed: () {
            Navigator.push(
              context,
              MaterialPageRoute(builder: (context) => SplashScreenGame()),
            );
          },
        ),
      ),
    );
  }
}

class SplashScreenGame extends StatefulWidget {
  @override
  _SplashScreenGameState createState() => _SplashScreenGameState();
}

class _SplashScreenGameState extends State<SplashScreenGame> {
  FlameSplashController controller;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: FlameSplashScreen(
        showBefore: (BuildContext context) {
          return const Text("Before logo");
        },
        showAfter: (BuildContext context) {
          return const Text("After logo");
        },
        theme: FlameSplashTheme.dark,
        onFinish: (context) => Navigator.pop(context),
      ),
    );
  }
}
60
likes
0
pub points
87%
popularity

Publisher

verified publisherflame-engine.org

Style your flame/flutter game with a beautiful splash screen. Simple to use but very customizable.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flame_splash_screen