compare_turkish_letter 0.0.2 copy "compare_turkish_letter: ^0.0.2" to clipboard
compare_turkish_letter: ^0.0.2 copied to clipboard

This package aims to compare strings containing Turkish characters.

example/lib/main.dart

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    final List<String> listToOrder = [
      'Muz',
      'Armut',
      'Çilek',
      'Üst',
      'Ömer',
      'Kestane',
      'Cenk',
      'Ubeyd',
      'Çek',
      'Osman',
      'İklim',
      'Senet',
      'Gar',
      'Ilgın',
    ];
    List<String> oldList = [];
    for (var element in listToOrder) {
      oldList.add(element);
    }

    CompareTurkishLetter.sortTurkishLetterList(listToOrder);

    return MaterialApp(
      title: 'Compare Turkish Letter Demo',
      theme: ThemeData(
        primarySwatch: Colors.amber,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: const Text(
            'Compare Turkish Letter Demo',
          ),
        ),
        body: Center(
            child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              Column(
                children: [
                  const Text(
                    'List To Order',
                    style: TextStyle(
                      color: Colors.red,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                  Column(
                    children: [
                      ...oldList.map((e) => Text(e)).toList(),
                    ],
                  )
                ],
              ),
              Column(
                children: [
                  const Text(
                    'Ordered List',
                    style: TextStyle(
                      color: Colors.red,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                  Column(
                    children: [
                      ...listToOrder.map((e) => Text(e)).toList(),
                    ],
                  )
                ],
              ),
            ],
          ),
        )),
      ),
    );
  }
}
1
likes
160
pub points
36%
popularity

Publisher

unverified uploader

This package aims to compare strings containing Turkish characters.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on compare_turkish_letter