icon_to_text_extension_codespark 0.0.1 copy "icon_to_text_extension_codespark: ^0.0.1" to clipboard
icon_to_text_extension_codespark: ^0.0.1 copied to clipboard

Flutter extension to render any IconData (Material or Cupertino) as Text or TextSpan for inline icons in rich text and custom layouts.

example/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:icon_to_text_extension_codespark/src/icon_text_extension.dart';

// Import your extension file here

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'IconToTextExtension Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const IconTextDemoPage(),
    );
  }
}

class IconTextDemoPage extends StatelessWidget {
  const IconTextDemoPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('IconToTextExtension Demo')),
      body: Center(
        child: CupertinoIcons.share.toText(
          prefix: 'Tap ',
          postfix: ' to share',
          style: const TextStyle(
            fontSize: 24,
            color: Colors.black87,
            fontWeight: FontWeight.w600,
          ),
          textAlign: TextAlign.center,
        ),
      ),
    );
  }
}
3
likes
0
points
50
downloads

Publisher

verified publisherksaikiran.tech

Weekly Downloads

Flutter extension to render any IconData (Material or Cupertino) as Text or TextSpan for inline icons in rich text and custom layouts.

Repository (GitHub)
View/report issues

Topics

#icondata #cupertino-icons #material-icons #inline-icons #flutter-extensions

License

unknown (license)

Dependencies

flutter

More

Packages that depend on icon_to_text_extension_codespark