curved_text 0.2.0 copy "curved_text: ^0.2.0" to clipboard
curved_text: ^0.2.0 copied to clipboard

Text that is curved in place with a certain curvature value.

example/lib/main.dart

import 'package:curved_text/curved_text.dart';
import 'package:flutter/material.dart';
import 'package:storybook_flutter/storybook_flutter.dart';

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

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

  @override
  Widget build(BuildContext context) => Storybook(
        initialRoute: '/stories/curved-text',
        children: [
          Story(
            background: Colors.white,
            name: 'Curved text',
            builder: (_, k) {
              final curvature = k.slider(
                  label: 'Curvature',
                  initial: double.minPositive,
                  min: -0.05,
                  max: 0.05);

              final text = k.text(
                label: 'Text',
                initial: 'Hello, Flutter!',
              );
              const textStyle = TextStyle(fontSize: 20, color: Colors.black);

              return DefaultTextStyle(
                style: textStyle,
                child: CurvedText(
                  curvature: curvature,
                  text: text,
                  // textStyle: textStyle,
                  targetRadius: 50,
                ),
              );
            },
          )
        ],
      );
}
6
likes
160
points
430
downloads

Publisher

verified publishergbot.dev

Weekly Downloads

Text that is curved in place with a certain curvature value.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_arc_text

More

Packages that depend on curved_text