arc_text 0.0.4 arc_text: ^0.0.4 copied to clipboard
A Flutter package for creating animated arc text for app logos and more.
arc_text is a Flutter package that allows you to display text along an arc. This can be useful for creating logos, unique UI elements, or adding a creative touch to your Flutter applications. The package also supports animations, allowing for dynamic text displays along curved paths.
Features
- Arc Text Display: Easily render text along a customizable arc.
- Animation Support: Animate text around the arc for eye-catching effects.
- Customization: Adjust the radius, angle, and position of the text on the arc.
- Compatibility: Works seamlessly on iOS, Android, and web platforms.
Installation
Add arc_text
as a dependency in your pubspec.yaml
file:
dependencies:
arc_text: ^0.0.3
Then, run flutter pub get
to fetch the package.
Usage
Here’s a simple example to get you started with displaying text along an arc.
import 'package:arc_text/arc_text.dart';
class ArcTextExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: ArcText(
text: "Hello Flutter!",
radius: 100, // Adjust the radius as needed
startAngle: -45, // Adjust start angle of the text
sweepAngle: 180, // Adjust arc coverage
style: TextStyle(
fontSize: 24,
color: Colors.blue,
fontWeight: FontWeight.bold,
),
),
);
}
}
Parameters
- text: The text to display along the arc.
- radius: The radius of the arc (distance from the center).
- startAngle: The starting angle of the text on the arc.
- sweepAngle: The arc coverage or the angle span.
- style: The text style, including font size, color, and weight.
Additional Information
Contributing
Contributions are welcome! If you'd like to help improve this package, please fork the repository and submit a pull request. For major changes, consider opening an issue first to discuss what you’d like to add or change.
Filing Issues
If you encounter any bugs or have feature requests, please open an issue on the GitHub Issues page. We’ll do our best to respond promptly.
License
This package is open-source and available under the MIT License.