glitch_text 0.0.6 copy "glitch_text: ^0.0.6" to clipboard
glitch_text: ^0.0.6 copied to clipboard

Glitch Text - A Flutter package for creating Text widget with glitch effects & added support of 8+ glitch fonts

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    double screenHeight = MediaQuery.of(context).size.height;
    double screenWidth = MediaQuery.of(context).size.width;
    return Scaffold(
      body: SizedBox(
        height: screenHeight,
        width: screenWidth,
        child: SingleChildScrollView(
          physics: const BouncingScrollPhysics(),
          child: Column(
            children: [
              Container(
                height: screenHeight * .1,
                width: screenWidth,
                child: Row(
                  children:  [
                   GlitchText(
                      data: "Glitch Text",
                      overflow: TextOverflow.ellipsis,
                      font: GlitchFont.bugFast(),
                      fontSize: 90,
                      offset: 3,
                      wordSpacing: 1,
                      fontColor: Colors.black,
                      letterSpacing: 1,
                    )
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
13
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Glitch Text - A Flutter package for creating Text widget with glitch effects & added support of 8+ glitch fonts

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on glitch_text