random_text_reveal 0.0.3 copy "random_text_reveal: ^0.0.3" to clipboard
random_text_reveal: ^0.0.3 copied to clipboard

outdated

A text animation package with random text reveal effect where the text reveals itself letter by letter (used mostly in movies)

example/lib/main.dart

import 'package:flutter/material.dart';

// OUR PACKAGE
import 'package:random_text_reveal/random_text_reveal.dart';

final GlobalKey<RandomTextRevealState> globalKey = GlobalKey();

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

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

  @override
  Widget build(BuildContext context) {
    const textStyle = TextStyle(
      fontSize: 36,
      color: Colors.blue,
      fontWeight: FontWeight.bold,
    );

    return MaterialApp(
      title: 'Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        body: Container(
          padding: const EdgeInsets.all(20),
          alignment: Alignment.centerLeft,
          child: RandomTextReveal(
            key: globalKey,
            text: 'Random Text Reveal',
            duration: const Duration(seconds: 2),
            style: textStyle,
            curve: Curves.easeIn,
          ),
        ),
        floatingActionButton: FloatingActionButton(
          child: const Icon(Icons.play_arrow),
          onPressed: () {
            globalKey.currentState?.play();
          },
        ),
      ),
    );
  }
}
77
likes
0
points
246
downloads

Publisher

unverified uploader

Weekly Downloads

A text animation package with random text reveal effect where the text reveals itself letter by letter (used mostly in movies)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on random_text_reveal