flutter_text_drawable 0.3.1 copy "flutter_text_drawable: ^0.3.1" to clipboard
flutter_text_drawable: ^0.3.1 copied to clipboard

outdated

A flutter library that gives you the flexibility to create and customize text user avatars like Gmail and Contacts.

example/lib/main.dart

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

void main() {
  runApp(MaterialApp(
    title: 'Flutter Text Drawable Demo',
    theme: ThemeData(primaryColor: Colors.green),
    home: MyApp(),
  ));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text('Flutter Text Drawable Demo'),
      ),
      body: Column(
        children: [
          // Using TextDrawable alone
          ListView.builder(
            shrinkWrap: true,
            itemCount: 3,
            itemBuilder: (context, index) {
              return ListTile(
                leading: TextDrawable(
                  text: "$index",
                  isTappable: true,
                ),
                title: Text("Standalone Item $index"),
              );
            },
          ),
          SizedBox(height: 50),
          // Using the TextDrawableListTile widget
          ListView.builder(
            shrinkWrap: true,
            itemCount: 3,
            itemBuilder: (context, index) {
              return TextDrawableListTile(
                drawableText: "$index",
                title: Text("TextDrawableListTile Item $index"),
                onTap: null,
              );
            },
          ),
        ],
      ),
    );
  }
}
14
likes
40
points
1.86k
downloads

Publisher

verified publisherakora-ingdkb.me

Weekly Downloads

A flutter library that gives you the flexibility to create and customize text user avatars like Gmail and Contacts.

Repository (GitHub)

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_text_drawable