super_string_utils 1.1.3 copy "super_string_utils: ^1.1.3" to clipboard
super_string_utils: ^1.1.3 copied to clipboard

A production-ready collection of String extension methods for Dart and Flutter. Features include validation, transformation, extraction, masking, and fuzzy matching.

example/lib/main.dart

import 'package:example/info.dart';
import 'package:example/security_webscreen.dart';
import 'package:example/text_analysis.dart';
import 'package:example/text_processing.dart';
import 'package:flutter/material.dart';
import 'advance_layout_screen.dart';
import 'collection_and_data.dart';
import 'core_string_ext.dart';
import 'fluent_ui.dart';
import 'numeric_and_time.dart';

void main() {
  runApp(MaterialApp(home: HomeScreen()));
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: CustomScrollView(
        slivers: [
          SliverAppBar.large(
            title: const Text('Super String Utils'),
            centerTitle: false,
            actions: [
              IconButton(
                onPressed: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => AllExtensionsListScreen(),
                    ),
                  );
                },
                icon: const Icon(Icons.info_outline),
              ),
            ],
          ),
          SliverPadding(
            padding: const EdgeInsets.all(16),
            sliver: SliverGrid(
              gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
                crossAxisCount: 2,
                mainAxisSpacing: 16,
                crossAxisSpacing: 16,
                childAspectRatio: 1.0, // Square cards
              ),
              delegate: SliverChildListDelegate([
                _NavCard(
                  title: 'Core Basics',
                  icon: Icons.text_fields,
                  color: Colors.blue,
                  desc: 'Validation, Transforms, Extraction',
                  onTap: () => _nav(context, const CoreStringScreen()),
                ),
                _NavCard(
                  title: 'Fluent UI',
                  icon: Icons.widgets,
                  color: Colors.purple,
                  desc: 'Builders for Text & Snackbars',
                  onTap: () => _nav(context, const FluentUiScreen()),
                ),
                _NavCard(
                  title: 'Layouts',
                  icon: Icons.view_quilt,
                  color: Colors.orange,
                  desc: 'Per-index Row/Column control',
                  onTap: () => _nav(context, const AdvancedLayoutScreen()),
                ),
                _NavCard(
                  title: 'Security & Web',
                  icon: Icons.security,
                  color: Colors.teal,
                  desc: 'Hashing, Base64, IPv4, URL',
                  onTap: () => _nav(context, const SecurityWebScreen()),
                ),
                _NavCard(
                  title: 'Numeric & Time',
                  icon: Icons.timer,
                  color: Colors.indigo,
                  desc: 'Bool, Int, Double, Duration, Date',
                  onTap: () => _nav(context, const NumericTimeScreen()),
                ),
                _NavCard(
                  title: 'Data & Lists',
                  icon: Icons.data_array,
                  color: Colors.brown,
                  desc: 'JSON, CSV, Chunks, Maps',
                  onTap: () => _nav(context, const CollectionsDataScreen()),
                ),
                _NavCard(
                  title: 'Analysis',
                  icon: Icons.analytics,
                  color: Colors.pink,
                  desc: 'Reading time, Frequencies, Stats',
                  onTap: () => _nav(context, const TextAnalysisScreen()),
                ),
                _NavCard(
                  title: 'Text Magic',
                  icon: Icons.auto_fix_high,
                  color: Colors.deepOrange,
                  desc: 'Fuzzy, Indent, Intl, Replacement',
                  onTap: () => _nav(context, const TextProcessingScreen()),
                ),
              ]),
            ),
          ),
          const SliverToBoxAdapter(child: SizedBox(height: 40)),
        ],
      ),
    );
  }

  void _nav(BuildContext context, Widget page) {
    Navigator.push(context, MaterialPageRoute(builder: (_) => page));
  }
}

class _NavCard extends StatelessWidget {
  final String title;
  final IconData icon;
  final Color color;
  final String desc;
  final VoidCallback onTap;

  const _NavCard({
    required this.title,
    required this.icon,
    required this.color,
    required this.desc,
    required this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return Card(
      clipBehavior: Clip.antiAlias,
      child: InkWell(
        onTap: onTap,
        child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                padding: const EdgeInsets.all(12),
                decoration: BoxDecoration(
                  color: color.withOpacity(0.1),
                  shape: BoxShape.circle,
                ),
                child: Icon(icon, color: color, size: 28),
              ),
              const Spacer(),
              Text(
                title,
                style: const TextStyle(
                  fontWeight: FontWeight.bold,
                  fontSize: 16,
                ),
              ),
              const SizedBox(height: 4),
              Text(
                desc,
                style: TextStyle(fontSize: 11, color: Colors.grey.shade600),
                maxLines: 2,
                overflow: TextOverflow.ellipsis,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
150
points
172
downloads

Publisher

verified publishertharanitharan.dev

Weekly Downloads

A production-ready collection of String extension methods for Dart and Flutter. Features include validation, transformation, extraction, masking, and fuzzy matching.

Documentation

API reference

License

MIT (license)

Dependencies

crypto, flutter

More

Packages that depend on super_string_utils