flutter_gradient_text 1.0.1 copy "flutter_gradient_text: ^1.0.1" to clipboard
flutter_gradient_text: ^1.0.1 copied to clipboard

A Flutter plugin project to provide gradient color applied text

example/lib/main.dart

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

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
            backgroundColor: Colors.grey,
            title: const GradientText(
              Text("Linear Gradient Title", style: TextStyle(fontSize: 24)),
              type: Type.linear,
              colors: [Colors.red, Colors.yellow, Colors.purple, Colors.black],
            )),
        body: const Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              GradientText(
                  Text("Default Gradient Text", style: TextStyle(fontSize: 30)),
                  colors: [Colors.red, Colors.green, Colors.black],
                  stops: [0, 0.5, 1]),
              GradientText(
                Text("Radial Gradient Text", style: TextStyle(fontSize: 30)),
                type: Type.radial,
                radius: 1,
                colors: [Colors.red, Colors.green, Colors.black],
              ),
              GradientText(
                Text("Sweep Gradient Text", style: TextStyle(fontSize: 30)),
                type: Type.sweep,
                colors: [Colors.red, Colors.green, Colors.black],
              ),
            ],
          ),
        ),
      ),
    );
  }
}
7
likes
160
points
101
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin project to provide gradient color applied text

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_gradient_text