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

unlistedoutdated

Flame extension to add widgets with progress bar and transition animation

example/lib/main.dart

import 'package:flame_loading_progress/flame_loading_progress.dart';
import 'package:flame_loading_progress_example/game.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flame loading screen demo',

        /// use [Material] to keep material styles working
        home: Material(
          color: Colors.black,

          /// use [GameWidgetWrapper] instead original [GameWidget]
          child: GameWidgetWrapper<LoadingScreenExample,
              ProgressMessage>.controlled(
            gameFactory: LoadingScreenExample.new,

            /// This is new parameter. It is alternative to original
            /// [loadingBuilder] parameter. You should use it to enable
            /// progress reporting and transition animation
            loadingWidgetBuilder: ExampleBuilder(),
          ),
        ));
  }
}
0
likes
110
points
0
downloads

Publisher

verified publisherasgalex.pro

Weekly Downloads

Flame extension to add widgets with progress bar and transition animation

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flame, flame_message_stream, flutter, meta

More

Packages that depend on flame_loading_progress